Netgate Store

Author Topic: After upgrade 502 Bad Gateway  (Read 688 times)

0 Members and 1 Guest are viewing this topic.

Offline hudriwudri5

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
After upgrade 502 Bad Gateway
« on: December 18, 2017, 11:04:37 am »
Hi everybody,

I've upgraded today to succested new Version.
After reboot I was not able to open the Login page. I always get "502 Bad Gateway"

After looking for a resolution I've found the hint to restart PHP-FPM - so I logged in via SSH and did it.
For a short time I can Login and go to Settings. - then I get "504 Gateway Time-out".

The Version shown on Dashboard is
2.4.2-RELEASE-p1 (amd64)
built on Tue Dec 12 13:45:26 CST 2017
FreeBSD 11.1-RELEASE-p6

Routing and DHCP works.

Also I disabled pfBlockerNG - as mentioned in some articles - for example here: https://got-tty.org/pfsense-2-4-bad-Gateway
... but it doesen't help me.

Thank you in advance for help!

Gerhard

Offline shortspecialbus

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #1 on: December 18, 2017, 05:54:10 pm »
I'm having the same issue after upgrading today.  I can reset PHP-FPM via ssh as a workaround but it isn't ideal.

Edit: For a bit more info, nginx is losing its socket file, I'm unclear as to why at this time.  I'm digging a bit more.
« Last Edit: December 18, 2017, 06:04:04 pm by shortspecialbus »

marjohh

  • Guest
Re: After upgrade 502 Bad Gateway
« Reply #2 on: December 19, 2017, 05:19:00 am »
There are a couple of patches you might want to try that are aimed at fixing this issue.

The first is actually included in the latest version of pfBocker so I guess that one isn't helping, so try this one: 2c131b1

That patch was created against 2.4.3, hopefully it will apply.
« Last Edit: December 19, 2017, 05:23:17 am by marjohn56 »

Offline hudriwudri5

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #3 on: December 19, 2017, 11:18:58 am »
Thank you for the answer.

But I'm a real beginner in terms of patching. I am a real pfSense DAU (german synonym for aprox. BDU).
Maybe there is anybody out there you can tell me how to patch this with "2c131b1"?

thank you in advance
Gerhard

marjohh

  • Guest
Re: After upgrade 502 Bad Gateway
« Reply #4 on: December 19, 2017, 11:49:12 am »
First thing to do is to go to system->Package manager and install the system_patches pkg.


You will then have an system->Patches


Click Add New Patch

Give the description some title... 502 fix or something like that.

Enter the ID I gave you earler in the URL/Commit ID

Click Save.

Now, when the page returns you will see the option to Apply Test or Revert, click Test to see if it can apply cleanly. If it says yes then Click Apply. That's it, you can remove the patch by clicking revert.

Hope that helps.

Offline hudriwudri5

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #5 on: December 19, 2017, 12:02:46 pm »
Thank's this helps me!

.... but unfortunately I can't apply
Patch can NOT be applied cleanly (detail)
Patch can NOT be reverted cleanly (detail)

hmmm :-(

Do you think it helps to reinstall it completle new?

marjohh

  • Guest
Re: After upgrade 502 Bad Gateway
« Reply #6 on: December 19, 2017, 02:29:44 pm »
No, see my comment about 2.4.3, you need to switch your repo to the development branch and update to 2.4.3. it's very stable, so there are no issues.

select update, select branch and select the development branch, update and see how you get on then.

Offline ivor

  • Administrator
  • Hero Member
  • *****
  • Posts: 837
  • Karma: +168/-138
    • View Profile
    • Netgate
Re: After upgrade 502 Bad Gateway
« Reply #7 on: December 19, 2017, 02:42:07 pm »
marjohn56 - unless I'm wrong the issue is fixed in the latest pfBlockerNG pacakge. There's no need to add any custom patches.
Need help fast? Commercial support: https://www.netgate.com/support/

marjohh

  • Guest
Re: After upgrade 502 Bad Gateway
« Reply #8 on: December 19, 2017, 02:43:27 pm »
He said in an earlier message the removing pfblocker did not solve the issue

Offline ivor

  • Administrator
  • Hero Member
  • *****
  • Posts: 837
  • Karma: +168/-138
    • View Profile
    • Netgate
Re: After upgrade 502 Bad Gateway
« Reply #9 on: December 19, 2017, 02:43:48 pm »
hudriwudri5 - please try a clean re-install. Latest pfBlockerNG package update should not cause any 502 errors.
Need help fast? Commercial support: https://www.netgate.com/support/

Offline ivor

  • Administrator
  • Hero Member
  • *****
  • Posts: 837
  • Karma: +168/-138
    • View Profile
    • Netgate
Re: After upgrade 502 Bad Gateway
« Reply #10 on: December 19, 2017, 02:44:55 pm »
He said in an earlier message the removing pfblocker did not solve the issue

Some setting might be left. It also might not be related to pfBlockerNG but some other issue, update gone bad, but since we have little or no information, clean re-install is the best option.
Need help fast? Commercial support: https://www.netgate.com/support/

marjohh

  • Guest
Re: After upgrade 502 Bad Gateway
« Reply #11 on: December 19, 2017, 02:49:49 pm »
There were 502 errors that were not pfblocker related, but you know best. I'll stay out of it and let you sort the issue out.

Bye,,, and thanks for all the fish.

Offline lasocean

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #12 on: December 20, 2017, 09:25:18 am »
I am also seing this issue after updating to 2.4.2_1 (from 2.4.2)

Only thing that helps is rebooting.  Then issue recurs after a few minutes.

Restarting PHP-PFM does not help. 
Starting php-pfm indicates 'Bus error (core dumped)
Re-executing Restart PHP-PFM then indicates that pidfile cannon be opened when attempting to kill php-pfm, since php-pfm didn't restart.

After Reboot firewall will indicate that there was crash. 
Crash report was submitted.

Initially, this appeared to also affect OpenVPN Connections, but after reboot OpenVPN connections have remained online, though web interface is inaccessible.

Offline hudriwudri5

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #13 on: December 20, 2017, 11:25:00 am »
I will try it in this order:
1.) reinstall pfBlockerNG
2.) (I've set Keep settings) therefore if it will not work I will deinstall pfBlockerNG without keeping Settings and reinstall it
3.) update to developer branch
4.) clean reinstall

