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

    Wireguard fails after reboot (2.8.0)

    Scheduled Pinned Locked Moved General pfSense Questions
    40 Posts 4 Posters 6.0k Views 3 Watching
    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.
    • stephenw10S Offline
      stephenw10 Netgate Administrator
      last edited by

      They would not be a concern if they appeared once after upgrading. But if they are being continually logged that's problem. Likely something did not upgrade correctly. Usually I would suspect Wireguard itself but you have reinstalled it multiple times.
      What other packages do you have installed there?

      B 1 Reply Last reply Reply Quote 0
      • B Offline
        Buffalo0207 @stephenw10
        last edited by Buffalo0207

        @stephenw10 Here is the list of all the packages I have installed...

        1. acme
        2. Avahi - not enabled as I have recently installed mDNS-Bridge
        3. Cron
        4. mDNS-Bridge
        5. nut
        6. pfBlockerNG-devel
        7. Service_Watchdog
        8. sudo
        9. System_Patches
        10. Wireguard

        Except for Avahi, all other packages are enabled and configured and seem to be working ok.

        In case you need this info too, here are all the services that I have running...

        1. dpinger
        2. kea-dhcp4
        3. kea-dhcp6
        4. mdns-bridge
        5. miniupnpd
        6. ntpd
        7. nut
        8. pfb_dnsbl
        9. pfb_filter
        10. radvd
        11. sshd
        12. syslog
        13. unbound
          14 - wireguard

        Would you like me to send you my configuration file download?

        1 Reply Last reply Reply Quote 0
        • stephenw10S Offline
          stephenw10 Netgate Administrator
          last edited by

          Do you see any errors when you reinstall WG?

          If you look in /conf you should see the pkg_log file for fro the last install.

          B 1 Reply Last reply Reply Quote 0
          • M Offline
            Misterb @Buffalo0207
            last edited by

            @Buffalo0207 Try restarting dpinger followed by starting wireguard.

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              Buffalo0207 @Misterb
              last edited by

              @Misterb Thanks - that semi worked. Although WG still stops after a reboot, by restarting dpinger, I no longer need to reinstall the WG package as the 'restart service' tab works.

              M 1 Reply Last reply Reply Quote 0
              • B Offline
                Buffalo0207 @stephenw10
                last edited by

                @stephenw10 The only errors I see are the php errors.

                pkg_log_pfSense-pkg-WireGuard.txt

                1 Reply Last reply Reply Quote 0
                • stephenw10S Offline
                  stephenw10 Netgate Administrator
                  last edited by

                  Hmm, when it stops and fails to start when you try to start it manually do you see anything logged then?

                  I can't replicate that on anything I have here.

                  Try running pkg upgrade and see if it offers any upgrades. Something may not have upgraded.

                  B 1 Reply Last reply Reply Quote 0
                  • B Offline
                    Buffalo0207 @stephenw10
                    last edited by Buffalo0207

                    @stephenw10 When it stops and fails to start and then I try to start it manually there are no new pkg_log files. The WG pkg_log file remains on the date 13/08/25. Even when I reinstall the WG package, the log remains the same.

                    I did, however, get the following error...

                    check_upgrade: "Updating repositories metadata" returned error code 1 @ 2025-08-16 00:22:12

                    BTW - yesterday, I reinstalled all 10 packages, in case something hadn't installed correctly.

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S Offline
                      stephenw10 Netgate Administrator
                      last edited by

                      Yes you won't see anything in the pkg_log, that only covers the pkg install, but I'd expect to see something logged in the main log. For example when I restart it I see in the main log:

                      Aug 16 02:15:46 	php-fpm 	77985 	/status_services.php: The command '/usr/local/etc/rc.d/wireguardd stop' returned exit code '1', the output was ''
                      Aug 16 02:15:47 	kernel 		wg0: changing name to 'tun_wg0'
                      Aug 16 02:15:47 	kernel 		tun_wg0: link state changed to UP
                      Aug 16 02:15:47 	php_wg 	19350 	/usr/local/pkg/wireguard/includes/wg_service.inc: Gateway, none 'available' for inet6, use the first one configured. 'GIF0_TUNNELV6' 
                      

                      If any of those things failed with an error I'd expect to see that there too.

                      B 1 Reply Last reply Reply Quote 0
                      • M Offline
                        Misterb @Buffalo0207
                        last edited by

                        @Buffalo0207 The problem seems to be remarkably similar to one discussed in 2023 Wireguard Site-to-Site Gateways disabled after reboot - service not starting

                        B 1 Reply Last reply Reply Quote 0
                        • B Offline
                          Buffalo0207 @stephenw10
                          last edited by

                          @stephenw10 Can you tell me exactly where the main log is and I will download it for you. I also have WinSCP, so can access it from there if this is easier.

                          1 Reply Last reply Reply Quote 0
                          • B Offline
                            Buffalo0207 @Misterb
                            last edited by

                            @Misterb Thanks for this. I will add a cron job to automatically install the WG package.

                            1 Reply Last reply Reply Quote 0
                            • stephenw10S Offline
                              stephenw10 Netgate Administrator
                              last edited by

                              It should appear in the main system log in Status > System Logs > System > General. For example:
                              Screenshot from 2025-08-17 15-58-07.png

                              B 1 Reply Last reply Reply Quote 0
                              • B Offline
                                Buffalo0207 @stephenw10
                                last edited by

                                @stephenw10 This is immediately after I rebooted without reinstalling WG. Let me know if you need another one after WG has been reinstalled.

                                EaseUS_2025_08_18_01_32_52.png

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S Offline
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  So what new logs appear there if you try to start WG when it fails?

                                  B 1 Reply Last reply Reply Quote 0
                                  • B Offline
                                    Buffalo0207 @stephenw10
                                    last edited by Buffalo0207

                                    @stephenw10 This is immediately after I tried restarting WG (and fails) from the UI Service Status page, without restarting dpinger.

                                    EaseUS_2025_08_18_02_00_48.png

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S Offline
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      Hmm, that was some time it booted?

                                      It's triggering a bunch of rc.bootup events which seems odd. Perhaps you have something preventing it ever reaching 'bootup complete'.

                                      Do you see 'bootup complete' in the system logs after booting?

                                      Do you see /var/run/booting still present?

                                      B 1 Reply Last reply Reply Quote 0
                                      • B Offline
                                        Buffalo0207 @stephenw10
                                        last edited by

                                        @stephenw10 Can you tell me exactly where I can see this information?

                                        1 Reply Last reply Reply Quote 0
                                        • stephenw10S Offline
                                          stephenw10 Netgate Administrator
                                          last edited by

                                          Bootup Complete should appear in the main system log like:
                                          Screenshot from 2025-08-20 15-17-33.png

                                          You can check the boot file from the CLI like:

                                          [2.8.0-RELEASE][admin@t70.stevew.lan]/root: ls /var/run
                                          charon.ctl                                      ld-elf.so.hints
                                          charon.pid                                      ld-elf32.so.hints
                                          charon.vici                                     log
                                          charon.wlst                                     logpriv
                                          check_reload_status                             miniupnpd.pid
                                          cron.pid                                        nginx-webConfigurator.pid
                                          daemon-charon.pid                               ntpd.pid
                                          daemon_sshguard.pid                             openvpn_server1.pid
                                          devd.pid                                        pfSense_version
                                          devd.pipe                                       pfSense_version.rc
                                          devd.seqpacket.pipe                             php-fpm.pid
                                          dhclient.igb0.pid                               php-fpm.socket
                                          dmesg.boot                                      ping_hosts.pid
                                          dnsbl.pid                                       powerd.pid
                                          dnsmasq.pid                                     sshd.pid
                                          dpinger_VTI0_VTIV4~10.66.11.1~10.66.11.2.pid    sshguard.pid
                                          dpinger_VTI0_VTIV4~10.66.11.1~10.66.11.2.sock   suricata-ctrl-socket-60565
                                          dpinger_WAN_DHCP~172.21.16.239~172.21.16.1.pid  suricata_igb160565.pid
                                          dpinger_WAN_DHCP~172.21.16.239~172.21.16.1.sock syslog.pid
                                          expire_accounts.pid                             unbound.pid
                                          filter_reload_status                            update_alias_url_data.pid
                                          filterdns.pid                                   updaterrd.sh.pid
                                          filterlog.pid                                   utmp
                                          ipsec_keepalive.pid                             utx.active
                                          
                                          B 1 Reply Last reply Reply Quote 0
                                          • B Offline
                                            Buffalo0207 @stephenw10
                                            last edited by

                                            @stephenw10 Sorry for the delayed reply - I have just got back from a business trip. Anyway, this is the output from the CLI

                                            [2.8.1-RC][root@pfSense.mymain.local]/root: ls /var/run
                                            check_reload_status
                                            cron.pid
                                            daemon_sshguard.pid
                                            devd.pid
                                            devd.pipe
                                            devd.seqpacket.pipe
                                            dhclient.igb0.pid
                                            dmesg.boot
                                            dnsbl.pid
                                            dpinger_VPNUNLIMITED_L2TP~10.240.0.2~10.240.0.1.pid
                                            dpinger_VPNUNLIMITED_L2TP~10.240.0.2~10.240.0.1.sock
                                            dpinger_WANV6_TUNNELV6~2001:470:1f08:84a::2~2001:470:1f08:84a::1.pid
                                            dpinger_WANV6_TUNNELV6~2001:470:1f08:84a::2~2001:470:1f08:84a::1.sock
                                            dpinger_WAN_DHCP~82.13.203.142~82.13.202.1.pid
                                            dpinger_WAN_DHCP~82.13.203.142~82.13.202.1.sock
                                            dpinger_wg1GW~10.102.1.114~10.102.1.114.pid
                                            dpinger_wg1GW~10.102.1.114~10.102.1.114.sock
                                            dpinger_wg2GW~10.102.100.206~10.102.100.206.pid
                                            dpinger_wg2GW~10.102.100.206~10.102.100.206.sock
                                            expire_accounts.pid
                                            filter_reload_status
                                            filterlog.pid
                                            ipsec_keepalive.pid
                                            kea
                                            kea2fib6.cache
                                            kea4-ctrl-socket
                                            kea4-ctrl-socket.lock
                                            kea6-ctrl-socket
                                            kea6-ctrl-socket.lock
                                            l2tp_opt9.pid
                                            ld-elf.so.hints
                                            ld-elf32.so.hints
                                            log
                                            logpriv
                                            mdns-bridge.pid
                                            miniupnpd.pid
                                            nginx-webConfigurator.pid
                                            ntpd.pid
                                            pfSense_version
                                            pfSense_version.rc
                                            php-fpm.pid
                                            php-fpm.socket
                                            ping_hosts.pid
                                            radvd.pid
                                            sshd.pid
                                            sshguard.pid
                                            syslog.pid
                                            unbound.pid
                                            update_alias_url_data.pid
                                            updaterrd.sh.pid
                                            utmp
                                            utx.active
                                            wireguardd.pid
                                            [2.8.1-RC][root@pfSense.mymain.local]/root: [2.8.1-RC][root@pfSense.mymain.local]/root: ls /var/run
                                            kea4-ctrl-socket.lock
                                            kea6-ctrl-socket
                                            kea6-ctrl-socket.lock
                                            l2tp_opt9.pid
                                            [2.8.1-RC][root@pfSense.mymain.local]/root:: Too many arguments.
                                            [2.8.1-RC][root@pfSense.mymain.local]/root: check_reload_status
                                            ld-elf.so.hints
                                            ld-elf32.so.hints
                                            log
                                            logpriv
                                            mdns-bridge.pid
                                            miniupnpd.pid
                                            nginx-webConfigurator.pid
                                            ntpd.pid
                                            pfSense_version
                                            pfSense_version.rc
                                            php-fpm.pid
                                            php-fpm.socket
                                            ping_hosts.pid
                                            radvd.pid
                                            sshd.pid
                                            sshguard.pid
                                            syslog.pid
                                            unbound.pid
                                            update_alias_url_data.pid
                                            updaterrd.sh.pid
                                            utmp
                                            utx.active
                                            wireguardd.pid

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