processone / xmpp

Erlang/Elixir XMPP parsing and serialization library on top of Fast XML
http://process-one.net
Apache License 2.0
137 stars 88 forks source link

19.09.1 does not load custom module #44

Closed kappac closed 5 years ago

kappac commented 5 years ago

I'm trying to update my setup from 19.05 to 19.09.1, but get an error: [critical] <0.110.0>@ejabberd_app:start:71 Failed to start ejabberd application: Invalid value of option auth_method->1: unsupported database: something.

Everything works as expected with 19.05.

Should be auth modules deployed in a different way or is it a bug?

zinid commented 5 years ago

Can you please start ejabberd with some built-in authentication, let's say mnesia, and then change the config to use your auth method and reload the config. Do you see the same error?

kappac commented 5 years ago

We use docker setup. I'm not sure reloading will change something. Is there any way to log modules' loading?

zinid commented 5 years ago

I'm not sure reloading will change something.

Okay, keep being unsure. When you're ready to do what I ask to do to find the problem let me know.

kappac commented 5 years ago

There is no errors if mnesia in auth_method is used.

...
auth_method:
  - mnesia
...

Docker image is configured with additional scripts to start ejabberd, so it's impossible to update config inside the container and restart ejabberd.

With custom auth method the error is: [critical] <0.110.0>@ejabberd_app:start:71 Failed to start ejabberd application: Invalid value of option auth_method->1: unsupported database: something

kappac commented 5 years ago

Another one error with mnesia in auth_method: [critical] <0.110.0>@ejabberd_app:start:71 Failed to start ejabberd application: Invalid value of option modules: unknown ejabberd module: ejabberd_auth_nextiva. Did you mean mod_push_mnesia? ejabberd_auth_nextiva is configured in modules section.

zinid commented 5 years ago

I'm not talking about start, I'm talking about configuration reload, e.g. via ejabberdctl reload-config.

kappac commented 5 years ago

It's impossible in current setup, I'm trying to do another setup to do what you've requested.

zinid commented 5 years ago

Okay, let's try another way: start ejabberd with mnesia auth method, then attach to running ejabberd via ejabberdctl debug and type in the console:

code:ensure_loaded(ejabberd_auth_nextiva).

(don't forget the trailing dot). What is the output?

zinid commented 5 years ago

It's impossible in current setup

Well, that's a bad setup then.

zinid commented 5 years ago

I honestly think all the problems come from the docker image itself.

kappac commented 5 years ago

It's not bad, it's implemented according to business requirements. Anyway, I've a way to reload ejabberd. Will update thread in several minutes.

With 19.05 there is no any problems.

zinid commented 5 years ago

It's not bad, it's implemented according to business requirements.

So, service interruption just for the configuration change is a part of business requirement?

kappac commented 5 years ago

Service does not interrupt if ejabberd is 19.05, that's why I've opened an issue.

kappac commented 5 years ago

I've got this error after ejabberdctl reload_config: [error] <0.670.0>@ejabberd_config:reload:114 Configuration reload aborted: Configuration error: missing required option: host.

In the Configuring ejabberd I'm not able to find description of this option, except modules description.

zinid commented 5 years ago

I told you to try code:ensure_loaded(), see above.

zinid commented 5 years ago

Whatever, just put your ejabberd_auth_nextiva.beam to other ejabberd beams. This will work for sure.

kappac commented 5 years ago

ejabberdctl debug hangs up, while other ejabberdctl commands work fine.

Thank you!