I am using Mopidy.js on a custom frontend. When I run both the frontend and Mopidy locally, I have no connection issues.
However, to run the frontend on a custom domain, I need to expose the Mopidy server. I have done this by setting up a reverse SSH tunnel to a remote server (ssh -R 6680:localhost:6680 user@remote_server). The remote server runs nginx, and proxies all calls to mopidy.domain.com to localhost:6680 (which is then passed through the reverse tunnel).
With this setup the client is able to establish a Websocket connection to Mopidy, but it randomly reconnects. When logging events on the clientside, I see that I get a ‘reconnectionPending’ followed by a ‘websocket:close’.
I’ve tried configuring the SSH connection to have a higher ServerAliveInterval, but to no avail. I’ve also tried setting a high proxy_read_timeout in my nginx config.
Are there known problems with such a setup?
Is there any way to enable logging from only Websocket events for debugging purposes?