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

    Latest snap NTP issues

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    13 Posts 5 Posters 3.3k 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.
    • X Offline
      xbipin
      last edited by

      i applied the recent patch and rebooted but even after doing so, i dont get the error but under system->NTP it keeps saying
      No peers found, is the ntp service running?.

      1 Reply Last reply Reply Quote 0
      • J Offline
        jcyr
        last edited by

        Yep, broken here too. Even after manually fixing the is_validpid call in system.inc

        2.1-BETA1 (i386)
        built on Sat Feb 9 23:07:50 EST 2013
        FreeBSD 8.3-RELEASE-p5

        Looking at:

        [2.1-BETA1][root@srvrrouter.dillobits.lan]/etc/inc(5): cat /var/etc/ntpd.conf

        pfSense ntp configuration file

        tinker panic 0

        Upstream Servers

        enable monitor
        enable stats
        statistics clockstats
        statsdir /var/log/ntp
        logconfig =syncall +clockall
        driftfile /var/db/ntpd.drift
        restrict default kod nomodify notrap nopeer
        restrict -6 default kod nomodify notrap nopeer
        interface ignore all
        interface listen em1
        [2.1-BETA1][root@srvrrouter.dillobits.lan]/etc/inc(6):

        No servers are defined, eventhough they are specified on the System->General Setup page

        IPV6 Test: http://ipv6-test.com

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

          Just pushed a fix, gitsync or wait for a new snap dated after this post.

          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
          • J Offline
            jcyr
            last edited by

            Yes, commit 3289b42 fixes the problem but…

            Any changes made to the timeserver list requires a reboot. The kill and restart stuff for ntpd in /etc/inc/system.inc does not seem to work!

            After such a change /var/etc/ntp.conf is correctly updated, but an 'ntpq -c peers' at the command line shows the old upstream servers.

            The -p parameter seems to be missing from the boot time ntpd startup

            [2.1-BETA1][root@srvrrouter.dillobits.lan]/root(8): ps -ax | grep ntpd
            45218  ??  Ss     0:00.18 /usr/local/bin/ntpd -g -c /var/etc/ntpd.conf

            So the /var/run/ntpd.pid file is never created, hence the kill fails, and new ntpd sees that its ports are held (by the old ntpd that wasn't killed) and exits!

            IPV6 Test: http://ipv6-test.com

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

              Edit/Save on System > General.
              That's all I had to do.

              Make sure you gitsync again to pull in my last change, the first commit was bad.

              Then ntpq -pn showed all my peers.

              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
              • J Offline
                jcyr
                last edited by

                Err… no

                Do an ls on /var/run after a reboot. You'll see there's no valid ntpd.pid there. So the kill code in system.inc after you've recreated the .conf file won't actually kill the running ntpd.

                Sooo... after that when you start ntpd again, it finds port 123 in use (since the initial ntpd is still running) and exits. The old ntpd keeps running with the old .conf file.

                What you need is:

                *** ntpdate_sync_once.sh        Sun Feb 10 22:27:54 2013
                --- ntpdate_sync_once.sh.orig   Sun Feb 10 22:27:05 2013


                *** 29,33 ****

                if [ -f /var/etc/ntpd.conf ]; then
                       echo "Starting NTP Daemon." | /usr/bin/logger -t ntp;
                !       /usr/local/bin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid
                 else
                       echo "NTP configuration file missing, not starting daemon." | /usr/bin/logger -t ntp;
                –- 29,33 ----

                if [ -f /var/etc/ntpd.conf ]; then
                       echo "Starting NTP Daemon." | /usr/bin/logger -t ntp;
                !       /usr/local/bin/ntpd -g -c /var/etc/ntpd.conf
                 else
                       echo "NTP configuration file missing, not starting daemon." | /usr/bin/logger -t ntp;

                This will cause ntpd to create a proper pid file the first time it is launched at boot time. Without this, either the pid file doesn't exist, or it contains an invalid pid number from previous launches.

                IPV6 Test: http://ipv6-test.com

                1 Reply Last reply Reply Quote 0
                • G Offline
                  grandrivers
                  last edited by

                  also cant add more than one server in general page it gives validation errors

                  pfsense plus 25.03 super micro A1SRM-2558F
                  C2558 32gig ECC  60gig SSD

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    jcyr
                    last edited by

                    With Jimp's latest fix, I add multiple servers (separated with spaces) without any problems. Only problem left is the restart issue which I had to patch locally.

                    IPV6 Test: http://ipv6-test.com

                    1 Reply Last reply Reply Quote 0
                    • F Offline
                      fragged
                      last edited by

                      I just updated to snapshot from 10th Feb and NTP shows as running under services, but under Status - NTP it shows "No peers found, is the ntp service running?.". With the last snapshot I was running (5th Feb) I had issues with NTP crashing "Core dumped" if I had multiple NTP servers set in Setup -> General.

                      ntpq -p shows:
                      No association ID's returned

                      1 Reply Last reply Reply Quote 0
                      • F Offline
                        fragged
                        last edited by

                        Updated to  Sun Feb 10 22:07:45 EST and NTP seems to work again. I'm going to monitor it and see if it works with multiple peers.

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          jcyr
                          last edited by

                          Try changing the server list in Setup->General, and see if ntpd picks up the changes.

                          IPV6 Test: http://ipv6-test.com

                          1 Reply Last reply Reply Quote 0
                          • F Offline
                            fragged
                            last edited by

                            @jcyr:

                            Try changing the server list in Setup->General, and see if ntpd picks up the changes.

                            I added a third host/pool to NTP server list and it picked up the change immediately. My Windows workstation had issues syncing to pfSense's NTP before I restarted Win32time, but that's working again too.

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