ejabberdejabberd-module

In ejabberd, mod_http_upload returns "ignoring listen option 'request_handlers' with invalid value: [{upload,mod_http_upload}]"


In ejabberd 18.01-2, installed in lxc container Ubuntu 18.04 Bionic LTS using apt, I'm trying to setup mod_http_upload.

Following the documentation, in the section listen, I have

listen:
  ...
  -
    port: 5443
    module: ejabberd_http
    tls: true
    request_handlers:
      upload: mod_http_upload

However, when I restart the service, I can see in the log /var/log/ejabberd/error.log:

2019-11-11 13:47:06.923 [error] <0.379.0>@ejabberd_listener:validate_module_option:604 ignoring listen option 'request_handlers' with invalid value: [{upload,mod_http_upload}]

Solution

  • You are reading configuration examples from the online documentation, which documents the latest released ejabberd version, 19.09.

    And you are using those examples with your old ejabberd 18.01. It isn't a surprise if something goes wrong.

    In this case, the problem is in the syntax, it's easy to fix, and you can notice it if you look at the ejabberd.yml that comes as example in your ejabberd 18.01 installation:

    The last line in that example configuration can be: