
03-25-2012, 03:02 AM
|
|
Web Hosting Master
|
|
Join Date: Apr 2009
Posts: 1,320
|
|
cpanel server keep resetting time even though NTPD service is off
My server is running cpanel and it keep resetting the clock automatically everyday. NTPD is off but it still reset the time. How to disable that?
|

03-25-2012, 04:12 AM
|
|
Web Hosting Master
|
|
Join Date: Jul 2009
Posts: 1,495
|
|
NTPD service should be ON. Make sure its configured properly and the service is set to ON in chkconfig
Quote:
chkconfig --list ntpd
chkconfig ntpd on
|
Just confirming, you are not on a VPS, right?
|

03-25-2012, 04:49 AM
|
|
Web Hosting Master
|
|
Join Date: Apr 2009
Posts: 1,320
|
|
I am on a dedicated server. I turned NTPD off because I don't want it to automatically update the time for me. So right now NTPD is off but it is still resetting time automatically every day at the same time, how do I turn this off?
|

03-25-2012, 04:53 AM
|
|
Premium Member
|
|
Join Date: Jan 2011
Location: Varna, Bulgaria
Posts: 1,173
|
|
Find which cron job is resetting your time. Or better just set your time correctly, so this daily "resetting" will not change the time.
|

03-25-2012, 11:07 AM
|
|
Web Hosting Master
|
|
Join Date: Apr 2009
Posts: 1,320
|
|
Does anyone know which cronjob for cpanel is doing this? The time is set "correctly" because it has to sync with all the other servers.
|

03-25-2012, 11:53 AM
|
|
Web Hosting Master
|
|
Join Date: Apr 2007
Posts: 3,486
|
|
If your syncing to another server, setup an NTP client <> server relationship between them.
Although if you have NTP on all your servers they should be insync...
Never a good idea to put in 'bodges'
|

03-25-2012, 12:38 PM
|
|
Community Guide
|
|
Join Date: Nov 2005
Location: Minneapolis, MN
Posts: 1,635
|
|
Quote:
Originally Posted by iTom
Although if you have NTP on all your servers they should be insync...
Never a good idea to put in 'bodges'
|
This.
Set the timezone appropriately on the severs and sync everything using ntpd.
Clearly ntpdate is running in a cronjob somewhere -- which is bad for a myriad of reasons; you never want to run ntpdate, just have ntpd running. Managing the clock manually for purposes of replication is a highly unwise practice, and you'll figure out why shortly enough. In most cases matching the timezone isn't even necessary since most filesystems record the UTC time/date and only use the localtime offset for user display.
__________________
Eric Spaeth
Enterprise Network Engineer :: Hosting Hobbyist :: Master of Procrastination
"The really cool thing about facts is they remain true regardless of who states them." -SpaethCo
Last edited by spaethco; 03-25-2012 at 12:42 PM.
|

03-25-2012, 12:45 PM
|
|
Web Hosting Master
|
|
Join Date: Apr 2009
Posts: 1,320
|
|
I checked that the NTPD is not even on the server. So what else is causing this? I need one server set to a few minutes ahead of the other servers so I cannot use NTPD.
Code:
service ntpd stop
ntpd: unrecognized service
|

03-25-2012, 12:50 PM
|
|
Community Guide
|
|
Join Date: Nov 2005
Location: Minneapolis, MN
Posts: 1,635
|
|
Quote:
Originally Posted by chasebug
I need one server set to a few minutes ahead of the other servers so I cannot use NTPD.
|
1) Fire your developer; this approach is ridiculously stupid.
2) Look for ntpdate scheduled as a cronjob, or as part of a script running via cron.
__________________
Eric Spaeth
Enterprise Network Engineer :: Hosting Hobbyist :: Master of Procrastination
"The really cool thing about facts is they remain true regardless of who states them." -SpaethCo
|

03-25-2012, 12:56 PM
|
|
Aspiring Evangelist
|
|
Join Date: Jul 2009
Posts: 442
|
|
Quote:
Originally Posted by chasebug
My server is running cpanel and it keep resetting the clock automatically everyday. NTPD is off but it still reset the time. How to disable that?
|
how do you know ntpd is changing the time? Is it in your logs as ntp or logwatch or is the time just changing?
Your attempt to service ntpd stop says unrecognized and I would guess that ntp is not changing anything since it is not installed.
provide the log details that show time is changing and that ntp is doing it so we can better help you.
more than likely you have a different program screwing with the time or the clock is going batty (assuming not a vps, but an actual physical server)
|

03-25-2012, 12:57 PM
|
|
Aspiring Evangelist
|
|
Join Date: Jul 2009
Posts: 442
|
|
Quote:
Originally Posted by chasebug
I checked that the NTPD is not even on the server. So what else is causing this? I need one server set to a few minutes ahead of the other servers so I cannot use NTPD.
Code:
service ntpd stop
ntpd: unrecognized service
|
well, whatever hare-brained person decided that probably wrote a bad script that is changing the time, so problem solved.
|

03-25-2012, 03:24 PM
|
|
Web Hosting Master
|
|
Join Date: Apr 2009
Posts: 1,320
|
|
The script is fine, it doesn't change the time, the server is set to about 5 minutes apart on purpose and I understand that purpose is crucial to the script. What is the name of the log file that records what cron or service changed the time?
|

03-25-2012, 04:21 PM
|
|
I like ice cream
|
|
Join Date: Mar 2003
Location: California USA
Posts: 11,784
|
|
Upcp is doing it.
Quote:
=> Log opened from /usr/local/cpanel/scripts/maintenance at Sun Mar 25 16:17:01 2012
[20120325.161701] Processing: Setting clock
[20120325.161701] - Processing command `/usr/local/cpanel/scripts/rdate`
|
Your script is not fine. Whoever coded the script is a complete moron and you should not be using them. Chances are you are full of security holes, if they can't even code a script to run on accurate time.
|

03-25-2012, 04:52 PM
|
|
Premium Member
|
|
Join Date: Jan 2011
Location: Varna, Bulgaria
Posts: 1,173
|
|
Ok, do this as root:
Quote:
|
chmod 000 `which ntpdate`
|
This should solve your problem with the changing date. This is not the proper solution, but you don't want the proper solution anyway.
|

03-25-2012, 06:54 PM
|
|
I like ice cream
|
|
Join Date: Mar 2003
Location: California USA
Posts: 11,784
|
|
Quote:
Originally Posted by rds100
Ok, do this as root:
This should solve your problem with the changing date. This is not the proper solution, but you don't want the proper solution anyway.
|
It will not fix the issue. Cpanel upcp script which runs daily does NOT USE ntpdate, it uses rdate.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|