Runtime Panic starting kwmserverd when --iss not specified

  • I am attempting to set up the mattermost plugin and am at the point of installing kwmserverd


    Following the docker setup instructions from the readme I have run:

    sudo openssl rand -out /etc/kopano/kwm-admin-tokens.key 32
    docker pull kopano/kwmserverd
    docker run --rm=true --name=kwmserverd --read-only --volume /etc/kopano/kwm-admin-tokens.key:/run/secrets/kwmserverd_admin_tokens_key:ro --publish  kopano/kwmserverd


    I see the following stack trace:

    time="2019-11-09T06:36:24Z" level=info msg="serve start"
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x90efdb]
    goroutine 1 [running]:
    main.serve(0xc0000d5680, 0xf409b8, 0x0, 0x0, 0x4, 0xa4812e)
    main.commandServe.func1(0xc0000d5680, 0xf409b8, 0x0, 0x0)
   +0x53*Command).execute(0xc0000d5680, 0xf409b8, 0x0, 0x0, 0xc0000d5680, 0xf409b8)
   +0x2aa*Command).ExecuteC(0xf1a780, 0xc00004bf38, 0x1, 0x1)

    (in actuality I am running kwmserverd through Portainer with some other configuration options but this is a minimum reproduction and follows the exact readme steps)


    uname -a
    Linux xxxxxxx 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    docker --version
    Docker version 18.09.7, build 2d0083d
    docker inspect --format='{{index .RepoDigests 0}}' kopano/kwmserverd
    kopano/kwmserverd@sha256:30bb66c4645c74f0cd7788238ce9cf1478ae2fcde26a1ead7f509ab31785b7ac # 1.0.0


    Checking server.go:285 I see that config.Iss is being accessed, and that its assignment is conditional on the flag --iss being specified.

    Other references to config.Iss include scripts/kopano-kwmserverd.binscript which initializes the --iss flag to https://localhost


    docker run --rm=true --name=kwmserverd --read-only --volume /etc/kopano/kwm-admin-tokens.key:/run/secrets/kwmserverd_admin_tokens_key:ro --publish  kopano/kwmserverd \
           serve --iss=https://localhost

    Hope this helps someone else!

  • Kopano

Log in to reply