OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: nightfox on May 18, 2023, 02:32:34 PM

Title: Upgrade to 23.1.7_3 causes PR_END_OF_FILE_ERROR in NGINX
Post by: nightfox on May 18, 2023, 02:32:34 PM
Hello,

When I upgrade my firewall running 23.1.5_4 to 23.1.7_3, after the reboot my NGINX reverse proxy running on OPNsense starts giving PR_END_OF_FILE_ERROR when trying to load a SSL site. I've checked the obvious logs but I don't see anything. The only way I can get NGINX to work again is by restoring from backup or snapshot.

Any ideas? I'm happy to try another upgrade again and pull relevant logs if I know which logs to pull.

Thanks!
Title: Re: Upgrade to 23.1.7_3 causes PR_END_OF_FILE_ERROR in NGINX
Post by: tomrwaller on May 23, 2023, 11:44:25 PM
Just to add - I'm getting the same errors since the update. I can't get any of my SSL sites to load. Did you manage to find a resolution other than revert?
Title: Re: Upgrade to 23.1.7_3 causes PR_END_OF_FILE_ERROR in NGINX
Post by: nightfox on May 26, 2023, 05:34:00 PM
Unfortunately not. I tried different things relating to the error such as re-issuing certificates. Nothing worked. Restoring from backup/snapshot was the only way to get things working again.

I'm thinking I might just have to move back to a separate NGINX reverse proxy.  :-\
Title: Re: Upgrade to 23.1.7_3 causes PR_END_OF_FILE_ERROR in NGINX
Post by: dcorral on June 15, 2023, 12:49:33 PM
Hi.

Same for version 23.1.9. Any news?

Thanks in advance.
Title: Re: Upgrade to 23.1.7_3 causes PR_END_OF_FILE_ERROR in NGINX
Post by: dcorral on June 15, 2023, 01:50:24 PM
I found a solution:

I removed all lines "proxy_protocol" in all my servers and restared Nginx.

Step by step:

ssh root@<OPNSENSE-IP>
Select "8 ) Shell"

To debug error:
tail -f /var/log/nginx/*.log

You must to access to your url to force errror.

Probably you will see somthing like:
2023/06/15 12:37:12 [error] 90378#100106: *43 broken header

cd /usr/local/etc/nginx/
grep -i "proxy_protocol" *
cp nginx.conf nginx.conf-BACKUP
vi nginx.conf

Yoy must to remove ALL lines "proxy_protocol" in all your servers:

For example, if you have:
listen 443 http2 ssl proxy_protocol;

Change it like this:
listen 443 http2 ssl;

Then restart Nginx:

/usr/local/etc/rc.d/nginx configtest
/usr/local/etc/rc.d/nginx stop
/usr/local/etc/rc.d/nginx status
/usr/local/etc/rc.d/nginx start
/usr/local/etc/rc.d/nginx status

Now check you url one more time.
It has worked for me.
Title: Re: Upgrade to 23.1.7_3 causes PR_END_OF_FILE_ERROR in NGINX
Post by: GreenMatter on September 18, 2023, 09:41:44 PM
Thanks! Removing proxy_protocol directive (in 23.7.4) restored nginx functionality.
Is it a bug or feature?  :P