Unsolved socket.io connection error 503

  • Hello,

    I get "can’t establish a connection to the server at wss://forum.mydomain.com/socket.io/?EIO=3&tra...." error.
    There is something wrong on my proxy settings.

    Could anybody help me about that issue?

    *nodebb working on unix socket,

        "url": "https://forum.mydomain.com/",
        "port": "/tmp/nodebb.sock",
        "secret": "145a922f----------------------",
        "database": "redis",
        "redis": {
            "host": "/tmp/redis.sock",
            "password": "longlongpass",
            "database": "0"
    ProxyRequests off
    SSLProxyEngine On
    RequestHeader set X-Forwarded-Proto "https"
    RewriteEngine On
    RewriteCond %{REQUEST_URI}  ^/socket.io            [NC]
    RewriteCond %{QUERY_STRING} transport=websocket    [NC]
    RewriteRule /(.*)           ws://$1 [P,L]
    ProxyPass / unix:/tmp/nodebb.sock|
    ProxyPassReverse / unix:/tmp/nodebb.sock|

  • Ok, i think nobody will answer that question.

    After dig it i realised that the issue is about apache mod_proxy_wstunnel. When nodebb works on TCP port there is no problem but on unix socket it seems that mod_proxy_wstunnel is not meant to work with Unix domain sockets.

    For example;
    ProxyPass "/ws" "unix:/tmp/nodebb.sock|ws://" not work.

    Best Regards,

Suggested Topics

  • 4
  • 4
  • 5
  • 1
  • 7
| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.