Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am experiencing similar issues. I have a fresh Ubuntu 12.04 server and installed ntp and ntpdate.
Now when I run:
Code:
service ntp status
I get
Code:
* NTP server is not running
When
Code:
service ntp restart
I get
Code:
* Stopping NTP server ntpd
start-stop-daemon: warning: failed to kill 25164: No such process
[ OK ]
* Starting NTP server ntpd [ OK ]
When I check the status it is still not running
Code:
* NTP server is not running
When I try
Code:
ntpq -pn
I get
Code:
ntpq: read: Connection refused
Here is the content of /etc/ntpd.conf
Code:
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
# statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# Specify one or more NTP servers.
# Use servers from the NTP Pool Project.
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
Thanks Robert for getting back to me. Here is the output sequence that I get in /var/log/syslog just after restarting the service. It seems that the last 2 lines are where the problem resides (segmentation fault). No idea why that is though.
Dec 6 18:15:07 ******** ntpd[28292]: ntpd 4.2.6p3@1.2290-o Tue Jun 5 20:12:08 UTC 2012 (1)
Dec 6 18:15:07 ******** ntpd[28293]: proto: precision = 0.108 usec
Dec 6 18:15:07 ******** ntpd[28293]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Dec 6 18:15:07 ******** ntpd[28293]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Dec 6 18:15:07 ******** ntpd[28293]: Listen and drop on 1 v6wildcard :: UDP 123
Dec 6 18:15:07 ******** ntpd[28293]: Listen normally on 2 lo 127.0.0.1 UDP 123
Dec 6 18:15:07 ******** ntpd[28293]: Listen normally on 3 eth0 37.59.xxx.xxx UDP 123
Dec 6 18:15:07 ******** ntpd[28293]: Listen normally on 4 eth0:0 87.98.xxx.xxx UDP 123
Dec 6 18:15:07 ******** ntpd[28293]: Listen normally on 5 eth0 fe80::4e72:b9ff:xxxx:xxxx UDP 123
Dec 6 18:15:07 ******** ntpd[28293]: Listen normally on 6 eth0 2001:41d0:xxxx:xxxx::1 UDP 123
Dec 6 18:15:07 ******** ntpd[28293]: Listen normally on 7 lo ::1 UDP 123
Dec 6 18:15:07 ******** ntpd[28293]: peers refreshed
Dec 6 18:15:07 ******** ntpd[28293]: Listening on routing socket on fd #24 for interface updates
Dec 6 18:15:09 ******** ntpd[28293]: Deleting interface #7 lo, ::1#123, interface stats: received=0, sent=0, dropped=0, active_time=2 secs
Dec 6 18:15:09 ******** ntpd[28293]: Deleting interface #6 eth0, 2001:41d0:xxxx:xxxx::1#123, interface stats: received=0, sent=0, dropped=0, active_time=2 secs
Dec 6 18:15:09 ******** ntpd[28293]: 2001:4b98:dc0:47:216:3eff:xxxx:xxxx interface 2001:41d0:xxxx:xxxx::1 -> (none)
Dec 6 18:15:09 ******** kernel: ntpd[28293]: segfault at 8 ip 00007f29dc285e5e sp 00007fffddea9890 error 4 in ntpd[7f29dc268000+97000]
Dec 6 18:15:09 ******** kernel: grsec: From 109.128.209.161: Segmentation fault occurred at 0000000000000008 in /usr/sbin/ntpd[ntpd:28293] uid/euid:106/106 gid/egid:110/110, parent /sbin/init[init:1] uid/euid
Dec 6 18:15:09 ******** kernel: ntpd[28293]: segfault at 8 ip 00007f29dc285e5e sp 00007fffddea9890 error 4 in ntpd[7f29dc268000+97000]
Dec 6 18:15:09 ******** kernel: grsec: From 109.128.209.161: Segmentation fault occurred at 0000000000000008 in /usr/sbin/ntpd[ntpd:28293] uid/euid:106/106 gid/egid:110/110, parent /sbin/init[init:1] uid/euid
You're running some grsec patched kernel? Maybe thats your issue. I'm refering to this: http://grsecurity.net/. Maybe you should configure your system or switch the kernel to something without the grsec patches.
Thanks again for the reply. I am relatively new to Linux, so about the grsec patch I presume but I don't know. This is a dedicated server from OVH and comes with an Ubuntu 12.04 installation. Do you have any idea how I could configure grsec?
Here is the output of the uname -a command:
Linux xxxxxxxxx.com 3.2.13-grsec-xxxx-grs-ipv6-64 #1 SMP Thu Mar 29 09:48:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Yep, you have a patched kernel with grsec patches. You should read online how to setup it up. If it's a dedicated server then you can always installed a Ubuntu vanilla kernel (without the grsec patches).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.