-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IS mod_rest compatible with ejabberd 24.2.0? #334
Comments
Yes, it should work. It works compiling ejabberd manualy, and also using a container image: For this test, I'll use the $ podman run --name ejabberd -it -p 5222:5222 -p 5285:5285 ghcr.io/processone/ejabberd:24.02 live In another terminal, I had to edit the file podman exec -it --user root ejabberd vi .ejabberd-modules/sources/ejabberd-contrib/mod_rest/conf/mod_rest.yml Then install the module and register a destination user: $ podman exec -it ejabberd ejabberdctl module_install mod_rest
Module mod_rest has been installed and started.
It's configured in the file:
/opt/ejabberd/.ejabberd-modules/mod_rest/conf/mod_rest.yml
Configure the module in that file, or remove it
and configure in your main ejabberd.yml
$ podman exec -it ejabberd ejabberdctl register nolan localhost asd
User nolan@localhost successfully registered Finally, check the offline messages of that user, send a stanza and check it was received: $ podman exec -it ejabberd ejabberdctl get_offline_count nolan localhost
0
$ wget http://localhost:5285/rest/ --server-response --post-data '<message to="nolan@localhost" from="localhost/rest"><body>World</body></message>'
--2024-04-29 13:38:15-- http://localhost:5285/rest/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:5285... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 2
Length: 2 [text/html]
Saving to: 'index.html'
index.html 100%[=========================================>] 2 --.-KB/s in 0s
2024-04-29 13:38:15 (369 KB/s) - 'index.html' saved [2/2]
$ cat index.html
Ok
$ podman exec -it ejabberd ejabberdctl get_offline_count nolan localhost
1 |
I'm using Ubuntu with NGINX.
And it says it was installed correctly. But when I added to ejabberd.yml:
It fails if I try to reload ejabberd. If I remove it it works, if I add any mod_rest it fails. |
This comment was marked as duplicate.
This comment was marked as duplicate.
When running module_install, it also copies the default module configuration, and gets enabled by default. Didn't you get an explanation similar to this?
Please notice that "module_install" performs many tasks:
So you just need to execute "module_install", as I demonstrated in my example setup guide. |
I didn't use "podman exec -it " . |
Thisenables the module, as I said and I demonstrated previously. NO NEED TO EDIT ejabberd.yml, it's already enabled.
I'll repeat again: the module is already enabled. It is mentioned in the command response, did you read it? No need to enable it again in ejabberd.yml, and no need to reload ejabberd service. |
YES I got it but i WANT TO CONFIG my ejabberd.yml with custom stuff like this:
and:
etc.. |
@badlop ? |
Aha: If you want to configure some options in your main ejabberd.yml file, you can:
|
Thanks. Your tips really helped. |
I installed the new ejabberd 24.2.0, then installed mod_rest. It installed correctly.
But whenever I try to add it on ejabberd.yml:
modules:
mod_rest: {}
it fails. doesn't matter how I add it, it fails to reload or restart ejabberd. Why?
The text was updated successfully, but these errors were encountered: