I am running ejabberd 17.12. It works fine.
With this config, I manage to open non-secure web socket connections to it from my browser using both the JS console and a XMPP client :
port: 5280 ip: "::" module: ejabberd_http request_handlers: "/ws": ejabberd_http_ws "/bosh": mod_bosh "/api": mod_http_api ## "/pub/archive": mod_http_fileserver web_admin: true ## register: true captcha: false I need to have secure web socket connections working, so I added this to the above configuration :
tls: true certfile: "/opt/ejabberd/conf/server.pem" Now web socket connections don't work anymore, even unsecured ones. When I try to open one, I still see this in ejabberd.log :
[info] <0.4280.0>@ejabberd_listener:accept:302 (<0.4489.0>) Accepted connection ::ffff:127.0.0.1:58410 -> ::ffff:127.0.1.1:5280
I get nothing into error.log. In the browser's JS console I see :
WebSocket connection to 'ws://domain.local:5280/ws/' failed: Connection closed before receiving a handshake response
Again, my setup works fine for unsecure web socket connections when I remove the following two lines from ejabberd.yml :
tls: true certfile: "/opt/ejabberd/conf/server.pem" The path to the certificate is correct, and server.pem is the default one that came when I installed ejabberd.
I am not so sure how to move forward from here. Any suggestion is most welcome.