Bug 210064 - ntpd in base crashes upon startup
Summary: ntpd in base crashes upon startup
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-06 03:04 UTC by Bob
Modified: 2016-06-06 21:06 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob 2016-06-06 03:04:35 UTC
I run NTP via ports. After a security alert from freeBSD, I updated the OS. I am running amd64/v 10.3. After the update, I rebooted. Then I got the latest ports via portsnap and used portmaster to update ports. NTP was updted this way. The update had no issues.

I attempted to start NTP. 

root@lily:/usr/home/admin # service ntpd onestart
/etc/rc.conf: YES: not found
/etc/rc.conf: YES: not found
Starting ntpd.
root@lily:/usr/home/admin #

The log (/var/log/messages) was as follows:

Jun  5 18:53:36 lily ntpd[11029]: ntpd 4.2.8p8-a (1): Starting
Jun  5 18:53:37 lily ntpd[11030]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): good hash signature
Jun  5 18:53:37 lily ntpd[11030]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): loaded, expire=2016-12-01T00:00:00Z last=2015-07-01T00:00:00Z ofs=36

But when I tried service ntpd onestatus, I got "ntpd is not running".

I rebuilt the port. No change.
I rebuilt it again with debug turned on. No change in the log.

There were no changes to ntp.conf or any other config file.
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2016-06-06 03:48:11 UTC
ntpd 4.2.8p8-a is not the port. It is base. Check your ntp.conf.

Before you update your rc.conf to point to ntpd in ports, I'd like to understand what is causing your problem with ntpd in base. I'm curious to discover why it's printing,

/etc/rc.conf: YES: not found
/etc/rc.conf: YES: not found

Can you provide output from uname -a and post (or send me) your rc.conf.
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2016-06-06 03:49:44 UTC
Updated version to 11.0-CURRENT until user has provided uname -a output.
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2016-06-06 03:51:02 UTC
(In reply to Cy Schubert from comment #2)
That should have been 10.3-RELEASE. Are you running 10.3-STABLE?
Comment 4 Bob 2016-06-06 04:25:38 UTC
This is rc.conf

# -- sysinstall generated deltas -- # Tue Dec 27 10:13:27 2011
# Created: Tue Dec 27 10:13:27 2011
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
# add this when we move to datacenter
defaultrouter="204.13.164.1"
font8x14="NO"
font8x16="swiss-8x16"
font8x8="swiss-8x8"
hostname="lily.movingasfastasican.com"
ifconfig_em1="inet 204.13.164.153  netmask 255.255.255.0"
ifconfig_em1_alias0="204.13.164.173 netmask 255.255.255.0"
ifconfig_em1_alias1="204.13.164.128 netmask 255.255.255.0"
ifconfig_em1_alias2="204.13.164.129 netmask 255.255.255.0"
inetd_enable="NO"
sshd_enable="YES"
webmin_enable="YES"
apache24_enable="NO"
mysql_enable="YES"
sendmail_enable="NONE"
sendmail_submit_enable="NONE"
sendmail_outbound_enable="NONE"
sendmail_msp_que_enable="NONE"
named_enable="YES"
xntpd_enable="YES"
xntpd_flags="-A -g -N -c /etc/ntp.conf -p /var/run/ntpd.pid -l /var/log/ntp/current"
xntpd_program="/usr/local/bin/ntpd"
monit_enable="YES"
pf_enable="YES"
pflog_enable="YES"
pf_rules="/etc/pf.conf"
sshguard_enable= "YES"

Here is the uname output
root@lily:/usr/home/admin # uname -a
FreeBSD lily.movingasfastasican.com 10.3-RELEASE-p4 FreeBSD 10.3-RELEASE-p4 #0: Sat May 28 12:23:44 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
root@lily:/usr/home/admin #

I am running 10.3 stable.

Also, I get 
/etc/rc.conf: YES: not found
/etc/rc.conf: YES: not found

with most system ..... start/restart commands.
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2016-06-06 19:26:33 UTC
You are running -RELEASE, not -STABLE.

There are a number of issues in your ex.conf. xntpd no longer exists, use xntpd instead. The yes not found messages are due to the last line of f your RC.conf file. Remove the space.

There is no indication of a crash. Can you post a backtrace? Post output of ntpq -c pe.
Comment 6 Bob 2016-06-06 20:01:44 UTC
I don't see the difference between xntpd and xntpd, you said to use the 2nd instead of the first.

However, I see that instead of xntpd it should be ntpd. I made those changes. I also noticed the the rc.conf program file location is wrong too (old) and fixed it to /usr/sbin/ntpd.

I then got an error that only one configfile option is allowed, so I removed the -c argument and file location in the ntpd options line in rc.conf. Now ntp starts and runs correctly. My rc.conf file is quite old as you can guess.

Thanks for the help.
Comment 7 Cy Schubert freebsd_committer freebsd_triage 2016-06-06 21:06:00 UTC
Yes. The second xntpd should have been ntpd (tablet autocorrect).