hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Dedicated Server : cpanel server keep resetting time even though NTPD service is off
Reply

Dedicated Server Current and past experiences with dedicated server providers, bandwidth, and server performance. Review managed and unmanaged dedicated web servers, discuss both Windows and Unix dedicated server solutions, and discuss dedicated hosting providers. If your service is unavailable, please click here.
Forum Jump

cpanel server keep resetting time even though NTPD service is off

Reply Post New Thread In Dedicated Server Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-25-2012, 03:02 AM
chasebug chasebug is offline
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?

Reply With Quote


Sponsored Links
  #2  
Old 03-25-2012, 04:12 AM
madaboutlinux madaboutlinux is offline
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?

__________________
Linux WebHosting Solutions
http://linuxhostingsupport.net/blog/
MSN: madaboutlinux@hotmail.com

Reply With Quote
  #3  
Old 03-25-2012, 04:49 AM
chasebug chasebug is offline
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?

Reply With Quote
Sponsored Links
  #4  
Old 03-25-2012, 04:53 AM
rds100 rds100 is offline
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.

Reply With Quote
  #5  
Old 03-25-2012, 11:07 AM
chasebug chasebug is offline
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.

Reply With Quote
  #6  
Old 03-25-2012, 11:53 AM
iTom iTom is offline
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'

Reply With Quote
  #7  
Old 03-25-2012, 12:38 PM
spaethco spaethco is offline
Community Guide
 
Join Date: Nov 2005
Location: Minneapolis, MN
Posts: 1,635
Quote:
Originally Posted by iTom View Post
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.
Reply With Quote
  #8  
Old 03-25-2012, 12:45 PM
chasebug chasebug is offline
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

Reply With Quote
  #9  
Old 03-25-2012, 12:50 PM
spaethco spaethco is offline
Community Guide
 
Join Date: Nov 2005
Location: Minneapolis, MN
Posts: 1,635
Quote:
Originally Posted by chasebug View Post
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

Reply With Quote
  #10  
Old 03-25-2012, 12:56 PM
programguy programguy is offline
Aspiring Evangelist
 
Join Date: Jul 2009
Posts: 442
Quote:
Originally Posted by chasebug View Post
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)

Reply With Quote
  #11  
Old 03-25-2012, 12:57 PM
programguy programguy is offline
Aspiring Evangelist
 
Join Date: Jul 2009
Posts: 442
Quote:
Originally Posted by chasebug View Post
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.

Reply With Quote
  #12  
Old 03-25-2012, 03:24 PM
chasebug chasebug is offline
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?

Reply With Quote
  #13  
Old 03-25-2012, 04:21 PM
Steven Steven is online now
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.

__________________
Steven Ciaburri | Proactive Linux Server Management - Rack911.com | 1.855.RACK911
System Administration Extraordinaire

Managed Dedicated Servers, Linux Server Management, Disaster Recovery, Server Security Audits

Reply With Quote
  #14  
Old 03-25-2012, 04:52 PM
rds100 rds100 is offline
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.

Reply With Quote
  #15  
Old 03-25-2012, 06:54 PM
Steven Steven is online now
I like ice cream
 
Join Date: Mar 2003
Location: California USA
Posts: 11,784
Quote:
Originally Posted by rds100 View Post
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.

__________________
Steven Ciaburri | Proactive Linux Server Management - Rack911.com | 1.855.RACK911
System Administration Extraordinaire

Managed Dedicated Servers, Linux Server Management, Disaster Recovery, Server Security Audits

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
iHelpHosts.com :: cPanel Server Management - Monthly, Emergency, and One-Time Service Nick H Systems Management Offers 0 12-10-2011 03:10 PM
My server's time is resetting everyday chasebug Dedicated Server 9 06-09-2011 09:49 AM
cPanel Hostname Resetting?! That Guy Hosting Security and Technology 10 12-26-2005 04:28 PM
NTPD Strangenes - Server Time Off mperkel Hosting Security and Technology 2 09-19-2005 03:31 AM
resetting password in Cpanel WHM PrOsHoCk Hosting Security and Technology 4 04-18-2003 08:22 PM

Related posts from TheWhir.com
Title Type Date Posted
Hosting Control Panel cPanel & WHM 11.34 Release Hits Stable Tier Web Hosting News 2012-11-12 17:04:57
Video: cPanel and Attracta Talk About Integrating SEO Tools into the Hosting Control Panel Whir Tv 2012-08-31 14:10:47
cPanel Offers Windows Hosting Control Panel Enkompass for Free Web Hosting News 2011-10-13 17:14:16
cPanel to Launch Certification Program at cPanel Conference 2011 Web Hosting News 2011-09-21 18:15:42
Security Provider HostingArmor Releases Server Scanning cPanel Plugin Web Hosting News 2011-07-25 19:33:26


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?