-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
[BUG] nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3 #316
Comments
Just had the same issue because watchtower updated my swag container to |
At least it's not just me then, occasionally using watchtower has it's downside! |
|
Like others here, I auto-updated through watchtower and it broke. Reverting to 1.32.0-ls172 fixes it. |
Reverting to an older version is not a fix, merely a workaround and a very poor one for a reverse proxy. Please see my comment above. Closing. |
Wait.. how can you be sure that our configs are the issue here? Why could this not be a bug? I agree with you reverting to a previous version is just a workaround. Should it not at least be investigated what causes this bug? |
Given 3 people have the issue in the 1st hour after release I'm with you that it's a bug. There are no breaking changes on the GitHub release so what exactly should we be looking for in our config that's breaking it? |
It's not a bug. The upstream package changed how they ship the default nginx configs, if your existing configs already define a You either need to remove that stream block or remove the include of the new one. As we don't preconfigure or support the use of the |
Your container logs likely have some information like this:
Whichever files are listed are outdated. We place the sample files right next to the file listed as outdated, ex:
Per the instructions in the logs, you will need to compare your active config files to the included samples and determine if anything in your active config was a customization that you put in place for a specific reason. Then replace the active file with the sample, and apply any customizations you need. Then restart the container. This will stop the container init from logging these messages. If you still have the same problem after updating your config, please provide the full container log and nginx log (inside your config) and we can troubleshoot. Providing one line from the log is not enough context for us to determine how to handle the issue. Edit: |
I'm not sure which part of my nginx.conf file caused this, but replacing my .conf I've been using with the current nginx.conf.sample file worked. It seems like something updated from a previous nginx.conf that's causing this. |
Hence the second point in my comment above. The container log lists the configs that are out of date and tells you how to update them. |
Had the same problem. Had already posted on the Unraid Forum. So started to go through all my .Conf files. Then @BigBoyMarky on https://forums.unraid.net/topic/51808-support-linuxserverio-swag-secure-web-application-gateway-nginxphpcertbotfail2ban/page/237/ suggested that just replacing ssl.conf and nginx.conf solved the problem. Did that and now up and running. I will be checking my files but now it is not so urgent. |
"We put the warnings in the logs nobody reads until something goes sideways" is a heck of a dodge. One of the big rules of updates is don't break a working config. Was there any consideration of attempting an automatic migration? |
Yes, that has been considered. We have no way of knowing what customizations users apply and how to adjust the configs in a way that keeps them up to date without breaking something intentionally customized. |
The reason this became a thing because the nginx stream module started shipping with a on-by-default stream configuration, in a location we removed from the old place in in early 2021. |
For those that come here my fix was to replace /config/nginx/nginx.conf with /config/nginx/nginx.conf.sample. I had already updated the ssl.conf file and the error remained so the change is either in both files or only nginx.conf. |
For those running this in docker, this is how I fixed mine today. ~/docker/swag/nginx mv ssl.conf ssl.conf.bak |
I upgraded configs and now I get a unknown "denied_highrisk" variable spam in my log. From what I can tell it related to fail2ban. This is a old container from around 2020. I have upgraded all the configs to the latest sample files other then the proxy-configs. Any Ides on what I need to remove to get that to go away so it can boot fully. |
You don't upgrade them, you upgrade the container and then stop it, then delete the nginx.conf, the container creates a new config file for you next time you start it. |
Is there an existing issue for this?
Current Behavior
Swag fails to start on latest version 1.32.0-ls173 with error nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
Reverting my container to 1.32.0-ls172 allows swag to start and function correctly.
Expected Behavior
No response
Steps To Reproduce
Update to 1.32.0-ls173
Environment
CPU architecture
x86-64
Docker creation
Container logs
The text was updated successfully, but these errors were encountered: