LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-06-2012, 10:54 AM   #1
goldmine
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Rep: Reputation: Disabled
Unhappy Problems trying to syncronize with NTP server


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
Any help will be very much appreciated!
 
Old 12-06-2012, 03:38 PM   #2
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Whats the output of /var/log/syslog when you try to restart or start ntp?
 
Old 12-07-2012, 06:10 AM   #3
goldmine
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 12-07-2012, 06:53 AM   #4
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Here is your problem:

Code:
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.
 
Old 12-07-2012, 08:09 AM   #5
goldmine
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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?
 
Old 12-07-2012, 08:13 AM   #6
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Get the output of "uname -a" command.
 
Old 12-07-2012, 09:39 AM   #7
goldmine
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 12-07-2012, 11:39 AM   #8
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
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).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Help Me!!!] syncronize LDAP server and Mail server (Communigate PRO) baytot Linux - Server 2 05-19-2010 04:52 PM
Problems setting up a NTP Server on Ubuntu Server 9.04 mikesmith20001 Linux - Server 1 08-10-2009 10:14 AM
ntp server/client problems procfs Linux - Newbie 7 12-27-2007 02:37 AM
Backup / syncronize from linux server to xp client when user logout henrnorl Linux - Server 6 06-05-2007 01:32 AM
Syncronize directories between server and laptop Yalla-One Linux - Software 1 03-29-2005 03:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration