OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 22.1 Legacy Series »
  • [SOLVED] NGINX does'n start after update to 22.1.9
« previous next »
  • Print
Pages: [1] 2 3

Author Topic: [SOLVED] NGINX does'n start after update to 22.1.9  (Read 11563 times)

muchacha_grande

  • Full Member
  • ***
  • Posts: 219
  • Karma: 19
    • View Profile
[SOLVED] NGINX does'n start after update to 22.1.9
« on: June 23, 2022, 06:12:43 pm »
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
« Last Edit: June 28, 2022, 05:03:16 pm by muchacha_grande »
Logged

RamSense

  • Hero Member
  • *****
  • Posts: 595
  • Karma: 11
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #1 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?
Logged

RamSense

  • Hero Member
  • *****
  • Posts: 595
  • Karma: 11
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #2 on: June 23, 2022, 06:36:44 pm »
deleted
Logged

muchacha_grande

  • Full Member
  • ***
  • Posts: 219
  • Karma: 19
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #3 on: June 23, 2022, 06:47:23 pm »
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.
« Last Edit: June 23, 2022, 06:55:24 pm by muchacha_grande »
Logged

peter.vynck

  • Newbie
  • *
  • Posts: 16
  • Karma: 1
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #4 on: June 23, 2022, 06:51:44 pm »
Same issue with nginx here. Same error.
Logged

RamSense

  • Hero Member
  • *****
  • Posts: 595
  • Karma: 11
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #5 on: June 23, 2022, 06:59:24 pm »
Thnx!
this
Quote
opnsense-revert -r 22.1.8 nginx'
fixed it for me also.
W'll wait for the fix for updating nginx again.
Logged

RamSense

  • Hero Member
  • *****
  • Posts: 595
  • Karma: 11
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #6 on: June 23, 2022, 07:09:05 pm »
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'
« Last Edit: June 23, 2022, 07:13:42 pm by RamSense »
Logged

PIv0

  • Newbie
  • *
  • Posts: 19
  • Karma: 2
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #7 on: June 23, 2022, 07:10:15 pm »
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.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17749
  • Karma: 1620
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #8 on: June 23, 2022, 09:04:07 pm »
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
Logged

mvdheijkant

  • Newbie
  • *
  • Posts: 29
  • Karma: 1
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #9 on: June 24, 2022, 10:22:31 am »
From which page can I revert separately Nginx or it it done through the console?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17749
  • Karma: 1620
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #10 on: June 24, 2022, 10:30:44 am »
Console only.


Cheers,
Franco
Logged

PIv0

  • Newbie
  • *
  • Posts: 19
  • Karma: 2
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #11 on: June 24, 2022, 11:15:49 am »
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
Logged

Fright

  • Hero Member
  • *****
  • Posts: 1777
  • Karma: 164
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #12 on: June 24, 2022, 12:21:30 pm »
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
« Last Edit: June 24, 2022, 07:15:02 pm by Fright »
Logged

muchacha_grande

  • Full Member
  • ***
  • Posts: 219
  • Karma: 19
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #13 on: June 24, 2022, 08:23:51 pm »
Great!! I confirm the fix is working fine.
Logged

XeroX

  • Full Member
  • ***
  • Posts: 114
  • Karma: 7
    • View Profile
Re: NGINX does'n start after update to 22.1.9
« Reply #14 on: June 25, 2022, 07:25:10 pm »
Can confirm patch works.

Code: [Select]
opnsense-patch -c plugins a357676
Logged

  • Print
Pages: [1] 2 3
« previous next »
  • OPNsense Forum »
  • Archive »
  • 22.1 Legacy Series »
  • [SOLVED] NGINX does'n start after update to 22.1.9
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2