@lasocean:
For me it works with restart PHP-FPM
Then I can click exaktly one time a link - the seconds one hangs. I restart PHP-FPM and I can go forward  - step by step ;-)

I will post the result of my testing


Thank's a lot



edit:
After Step 1 now it seems to work!!!


Thank you all!
« Last Edit: December 20, 2017, 12:40:33 pm by hudriwudri5 »

Offline lasocean

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #14 on: December 20, 2017, 12:10:46 pm »
Just a note...
I am not using pfBlockerNG addon, so that shouldn't be an issue.

No problem until actual login to Web Interface.
Can refresh login page any number of times without actually logging in.
Gonna see how far I can get after logging in a bit.

Offline shortspecialbus

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #15 on: December 20, 2017, 05:48:35 pm »
I don't have pfblocker myself.  My 502 errors seem to start after trying to restart a service, such as bandwidthd (I was trying to get Postgres working before I realized that postgres support isn't available in pfsense's bandwidthd presently.)

I'll look into applying that patch if I continue having issues, so far it's been stable for a few days, but possibly because I've only been looking at things rather than restarting services

Offline lasocean

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #16 on: December 20, 2017, 06:06:31 pm »
I don't know if it's related, but...
I decided not to login to the WebConfigurator until after most users had left for the day.
Immediately after logging in, I removed OpenVPN Widget from the Dashboard, just in case it's something on the dashboard that causing an issue.
I believe that's the only widget I had added to the Dashboard.  But, it's not a recent addition.
I have been able to view different pages without the running into Bad Gateway issue, so far.

All this may be irrelevant.
I will post an update tomorrow re recurrence of the issue.

We have had a couple glitches with provider for WAN link in the last couple days.  Dunno if WAN going down or coming back online triggered issue.

Offline lasocean

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #17 on: December 22, 2017, 02:23:33 pm »
Update
Sometimes receive Bad Gateway Error, but simply refreshing the page will have it load correctly.
If Bad Gateway persists after multiple Refresh attempts, restarting PHP-PFM seems to help.

Browsing and OpenVPN Connections seem to be having difficulty at times.
Sometimes restarting the system helps for a while.

Only started seeing these issues since Patch 1 Update for 2.4.2

Offline chrcoluk

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +25/-50
    • View Profile
Re: After upgrade 502 Bad Gateway
« Reply #18 on: December 23, 2017, 01:21:20 am »
https://forum.pfsense.org/index.php?topic=110515.msg766964#msg766964

More information on what me and Martin worked on, I am hoping my patch which Martin submitted on github got accepted, but maybe it didnt, as the patch should resolve this issue for anyone using pfsense on hardware with at least 1 gig of ram.

--edit--

It has been approved 2 days ago.

https://github.com/pfsense/pfsense/pull/3881
https://redmine.pfsense.org/issues/8125
« Last Edit: December 23, 2017, 01:25:30 am by chrcoluk »
pfSense 2.4
Qotom Q355G4 or Braswell N3150 with Jetway mini pcie 2x intel i350 lan - 4 gig Kingston 1333 C11 DDR3L
 - 60 gig kingston ssdnow ssd - ISP Sky UK