ejabberd 18.01 mod_http_upload already_started

Hi there,

running Debian, I recently went from 16.09 to 18.01 via backports (I've realized since then that I probably shouldn't have done this since, to quote the update page: "Only upgrade from version N to N+1 is documented and supported"). Well, the update went well except for mod_http_upload failing to start up now with this error message:

2018-02-13 00:51:55.903 [critical] <0.1517.0>@gen_mod:start_module:212 Problem starting the module mod_http_upload for host x3mpp.net
options: [{docroot,<<"/var/run/ejabberd/http-upload">>},
error: {error,{already_started,<0.1671.0>}}
2018-02-13 00:51:55.904 [critical] <0.1517.0>@gen_mod:maybe_halt_ejabberd:294 ejabberd initialization was aborted because a module start failed.

This error starts showing once I modify the put_url parameters in the module config away from the default of "https://@HOST@:5444". I'm using an otherwise vanilla config, except for the hostname and of course my own certs which are stored in the default location of "/etc/ejabberd/ejabberd.pem". Is there anything I'm missing? What can I do to further diagnose the problem?

Thanks in advance, cheers!

This happens because you

This happens because you configured ejabberd to serve several vhosts, like:

  - "localhost"
  - "example.net"
  - "x3mpp.net"

But later, you configure the module with a fixed URL for the module in the three vhosts:

    put_url: "https://fixedurl:5444"

When ejabberd starts, it starts one instance of that module for each vhost. If the three instances of the module try to use the same URL, obviously the second and third will fail.

A) Have only one vhost
B) Define that option in a generic way, so it gets different for each vhost, as it was in the default value that used @HOST@
C) Configure that module differently for each vhost, see https://docs.ejabberd.im/admin/configuration/#virtual-hosting

This is precisely what was

This is precisely what was going wrong. Many thanks, badlop! :)

Sidenote for others hitting this issue: 16.09 was actually working with a broken config as described, I don't why that's the case.

Syndicate content