Socket 'bug'



  • Hi.. its not a nodebb bug i guess .. but im facing it with firefox / chrome at my JOB pc...

    (firefox console) "NetworkError: 504 Gateway Time-out - http://mydomain.com.br/socket.io/1/xhr-polling/SJDt2PrAykr1CFv25L-u?t=1390914977246"

    (chrome console) Failed to load resource: the server responded with a status of 504 (Gateway Time-out) http://www.mydomain.com.br/socket.io/1/xhr-polling/Ym80pf0IqVfTU-vD5L_u?t=1390917065119

    it appears on the console.. and i cant login, cant post.. cant see who is online / how much posts, threads and users are online..

    on firefox i can login.. but cant post... same error.. but safari goes well...

    All versions are the last (chrome and firefox)...

    also appears

    TypeError: this.transport is null
    ...send=function(a){return this.websocket.send(a),this},d.prototype.payload=functio...
    
    
    Uncaught TypeError: Cannot call method 'payload' of null socket.io.js:2
    Uncaught TypeError: Cannot call method 'packet' of null socket.io.js:2
    Uncaught TypeError: Cannot call method 'close' of null  socket.io.js:2
    

    Does somebody face it already? im running under ubuntu 13.10 with nginx 1.4.4


  • GNU/Linux Admin

    Please post your nginx config (y)



  • upstream nodebb {
        server 127.0.0.1:4567;
    }
    
    server {
        listen 80;
        root /home/forum/nodebb;
    
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
    
            proxy_pass http://nodebb/;
            proxy_redirect off;
    
            # Socket.IO Support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    }
    

  • GNU/Linux Admin

    Interesting, so everything works fine on Safari, but Firefox and Chrome do not work? What version is Firefox and Chrome? Perhaps they do not support web sockets...

    But I'm worried as it seems like even the xhr-polling is not working.


  • Admin

    Hi.. its not a nodebb bug i guess .. but im facing it with firefox / chrome at my JOB pc...

    apparently fixed in 1.0?


  • GNU/Linux Admin

    Good news is, the upcoming 1.0 version of Socket.IO will fix this:

    Nice!

    answered Sep 17 '13 at 17:07

    Oh... at this point, we could refactor the entire socket layer to use EngineIO before SocketIO 1.0 is released.



  • The solution to this is to replace
    proxy_set_header Connection "upgrade";

    with

    proxy_set_header Connection: "Upgrade";


  • GNU/Linux Admin

    @pillows Maybe that would work... we use upgrade on our end, and it seems to be working fine. Worth a shot, though.


Log in to reply
 

Suggested Topics

| |