-
Notifications
You must be signed in to change notification settings - Fork 3.2k
FIX: Ngnix fails to start if upstream host for stream is unavailable/unreachable #2714
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
base: develop
Are you sure you want to change the base?
FIX: Ngnix fails to start if upstream host for stream is unavailable/unreachable #2714
Conversation
Use variables for proxy_pass directive in order to prevent startup failure if the upstream host is down.
FYI: There are actually only a couple of functionally changed lines. Most of the change is indentation which I added to make the code easier for me to read. |
npm still fails to start, here's a pastebin of the startup log: https://pastebin.com/XW8z4GLK fwiw: newhost.wan.vm is currently not only offline, but also unknown to the local DNS server.
with newhost.wan.vm being offline, but known to the local DNS server NPM does come online (both with the current :latest version and with :github-pr-2714) |
Can you share what |
here you go: https://pastebin.com/eufsKe7W i since tried recreating this stream in :github-pr-2714, but that always shows the stream as "Offline" in the web-ui, even when newhost.wan.vm is online. edit: |
Sorry, I should have been more specific - I wanted to see
It's possible that I should have included the |
PR is now considered stale. If you want to keep it open, please comment 👍 |
CI Error:
|
PR is now considered stale. If you want to keep it open, please comment 👍 |
Issue:
Currently, if the upstream host being forwarded to is down, Nginx fails to start.
Reported by @StefaBa here: #2672 (comment)
Impact:
In this scenario:
Solution:
Declare a variable for
forwarding_host
instead of simply injecting it directly into theproxy_pass
directive.Use variables for
proxy_pass
directive in order to prevent startup failure if the upstream host is down.@StefaBa this one is for you. I think it should work, but I don't use this functionality, so can you please test it?