Skip to content

Incompatibility between nginx/openresty version and generated .conf #4321

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

Open
afranks opened this issue Jan 25, 2025 · 3 comments
Open

Incompatibility between nginx/openresty version and generated .conf #4321

afranks opened this issue Jan 25, 2025 · 3 comments
Labels

Comments

@afranks
Copy link

afranks commented Jan 25, 2025

#4106 changed the way that the http2 directive is declared in .conf files to eliminate warnings related to that directive. If NPM is upgraded and openresty/nginx are not and are on a version that predates the move of the http2 directive, this can cause newly created hosts to fail to start (they're perpetually stuck in the offline state) due to a failed .conf validation. Old hosts work fine unless you save them (I assume this causes the .conf file to be regenerated).

This might only be an issue where NPM was created and upgraded through Proxmox VE helper scripts (https://community-scripts.github.io/ProxmoxVE/) in which case this isn't really a bug with NPM. Even if that's the case there may be an opportunity to log a warning about the openresty version incompatibility.

I suspect this might also contribute to some of the reports on this/similar thread since I encountered a very similar error prior to upgrading openresty: #3497

Either way, not looking for support here just wanted to call this out in case it is also an issue with docker deployed NPM that are upgraded or in case there's an easy way to make clear to users that they are using an old + incompatible version of openresty.

@afranks afranks added the bug label Jan 25, 2025
@naxhh
Copy link

naxhh commented Feb 2, 2025

bumping this one since I spent lots of hours debugging this.

I saved an existing config and stoped working, had to rollback to a backup to get it working.

Creating a new config also failed and gave issues. The config stays offline and never creates the nginx config. I had to manually create it to get what I was testing working.

NPM 2.12.2

openresty -v
nginx version: openresty/1.21.4.3

Manually upgrading to 1.27.1.1 caused npm to not even start. Not sure what the correct version combination is

@afranks
Copy link
Author

afranks commented Feb 2, 2025

FWIW I do think that I was on a version around 1.21 when I was encountered this issue, so it's very possible your initial problem was the same (though unsure why it'd continue to fail after upgrade). https://www.f5.com/company/blog/nginx/nginx-plus-r30-released seems to support the idea that the change to add support for the new http2 directive happened in 1.25.1 (I think openresty <-> nginx version numbers are in sync).

@Nightraider89
Copy link

Got the same problem, and your post fixed it for me, updated openresty to 1.27.1.2 and started to work again.

https://blog.openresty.com/en/ubuntu20-or-install/

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

No branches or pull requests

3 participants