[SOLVED] NGINX does'n start after update to 22.1.9

Started by muchacha_grande, June 23, 2022, 06:12:43 PM

Previous topic - Next topic
June 23, 2022, 06:12:43 PM Last Edit: June 28, 2022, 05:03:16 PM by muchacha_grande
Hi, I have this problem after update. I read that NGINX plugin was updated two.

The error I see in NGINX log is: unknown directive "js_include" in /usr/local/etc/nginx/nginx.conf:41

How can I revert back to the previous NGINX version?

Thank you

EDIT: this was solved on hotfix 22.1.9_1

Thank you again

I have the same problem:
unknown directive "js_include" in /usr/local/etc/nginx/nginx.conf:176

How can we fix this?
Deciso DEC850v2


June 23, 2022, 06:47:23 PM #3 Last Edit: June 23, 2022, 06:55:24 PM by muchacha_grande
I fixed it reverting nginx to the previous version.
So, the first thing I tried is 'opnsense-revert -r 22.1.8 os-nginx' and it didn't work. Then I tried 'opnsense-revert -r 22.1.8 nginx' and it worked.
So I think that the problem is on this update 'nginx upgraded: 1.20.2_9,2 -> 1.22.0_5,2'.
Looking back in the nginx log I found that the error started to happen in the exact time the nginx package was updated.

May be os-nginx package can be updated preserving the previous nginx package.

I'll try

EDIT: I'm trying os-nginx 1.28 with nginx 1.20.2_9,2 and for now it is working fine. I will pin to this nginx version.


Thnx!
this
Quoteopnsense-revert -r 22.1.8 nginx'
fixed it for me also.
W'll wait for the fix for updating nginx again.
Deciso DEC850v2

June 23, 2022, 07:09:05 PM #6 Last Edit: June 23, 2022, 07:13:42 PM by RamSense
Ok.. did something fun...
I updated (only) the nginx again to the latest version, and now it keeps working?!

don't know what caused it, hope it works at your end also?

NB. I tested further with stopping nxginx and starting it again, than it is broken again. so reverted back to opnsense-revert -r 22.1.8 nginx'
Deciso DEC850v2

Quote from: RamSense on June 23, 2022, 06:36:26 PM
I have the same problem:
unknown directive "js_include" in /usr/local/etc/nginx/nginx.conf:176

How can we fix this?

I have the same problem.

The documentation for module ngx_http_js_module says:
The directive (js_include) was made obsolete in version 0.4.0 and was removed in version 0.7.1. The js_import directive should be used instead.

A simple substitution leads to other errors.
I will wait for this error to be fixed. I hope we don't have to wait.

Reverting nginx is the easiest solution for the time being. The plugin wasn't changed in that are, which is good and bad at the same time in this particular case.


Cheers,
Franco

From which page can I revert separately Nginx or it it done through the console?


Quote from: mvdheijkant on June 24, 2022, 10:22:31 AM
From which page can I revert separately Nginx or it it done through the console?

I did like this:
# opnsense-revert -r 22.1.8 nginx

June 24, 2022, 12:21:30 PM #12 Last Edit: June 24, 2022, 07:15:02 PM by Fright
I think that may be due to the removal of support for the js_include directive.
should use js_import now.
http://nginx.org/en/docs/http/ngx_http_js_module.html#js_import

https://github.com/opnsense/plugins/pull/3016 worked on test vm

Great!! I confirm the fix is working fine.

Can confirm patch works.

opnsense-patch -c plugins a357676