LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 03-12-2014, 09:52 AM   #1
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Rep: Reputation: Disabled
Aix server time jumps advanced by 1 hour when sync with ntp


Hi,

I have a CentOS 6.4 which will go online is configuredwith NTP server(india pool). I have AIX 6.1 servers which I want to configure as NTP client by giving the IP of my CentOS server. I configured it as NTP client and When I synchronised it with the command ntpdate my AIX server time jumped up by 1 hour and shut my oracle database down.

I have checked my zone timings IST-5:30 in AIX and the same in Centos with Asia/Kolkata. My Linux clients works fine, but AIX time doesn't sync with my NTP Server. Please help me in resolving the issue.
 
Old 03-12-2014, 04:17 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,775

Rep: Reputation: Disabled
First, ensure that the CentOS system is indeed receiving and providing accurate time. You can easily test this by configuring another system (like any random workstation) to sync against the CentOS server.

If the CentOS NTP server passes this test, the problem has to be on the AIX side. Time sync issues are not uncommon on any platform, and they are usually caused by the wrong timezone configuration/definition.
 
Old 03-12-2014, 08:15 PM   #3
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Original Poster
Rep: Reputation: Disabled
Hi,

I have tested it with some servers and desktops and the time sync properly, but in AIX it is not working properly. Even I configured another NTP server and checked the time on both the NTP servers and they are same.Also I notice a peculiar problem of xntpd daemon shutting itself down in 5 minutes. I observed this when i issued the command lssrc it throws the error.

0513-036 The request could not be passed to the xntpd subsystem.
Start the subsystem and try your command again.

So again am restarting xntpd service and it shuts in 5 minutes.
I am not able to figure out why.

Last edited by geekslinux; 03-12-2014 at 08:25 PM.
 
Old 03-13-2014, 05:47 AM   #4
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 503

Rep: Reputation: 189Reputation: 189
Hi,

Besides timezone differences, I've never seen this. Here's a few questions/thoughs/tips that may help troubleshoot this, though.

1. Which AIX version are you running? And which CentOS version?

2. Let's confirm that both systems have the same understanding of the timezones. You can do this by running the following 2 commands on both servers:

Code:
TZ=IST-5:30 date
TZ=Asia/Kolkata date
3. If you want to test from AIX without running the risk of changing the time to an incorrect value (and crashing something), try the ntpdate -q option. This queries the remote server without changing the local time, and shows you the offset by which it would adjust the time.

4. For xntpd crashing, can/did you check whether it is syncing while it is still up? You can check this by running "xntpdc -c peers".

5. You can trace what xntpd is doing, which might help with debugging why it is crashing. Do this by configuring a "tracefile" in /etc/ntp.conf (/etc/ntp.trace by default), and then start xntpd with the "-d" flag (run "startsrc -s xntpd -a -d").

I hope this helps!
 
Old 03-13-2014, 11:04 AM   #5
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Original Poster
Rep: Reputation: Disabled
Hi,

1. Version - AIX 6.1 & CentOS 6.4

2.TZ=IST-5:30 IST in AIX TZ=Asia/Kolkata in CentOS.

4. If I force give ntpdate -d <IP>, AIX server sync the time ahead by 1 hour, when i dont give i could see lssrc -ls xntpd it is not having any value peer and shows system insane and xntpd dies in 5 minutes. But when i force sync using ntpdate lssrc shows my ntp server IP.

5. Nothing is there in trace file, I have even given log file for it. I have given the option startsrc -s xntpd -a "-x". I will try the option what you have given and post the logs.

Thanks for the response.
 
Old 03-14-2014, 02:32 AM   #6
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 503

Rep: Reputation: 189Reputation: 189
Hi,

Quote:
Originally Posted by geekslinux View Post
2.TZ=IST-5:30 IST in AIX TZ=Asia/Kolkata in CentOS.
Could you please run the 2 "date" commands I posted earlier on both servers & post the results? I understand the 2 timezones are used in different places. Both servers should understand both formats, though, and I'm trying to just confirm that they both interpret this the same.

Quote:
Originally Posted by geekslinux View Post
5. Nothing is there in trace file, I have even given log file for it. I have given the option startsrc -s xntpd -a "-x". I will try the option what you have given and post the logs.
"-x" says slew rather than adjust the time. This is a good option to use generally. I'm not sure how it would behave if the difference is an hour, though, and suspect this might even be the reason xntpd terminates. The "-d" option turns on debugging, which should produce some info in your logs.
 
Old 03-14-2014, 02:34 AM   #7
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 503

Rep: Reputation: 189Reputation: 189
Hi again,

Could you run "ntpdate -q <IP>" on the AIX server & post the results, so we can see the offset?

Thanks
 
Old 03-14-2014, 11:11 PM   #8
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Original Poster
Rep: Reputation: Disabled
Hi,

My apologies for the delayed response. PFB.

server 10.30.6.123, stratum 3, offset 3607.250167, delay 0.03331
15 Mar 09:38:43 ntpdate[2294224]: step time server 10.30.6.123 offset 3607.250167

NB. I didnt start the xntpd daemon, since daemon dies in 5 minutes before sync; and if I force update my system clock jumps.

Thanks in advance.

Last edited by geekslinux; 03-18-2014 at 12:46 AM.
 
Old 03-16-2014, 07:44 AM   #9
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 503

Rep: Reputation: 189Reputation: 189
Hi,

This confirms that the client (AIX) thinks there's an hour (3607 seconds) difference between it and the Linux server.

I'm still enclined ot think this must be timezone related. Could you please run the following commands on both servers, and post the results:

Code:
TZ=IST-5:30 date
TZ=Asia/Kolkata date
Thanks
 
Old 03-17-2014, 01:57 AM   #10
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Original Poster
Rep: Reputation: Disabled
Hi,

PFB as requested.


Linux

TZ=Asia/Kolkata date
Mon Mar 17 12:22:08 IST 2014


AIX

TZ=IST-5:30 date
Mon Mar 17 11:22:38 IST 2014

But when i execute date command manually the output in AIX server is 12:23:02. Could you plese help me to fix it.

Thanks in advance.
 
Old 03-17-2014, 03:36 AM   #11
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 503

Rep: Reputation: 189Reputation: 189
Hi,

Please run BOTH date commands on BOTH servers (4 results in total):

Code:
TZ=IST-5:30 date
TZ=Asia/Kolkata date
Please also confirm the timezone on the AIX server:

Code:
echo $TZ
Thanks
 
Old 03-17-2014, 04:17 AM   #12
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Original Poster
Rep: Reputation: Disabled
Hi,

PFB as requested.

Linux

root ~ # TZ=IST-5:30 date
Mon Mar 17 14:44:02 IST 2014

root ~ # TZ=Asia/Kolkata date
Mon Mar 17 14:44:10 IST 2014

AIX

<dr-new><root>/# TZ=IST-5:30 date
Mon Mar 17 13:45:24 IST 2014

<dr-new><root>/# TZ=Asia/Kolkata date
Mon Mar 17 13:45:32 IST 2014

<dr-new><root>/# echo $TZ
IST-5:30IST

Thanks in advance.
 
Old 03-17-2014, 05:54 AM   #13
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,075

Rep: Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475Reputation: 1475
Note: I'm not familiar with TZ, but I do see one-hour difference between Aix and Linux:

Code:
linux$ TZ=CET date -u
Mon Mar 17 10:52:51 UTC 2014
linux$ TZ=CET date
Mon Mar 17 11:52:54 CET 2014

AIX$ TZ=CET date -u
Mon Mar 17 10:53:23 UTC 2014
AIX$ TZ=CET date
Mon Mar 17 10:53:26 CET 2014
Edit: Most likely my AIX simply doesn't understand 'CET'
Edit#2: The right value is: CET-1CEST,M3.5.0,M10.5.0

Last edited by NevemTeve; 03-17-2014 at 12:56 PM.
 
Old 03-17-2014, 10:40 AM   #14
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 503

Rep: Reputation: 189Reputation: 189
Hi,

Quote:
Originally Posted by geekslinux View Post
Linux

root ~ # TZ=IST-5:30 date
Mon Mar 17 14:44:02 IST 2014

root ~ # TZ=Asia/Kolkata date
Mon Mar 17 14:44:10 IST 2014

AIX

<dr-new><root>/# TZ=IST-5:30 date
Mon Mar 17 13:45:24 IST 2014

<dr-new><root>/# TZ=Asia/Kolkata date
Mon Mar 17 13:45:32 IST 2014
According to the above, it looks like the AIX server is indeed an hour behind the Linux server. You should be able to double check this by looking at the UTC time on both servers, though, by running "date -u".

Quote:
Originally Posted by geekslinux View Post
<dr-new><root>/# echo $TZ
IST-5:30IST
This TZ value seems wrong, and is most likely the cause of your problem. To demonstrate, here's the output from one of my servers:

Code:
$ TZ=IST-5:30IST date
Mon Mar 17 21:59:45 IST 2014
$ TZ=IST-5:30 date
Mon Mar 17 20:59:50 IST 2014
$ date -u
Mon Mar 17 15:29:54 GMT 2014
The correct value is "IST-5:30", without the trailing "IST" part. The 2nd "IST" refers to a daylight savings timezone. The definition is incomplete, though, as it doesn't specify the DST offset or rules. As far as I know, Kolkata doesn't use daylight savings, does it?

To fix this, first fix the TZ value in /etc/environment, then reboot, then run "ntpdate <linux-ip>". Now verify that the time is correct, and start xntpd again.

Regards,

Clifford
 
Old 03-17-2014, 10:44 AM   #15
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 503

Rep: Reputation: 189Reputation: 189
Forgot to mention: AIX 6 understands Olson timezone values (like Asia/Kolkata). If possible you should use this format rather the old POSIX format for $TZ.

Having said that, though, from the output above it looks like you might be working on a DR server ("dr-new")? If so, keep $TZ the same as the corresponding production server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to make my system time to sync with ntp server without using client software? ybsshweta Linux - Newbie 14 01-30-2013 06:24 AM
Unable to sync time NTP server Rohit_4739 Linux - Newbie 5 04-10-2012 08:44 AM
[SOLVED] Slackware server - ntp time sync stops after a day tennis_slacker Slackware 81 08-04-2010 09:05 AM
ntp time off by 1 hour schneidz Linux - Software 8 03-16-2008 10:30 PM
Time jumps by 1 day for an hour, then jumps back on RH 9? dieyouspammer Red Hat 3 04-07-2006 12:18 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 12:09 AM.

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