502 Bad Gateway nginx error post rebuilding


(Pravil) #1

Hello,

I tried rebuilding the app and post that I’m getting ‘502 bad gateway error nginx’. I can someone tell me how I can fix this?


(Andrew Waugh) #2

Have you got any 3rd party plugins installed?

See:


(Pravil) #3

Thank you @JagWaugh . That may be the issue. I was trying to install the official Adsense plugin. And I was rebuilding the app. The site was broken after that. May be the re build wasn’t successful.

I see this comment in the other thread: "I have a feeling that your rebuild didn’t finish successfully. Can you upload the full rebuild log? " Will that help me? If yes, how do I upload full rebuild log? Or is there a way to remove that plugin codes which I have added and get back to last known working stage?

Thanks again for your help. Sorry, I am a newbie and not that technical. Please bear with me.


(Andrew Waugh) #4

@pravilz

Have you got SSH access and an editor like nano?

  1. Connect via SSH
  2. sudo -s
    
  3. cd /var/discourse/containers
    
  4. nano app.yml
    
  5. put “##” at the beginning of all the lines starting “- git clone…” (other than the ones which start “- git clone Discourse · GitHub…”)
  6. <ctrl> O
    
  7. <ctrl> W
    
  8. cd ..
    
  9. ./launcher rebuild app
    

This will rebuild with only the official Discourse plugins. Check that the site comes up after the rebuild - if it does, then your problem is definitely a 3rd party plugin.

Now repeat as above, taking the “##” out from one of the plugins, and do a rebuild. Once your site fails to come up after the rebuild you know which plugin is causing the issue - put the “##” back in for that plugin and contact the plugin author.


Site down: 502 Bad Gateway - after update