barrowclift / shelf

Beautifully display your record collection on the Internet
https://shelf.barrowclift.me
MIT License
15 stars 2 forks source link

502 Gateway Error - Node.js Apps Running #2

Closed mrtimothyduong closed 6 years ago

mrtimothyduong commented 6 years ago

Hi Barrowclift,

Hope you can help me with this one, from my troubleshooting it seems that it's an issue with NGINX / my set-up. Hoping that you could give a quick eye and point me in the right direction just in case I missed something in the .config / .install.

Error: 502 Bad Gateway when accessing 'https://shelf.timothyduong.me'

Troubleshooting:

Logs from "tail -f /var/log/nginx/error.log"

2018/09/15 01:11:02 [crit] 3070#0: *1 connect() to [::1]:10800 failed (13: Permission denied) while connecting to upstream, client: 1.129.104.94, server: shelf.timothyduong.me, request: "GET / HTTP/1.1", upstream: "http://[::1]:10800/", host: "shelf.timothyduong.me"
2018/09/15 01:11:02 [error] 3070#0: *1 no live upstreams while connecting to upstream, client: 1.129.104.94, server: shelf.timothyduong.me, request: "GET /favicon.ico HTTP/1.1", upstream: "http://localhost/favicon.ico", host: "shelf.timothyduong.me"

I suspect it could be permissions for NGINX to access the node.js details?

I can host the nginx.conf file on my github if needed. Cheers for your time and the app :) Hoping I can get the same on my end!

barrowclift commented 6 years ago

I’m away from my computer for the weekend, unfortunately, so my answers will be brief and intermittent until I can get back in front of my keyboard.

If I recall, executing “sudo setenforce permissive” should fix this issue, you can read more about it here:

https://wiki.gentoo.org/wiki/SELinux/Tutorials/Permissive_versus_enforcing

I don’t think that command by itself persists through reboots, though. I’ll follow up with you on how to persist the change when I get back, assuming the temporary command works.

mrtimothyduong commented 6 years ago

Hi Marc,

Thanks for that, that command worked! Just on the last obstacle (the albumpoller isn't saving images)

Hopefully I can find some logs or work it out.

Thanks a lot man 👍

barrowclift commented 6 years ago

No problem! The INSTALL.md documentation's been updated to include that as a potential setting that needs to be adjusted.

Please don't hesitate to open up a new issue if you believe the albumPoller isn't saving images due to a code issue, I'll be more than happy to give it a look.