504 Gateway Time-out - nginx/1.4.6 (Ubuntu)



  • Getting this error thrown in the browser ONLY when I try to log in or register. 504 Gateway Time-out - nginx/1.4.6 (Ubuntu) It appears above the login or registration window in an error box.

    It's strange because everything else works fine. Pages load. I can view categories and threads. The admin page itself loads fine and redirects me to login. It's just when I click the login button or when I'm registering and click the register button. Anyone else seen this or even know where to begin looking?

    I already went the nginx route and the logs there just say:

    ** 2016/05/07 15:04:41 [error] 2955#0: *2024 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 75.x.x.x, server: talk.domain.com, request: "POST /login HTTP/1.1", upstream: "http://127.0.0.1:4567/login", host: "talk.domain.com", referrer: "http://talk.domain.com/login" **

    I also tried just bypassing nginx and doing it from talk.domain.com:4567/login and get the same thing.



  • Weird. A droplet server reboot cleared it up...


  • GNU/Linux

    Step 1
    go to /etc/nginx/sites-available/default

    Paste this:

    server {
    listen 80;
    
    server_name example.com;
    
    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://127.0.0.1:4567/;
        proxy_redirect off;
    
        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
     }
    }
    

    change server_name example.com; to server_name your.ip;

    Step 2

    go to

    cd /patch/to/nodebb
    ./nodebb start

  • Admin

    @g0st Interesting! I'd be interested in hearing what the underlying cause was, but hey, if a server reboot fixes it, then that's good :smile:



  • I have the same issue, no matter nginx or apache or without them. As you see, after one goes through invitation link, fills out data and clicks the submit an ajax request is executed to the url (nodebb.zone:4567/register) and stalls for 4 min, then throws an error.
    0_1464820520382_Screenshot from 2016-06-02 01:26:50.png

    As I noticed, this occurs when the option "Admin Invite Only" is set! Otherwise the registration occurs successfully.



  • Have you any idea about that?


  • Anime Lovers

    I second this. I get a 504 when attempting to register as a new user with an email invite. Using the default config for nginx on aws, no ssh, no domain name. And as @Dem-Ka mentioned, the problem goes away as soon as I change the invite option to any other than Admin Invite Only.

    Pretty bothersome, if you ask me, specially if I don't want to queue people for the invite or if I want only to process registries from users I invite.


  • Admin

    Hi, have you guys tried using the master branch to see if this has been resolved already? It sounds.. familiar


Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.