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

flock() error after upgrading

Scheduled Pinned Locked Moved Plus 23.01 Development Snapshots (Retired)
49 Posts 8 Posters 4.8k 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.
  • M
    Maff @stephenw10
    last edited by Maff Feb 4, 2023, 10:03 PM Feb 4, 2023, 9:50 PM

    @stephenw10

    just for testing i have concluded nothing i have configured or installed is causing this

    just gone through a fresh hard drive in my hardware, pfsense 2.6ce installed, upgraded to 22.01, upgrade to 22.05 upgrade to 23.01rc and error is there

    another fresh hard drive, 2.6ce installed, upgrade to 22.01 then straight to 23.01rc and the error is there

    Only things configured was wan connection and basic default lan

    1 Reply Last reply Reply Quote 0
    • M
      Maff
      last edited by Maff Feb 4, 2023, 10:12 PM Feb 4, 2023, 9:57 PM

      Am also kinda a novice when it comes to Linux etc, alway trying to learn, I am not sure what I am looking for in the output of that command

      Was a lot of things flashing up constantly but didn’t see any refresh to anything in the error output

      S 1 Reply Last reply Feb 4, 2023, 11:05 PM Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by Feb 4, 2023, 10:33 PM

        Ah, interesting. So this appears to be something hardware or network related.

        What are you running this on? How is the network setup that it's connected to?

        M 1 Reply Last reply Feb 4, 2023, 10:39 PM Reply Quote 0
        • M
          Maff @stephenw10
          last edited by Maff Feb 4, 2023, 10:44 PM Feb 4, 2023, 10:39 PM

          @stephenw10

          Running on a Lenovo m720q with a intel 9500t cpu, 16 gig of ram, network card is intel x710-t2l

          Port one is dhcp setup to cable modem in modem mode 2.5gbs link

          Port 2 is the basic lan setup you go through when installing pfsense 10gb link

          Not noticed any issue with this hardware on 22.05

          Maybe some form of sensor not working right in the new kernel?

          1 Reply Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @Maff
            last edited by Feb 4, 2023, 11:05 PM

            @maff said in flock() error after upgrading:

            Linux

            FreeBSD in this case 😉
            top shows running processes.

            Question: does it happen if you're NOT displaying the dashboard? Logged out of the web GUI?

            Is the config file on disk growing in size or changing time stamps? (/conf/config.xml)

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote 👍 helpful posts!

            1 Reply Last reply Reply Quote 1
            • S
              stephenw10 Netgate Administrator
              last edited by Feb 5, 2023, 12:49 AM

              Mmm, that's a good question. Something that could be configured to update once a minute like that might be a dashboard widget.

              1 Reply Last reply Reply Quote 0
              • J
                jimp Rebel Alliance Developer Netgate
                last edited by Feb 6, 2023, 2:09 PM

                Does anyone seeing this have some kind of off-firewall monitoring system that probes the firewall once per minute? Maybe some kind of third party integration / tacked on "API" that is leveraging xmlrpc.php?

                Nothing in the base system queries that file except for HA sync, and HA sync would not be triggered that often.

                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!

                B 1 Reply Last reply Feb 6, 2023, 2:12 PM Reply Quote 0
                • B
                  blathierry @jimp
                  last edited by Feb 6, 2023, 2:12 PM

                  @jimp I use the home assistant integration and uptime kuma. Is that causing it?

                  R 1 Reply Last reply Feb 6, 2023, 2:46 PM Reply Quote 0
                  • S
                    stephenw10 Netgate Administrator
                    last edited by Feb 6, 2023, 2:24 PM

                    How is that querying? SNMP? Some plugin code?

                    B 1 Reply Last reply Feb 6, 2023, 2:27 PM Reply Quote 0
                    • S
                      stephenw10 Netgate Administrator
                      last edited by Feb 6, 2023, 2:26 PM

                      Yeah, it almost certainly is that. See: https://forum.netgate.com/post/1081590

                      1 Reply Last reply Reply Quote 0
                      • B
                        blathierry @stephenw10
                        last edited by Feb 6, 2023, 2:27 PM

                        @stephenw10 https://github.com/travisghansen/hass-pfsense

                        1 Reply Last reply Reply Quote 0
                        • J
                          jimp Rebel Alliance Developer Netgate
                          last edited by Feb 6, 2023, 2:28 PM

                          Drop to a shell and run tail -F /var/log/nginx.log and watch a bit and see what is hitting xmlrpc.php and trace back from there. You could also grep through the older log entries to see.

                          You can also look at / search the log from the GUI (Status > System Logs, System tab, GUI Service sub-tab), but doing so can be tricky since accessing the GUI will add more entries to the log potentially pushing the older entries off.

                          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
                          • R
                            renegade @blathierry
                            last edited by Feb 6, 2023, 2:46 PM

                            @blathierry said in flock() error after upgrading:

                            @jimp I use the home assistant integration and uptime kuma. Is that causing it?

                            Interesting! I use the HA Integration also!
                            But from my understanding the integration polls the status every 30 seconds. The error seems to occur more often than every 30 seconds.

                            1 Reply Last reply Reply Quote 0
                            • S
                              stephenw10 Netgate Administrator
                              last edited by Feb 6, 2023, 2:46 PM

                              I note that code saw updates as recently as today. Are you running the current version?

                              B 1 Reply Last reply Feb 6, 2023, 5:51 PM Reply Quote 0
                              • J
                                jimp Rebel Alliance Developer Netgate
                                last edited by Feb 6, 2023, 4:19 PM

                                Anyone hitting this, try installing the System Patches package and then create an entry for 053f60e56d09ba711af245c7f0ce6a06673ccc89 to apply the fix.

                                Or apply this diff/change by hand:

                                diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc
                                index f838f6b540..2636fb4aec 100644
                                --- a/src/etc/inc/util.inc
                                +++ b/src/etc/inc/util.inc
                                @@ -169,12 +169,13 @@ function try_lock($lock, $timeout = 5) {
                                 }
                                 
                                 /* unlock configuration file */
                                -function unlock($cfglckkey = 0) {
                                -	if (!is_null($cfglckkey)) {
                                -		@flock($cfglckkey, LOCK_UN);
                                -		@fclose($cfglckkey);
                                -	}
                                -	return;
                                +function unlock($cfglckkey = 0)
                                +{
                                +	if (!is_resource($cfglckkey))
                                +		return;
                                +
                                +	flock($cfglckkey, LOCK_UN);
                                +	fclose($cfglckkey);
                                 }
                                 
                                 /* unlock forcefully configuration file */
                                

                                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!

                                M 1 Reply Last reply Feb 6, 2023, 5:28 PM Reply Quote 2
                                • M
                                  Maff @jimp
                                  last edited by Feb 6, 2023, 5:28 PM

                                  @jimp

                                  Thanks for looking further into this, needed a break from messing around, will test this later and I completely forgot about the home assistant project I was looking into, will test this soon as I can

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    blathierry @stephenw10
                                    last edited by Feb 6, 2023, 5:51 PM

                                    @stephenw10 Yeah, newest version still does it sadly. I updated both of them. I disabled the home assistant integration for now.. I hope the maintainer will fix it soon, it's very unexpected.

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      stephenw10 Netgate Administrator
                                      last edited by Feb 6, 2023, 6:06 PM

                                      Try the diff above. What the HA integration is doing should work with that. They are just hitting a code path that pfSense never normally does. It isn't necessarily wrong, something that needs updating.

                                      1 Reply Last reply Reply Quote 1
                                      • J
                                        jimp Rebel Alliance Developer Netgate
                                        last edited by Feb 7, 2023, 12:47 AM

                                        I spun up a Home Assistant VM, setup HACS and added the pfSense integration. Pointed it at a 23.01 install and immediately saw the errors in question. Applied the lock patch above and haven't seen a single error since.

                                        Looks good to me. It should be in the next build.

                                        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!

                                        B 1 Reply Last reply Feb 8, 2023, 1:57 AM Reply Quote 2
                                        • S
                                          stephenw10 Netgate Administrator
                                          last edited by Feb 7, 2023, 12:54 AM

                                          Nice. 😁

                                          1 Reply Last reply Reply Quote 0
                                          37 out of 49
                                          • First post
                                            37/49
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received