Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newbie100%: 502 error and [YOUR_SERVER_FQDN]? #3134

Open
gcplaw opened this issue Jun 3, 2022 · 5 comments
Open

Newbie100%: 502 error and [YOUR_SERVER_FQDN]? #3134

gcplaw opened this issue Jun 3, 2022 · 5 comments

Comments

@gcplaw
Copy link

gcplaw commented Jun 3, 2022

Background
I set up Ubuntu 18.04.1 LTS on my cloud server and it gives me a public ip(lets say 2.2.2.2) and an intranet IP.

My issue
I dont have a doman name so I set my FDQN with my public ip.
When i access my public ip, it returns 502 bad gateway error with colored favicon of huggin.
I tried troubleshoot with 'sudo bundle exec rake production:check' and it returns green ok everything is fine.

What should I do now? THANKS!

@gcplaw
Copy link
Author

gcplaw commented Jun 3, 2022

When I click @, you four guys pop up... sorry to bother you guys like this but I really like to know how to solve the issue... apologize again for any inconveniences.....
@brynary @amoeba @necrodome @raucao

@gcplaw
Copy link
Author

gcplaw commented Jun 3, 2022

What I tried: ... too many bad returns...

  1. Troubleshooting - sudo bundle exec rake production:check
    Return: [ OK ] Everything is fine

  2. Troubleshooting - Nginx error log /var/log/nginx/huginn_error.log
    Return: connect() to unix:/home/huginn/huginn/tmp/sockets/unicorn.socket failed
    BUT i did follow the guide to set the Procfile as below:
    image

  3. Troubleshooting - Unicorn log /home/huginn/huginn/log/unicorn.log
    2.1 my unicorn.rb as below:
    image

2.2 Gem dependencies not all installed, wonder why as below
image

@virtadpt
Copy link
Collaborator

virtadpt commented Jun 3, 2022

Nginx is trying to connect to the socket but can't.

ls -alF /home/huginn/huginn/tmp/sockets/unicorn.socket

What comes back?

@gcplaw
Copy link
Author

gcplaw commented Jun 4, 2022

Nginx is trying to connect to the socket but can't.

ls -alF /home/huginn/huginn/tmp/sockets/unicorn.socket

What comes back?

ls: cannot access '/home/huginn/huginn/tmp/sockets/unicorn.socket': No such file or directory

@virtadpt no such file... and thank you for pick up my issue!

@virtadpt
Copy link
Collaborator

virtadpt commented Jun 5, 2022

Yep, that's your problem. No unicorn.socket, nothing for Nginx to connect to. What happens when you try to start up the Unicorn server?

rake production:export

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants