Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    New 502 Bad Gateway

    Scheduled Pinned Locked Moved 2.4 Development Snapshots
    281 Posts 67 Posters 238.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      PiBa
      last edited by

      @rightnow, and anyone else having 502 issues.
      Please do gather the requested information from:
      https://forum.pfsense.org/index.php?topic=137103.msg753994#msg753994
      (if console doesn't respond Ctrl+Z and start /bin/tcsh then get the information.)

      1 Reply Last reply Reply Quote 0
      • N Offline
        ntct
        last edited by

        I also have 502 Bad Gateway on pfSense 2.4 and pfblockerng 2.1.2…... :-\

        output.txt

        1 Reply Last reply Reply Quote 0
        • BordiB Offline
          Bordi
          last edited by

          I also have. Work with v.2.4.1 ..

          1 Reply Last reply Reply Quote 0
          • H Offline
            hdejongh
            last edited by

            hee Jim,

            https://pastebin.com/JVMQTWbY

            bad gateway 502 issue

            1 Reply Last reply Reply Quote 0
            • A Offline
              akong
              last edited by

              I have get 502 Bad Gateway and use pfsense 2.4.0 pfblockerng 2.1.2
              How to fix it?

              1 Reply Last reply Reply Quote 0
              • jimpJ Offline
                jimp Rebel Alliance Developer Netgate
                last edited by

                @hdejongh:

                hee Jim,

                https://pastebin.com/JVMQTWbY

                bad gateway 502 issue

                That looks like it was taken just after a reboot, not when the problem was happening. No sign of anything getting backed up in there.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • jimpJ Offline
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  @ntct:

                  I also have 502 Bad Gateway on pfSense 2.4 and pfblockerng 2.1.2…... :-\

                  And judging by the output, it's still DNSBL getting backed up.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    PiBa
                    last edited by

                    @jimp:

                    @ntct:

                    I also have 502 Bad Gateway on pfSense 2.4 and pfblockerng 2.1.2…... :-\

                    And judging by the output, it's still DNSBL getting backed up.

                    That why the report of @rightnow would be interesting. As he has this error without any packages installed. Makes me wonder if some other component causes (part of) the problem, and maybe pfBlocker is just the most visible to suffer from that 'defect'.

                    1 Reply Last reply Reply Quote 0
                    • jimpJ Offline
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      @PiBa:

                      That why the report of @rightnow would be interesting. As he has this error without any packages installed. Makes me wonder if some other component causes (part of) the problem, and maybe pfBlocker is just the most visible to suffer from that 'defect'.

                      If that were the case there should be some other sign of stress on the PHP-FPM socket, and there isn't. Most likely it's a completely unrelated problem that happens to present with one common symptom.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        Hans_P
                        last edited by

                        @jimp:

                        @PiBa:

                        That why the report of @rightnow would be interesting. As he has this error without any packages installed. Makes me wonder if some other component causes (part of) the problem, and maybe pfBlocker is just the most visible to suffer from that 'defect'.

                        If that were the case there should be some other sign of stress on the PHP-FPM socket, and there isn't. Most likely it's a completely unrelated problem that happens to present with one common symptom.

                        It has started becoming an issue for me again.  I have attached my outputs as requested.

                        Netgate Sg-4860
                        Ver. 2.4.0
                        pfBlocker
                        Ver. 2.1.2

                        [pfSense Freeze.txt](/public/imported_attachments/1/pfSense Freeze.txt)

                        1 Reply Last reply Reply Quote 0
                        • JailerJ Offline
                          Jailer
                          last edited by

                          @jimp:

                          @PiBa:

                          That why the report of @rightnow would be interesting. As he has this error without any packages installed. Makes me wonder if some other component causes (part of) the problem, and maybe pfBlocker is just the most visible to suffer from that 'defect'.

                          If that were the case there should be some other sign of stress on the PHP-FPM socket, and there isn't. Most likely it's a completely unrelated problem that happens to present with one common symptom.

                          If thats the case I’m curious as to why a ZFS install mitigates it?

                          1 Reply Last reply Reply Quote 0
                          • A Offline
                            ak
                            last edited by

                            @PiBa:

                            @jimp:

                            @ntct:

                            I also have 502 Bad Gateway on pfSense 2.4 and pfblockerng 2.1.2…... :-\

                            And judging by the output, it's still DNSBL getting backed up.

                            That why the report of @rightnow would be interesting. As he has this error without any packages installed. Makes me wonder if some other component causes (part of) the problem, and maybe pfBlocker is just the most visible to suffer from that 'defect'.

                            I did a fresh install of 2.4 and had pfblockerng with the issue. I didn't come on the forum so didn't know of the instructions to get log details.

                            However, I disabled pfblockerng and have not had a lock up for over 24 hours. Let me run without pfblockerng for a bit more then switch it back on and see.

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              msvuze
                              last edited by

                              mine crashes right away if enabled but with pfblockerng disabled it crashes a lot later like 24-28 hrs after.

                              Is this fixed if I select the developer update ? or is this still a work in progress>

                              1 Reply Last reply Reply Quote 0
                              • P Offline
                                PiBa
                                last edited by

                                @msvuze:

                                mine crashes right away if enabled but with pfblockerng disabled it crashes a lot later like 24-28 hrs after.

                                Is this fixed if I select the developer update ? or is this still a work in progress>

                                If you have this same issue with pfBlocker and DNSbl disabled, then please provide the information requested to see if it is really the same behavior in the background, that might help tell what causes it. And once the root cause is known, a fix can be made, not before..

                                1 Reply Last reply Reply Quote 0
                                • BBcan177B Offline
                                  BBcan177 Moderator
                                  last edited by

                                  As per jimp's suggestion, please try these two patched files which use a pfSense function called try_lock() as opposed to flock().

                                  Run the following commands to download the patched version of the two files from my Github Gist:

                                  fetch -o /usr/local/www/pfblockerng/www/index.php "https://gist.githubusercontent.com/BBcan177/9f9c8e62b166cee07ad16cd4ff59103c/raw"
                                  fetch -o /usr/local/pkg/pfblockerng/pfblockerng.inc "https://gist.githubusercontent.com/BBcan177/7ff15715be0f02afdbe0a00c676aedce/raw"
                                  

                                  Recommend a reboot after downloading the patches.

                                  You can review the Gist revisions here:

                                  index.php
                                      https://gist.github.com/BBcan177/9f9c8e62b166cee07ad16cd4ff59103c/revisions

                                  pfblockerng.inc
                                      https://gist.github.com/BBcan177/7ff15715be0f02afdbe0a00c676aedce/revisions

                                  Note: The try_lock() function calls might require increasing the timeout setting from the default setting of "5" (seconds)

                                  "Experience is something you don't get until just after you need it."

                                  Website: http://pfBlockerNG.com
                                  Twitter: @BBcan177  #pfBlockerNG
                                  Reddit: https://www.reddit.com/r/pfBlockerNG/new/

                                  1 Reply Last reply Reply Quote 0
                                  • BBcan177B Offline
                                    BBcan177 Moderator
                                    last edited by

                                    Made a couple changes to the code… So if you have downloaded these files prior to this post, please re-download the same URLs above to get the new changes.... Thanks!

                                    "Experience is something you don't get until just after you need it."

                                    Website: http://pfBlockerNG.com
                                    Twitter: @BBcan177  #pfBlockerNG
                                    Reddit: https://www.reddit.com/r/pfBlockerNG/new/

                                    1 Reply Last reply Reply Quote 0
                                    • N Offline
                                      ntct
                                      last edited by

                                      @BBcan177:

                                      Made a couple changes to the code… So if you have downloaded these files prior to this post, please re-download the same URLs above to get the new changes.... Thanks!

                                      Hi BBcan177

                                      Can you make a PR?

                                      1 Reply Last reply Reply Quote 0
                                      • BBcan177B Offline
                                        BBcan177 Moderator
                                        last edited by

                                        Added some temp file removal to the patches. So please re-download this new code if you have downloaded these files prior to this post, please re-download the same URLs above to get the new changes…. Thanks!

                                        A reboot is recommended following these patches.

                                        Once the code has been tested, I will submit this as a PR.

                                        Please report back your feedback.

                                        Thanks!

                                        "Experience is something you don't get until just after you need it."

                                        Website: http://pfBlockerNG.com
                                        Twitter: @BBcan177  #pfBlockerNG
                                        Reddit: https://www.reddit.com/r/pfBlockerNG/new/

                                        1 Reply Last reply Reply Quote 0
                                        • H Offline
                                          hdejongh
                                          last edited by

                                          @jimp:

                                          @hdejongh:

                                          hee Jim,

                                          https://pastebin.com/JVMQTWbY

                                          bad gateway 502 issue

                                          That looks like it was taken just after a reboot, not when the problem was happening. No sign of anything getting backed up in there.

                                          Hee Jim,

                                          im 99,99999% certain the issue was happening at that time.
                                          Ill do it again.

                                          this one is from an other firewall.
                                          it hangs on "sockstat" 15 minutes now so i think those wont come anymore.

                                          https://pastebin.com/Ek9R0qkh

                                          1 Reply Last reply Reply Quote 0
                                          • H Offline
                                            ha11oga11o
                                            last edited by

                                            Here is more data with 502 err:

                                            https://pastebin.com/TqSBTKEK

                                            OpenVPN clients cannot connect also, which is mine major problem for now.

                                            hope will help.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.