The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Server Time jumped forward 12 hours.

Discussion in 'General Discussion' started by westhost-neil, Nov 3, 2006.

  1. westhost-neil

    westhost-neil Well-Known Member

    Joined:
    Jun 3, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    UK
    I had a lot of complaints this morning from customers saying that emails & orders are being sent with the wrong date.

    When I looked the servers time was set 12 hours in advance. Further investigation showed that the change occured at 2.15am which is exactly the same time that /scripts/upcp gets run.

    So I've synced the server time and also synced it to the hardware clock (which was an hour out) but how can I be sure this won't happen again?

    I've checked the timezone but it's impossible to know what it was set on as it just shows the first entry in the dropdown. Anyway I've updated this with the correct time zone now but would like to know what the cause might be.

    Does upcp do a timesync when it runs, could it be that the timezone was set incorrectly, if so why did this only happen today. Is it something to do with the clocks going back at the weekend?

    Any help would be appreciated.

    Neil
     
  2. nbento

    nbento Member

    Joined:
    Jan 5, 2006
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Im having the same problem.
    Care to explauin what you did because no matter what I always end up with 10 hours in advance.
    I also did a sync tiem on the server everything gets ok but 1 minute later it drives back to 10 hours.
     
  3. westhost-neil

    westhost-neil Well-Known Member

    Joined:
    Jun 3, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    UK
    Hi,

    I didn't do much to sort my problem out as it wasn't as bad as the problem your having.

    I had a feeling the system clock was out so I ran:

    This changed the system time to one hour ahead. So in cPanel I resynced the time and made sure it was correct then I ran

    This set the hardware clock to the correct time.

    Have you checked to see if you have a cronjob that runs every minute that may be altering the time. Also change the timezone to the correct one, I don't know a way of checking the current timezone so I just set it what it should be.

    Hope that helps
     
  4. mooony

    mooony Well-Known Member

    Joined:
    Nov 9, 2002
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    6
    I had the same problem this morning.

    To fix it I did this:

    login into WHM. Server Configuration -> Server Time

    Now select your time zone and update it. Once you did this you go back and do sync time. Now you server is synced.

    The only big problem is that all the log files are messed up. Is there a way to clean them up?

    Thanks Ronald
     
  5. nbento

    nbento Member

    Joined:
    Jan 5, 2006
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Thats what I tried in the first place but it doesnt work.
    I change the timezone to my time, it reloads fine, but when I check again Im again on Africa time zone.
    If I sync the time it sync well, but when you check again Im again on africa time zone.
    This is weird.
     
  6. westhost-neil

    westhost-neil Well-Known Member

    Joined:
    Jun 3, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    UK
    I don't think that means it's set to Africa, mine says the same. I'm sure the dropdown selection is done, but it doesn't select it when you reload the page.
     
  7. nbento

    nbento Member

    Joined:
    Jan 5, 2006
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    I found the problem on another thread here

    Run this on the shell prompt
    rdate -s rdate.cpanel.net

    But now my logs are all messed up and I have 5 sites that are dependent fromthe stats.

    Any idea on how to fix this?
    I mean awstats still show 12 hours ahead, alhtough the server is ok now
     
  8. gantz

    gantz Registered

    Joined:
    Oct 2, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    france
    All the same for me.

    And it's really disturbing for my vB where all messages are messed up, since last posts are shown as posted TONIGHT, so actual posts with real time are thrown away in the middle of the topics instead of beeing considered as last ones.

    How did that happen ?!
    What could be done ?!
     
  9. gemininetcom

    gemininetcom Active Member

    Joined:
    Nov 29, 2003
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Found this morning same problem. I did update/sync in WHM Server Time, as Moony also did. The screwup of logfiles does not have an easy solution, unless you want to correct all manually. I figured just to leave it. /var/log/messages and /var/log/secure are sequentially written to anyway, so if you read thru them, you quickly notice the 12hr jump and jump back when I sync-ed time. However, it does not solve the problem that /scripts/upcp screwed it up and can do it again unless cPanel staff figures out what went wrong :D
     
  10. westhost-neil

    westhost-neil Well-Known Member

    Joined:
    Jun 3, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    UK
    This only happened on one of my servers. Running WHM 10.8.0 cPanel 10.9.0-C56.

    Have another server in the same location running the same version that was unaffected.

    Only difference, the one that was affected is running Red Hat ES 3 and the unaffected one is running Fedora Core 4.
     
    #10 westhost-neil, Nov 3, 2006
    Last edited: Nov 3, 2006
  11. gemininetcom

    gemininetcom Active Member

    Joined:
    Nov 29, 2003
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Here running 10.9.0-RELEASE_57
     
  12. minotauro

    minotauro Well-Known Member

    Joined:
    Jan 19, 2004
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    rdate.cpanel.net

    Hello,

    The same problem here. :mad:

    Regards,
    Minotauro
     
  13. Pyrix

    Pyrix Member

    Joined:
    Dec 21, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel really need to look into this - it screwed up the site on our server so we had to turn it off and is a pointless waste of my time when i have to good hour or two running queries to try and get all the posts in our vBulletin forum and gallery back to where they should be!

    For those with vB forums or Photopost galleries that were affected - if you can find the ids of the last and first posts affected you can run the following queries:

    vB Posts:
    UPDATE post SET dateline = dateline - 43200 WHERE postid <= ID OF LAST AFFECTED POST and postid >= ID OF FIRST AFFECTED POST

    Then you'll need to update your thread and forum counters in the vBulletin Admin CP

    Photopost Photos:
    UPDATE photos SET date = date - 43200 WHERE id <= ID OF LAST AFFECTED POST and id >= ID OF FIRST AFFECTED POST

    Photopost Comments:
    UPDATE comments SET date = date - 43200 WHERE id <= ID OF LAST AFFECTED POST and id >= ID OF FIRST AFFECTED POST

    I post these with no guarantee that they won't blow your server up, ruin your forum, steal your girlfriend, kill your fish etc! I recommend you do a backup and do a SELECT first to make sure you're affecting the right entries the database!

    EG: SELECT * FROM post WHERE postid <= ID OF LAST AFFECTED POST and postid >= ID OF FIRST AFFECTED POST

    Having said that, hope this helps someone!

    Edit: You can check the times of the timestamps in the database by using this convertor; http://www.onlineconversion.com/unix_time.htm
     
    #13 Pyrix, Nov 3, 2006
    Last edited: Nov 3, 2006
  14. K-G

    K-G Member

    Joined:
    Feb 16, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    or waiting 12 hours will correct the thread marking system? i dont care about the wrong dates on posts/threads rightnow but what i do care is threda marking system on my vbulletin forums.
     
  15. Pyrix

    Pyrix Member

    Joined:
    Dec 21, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    It should do, yes - i'm assuming you're using cookie based marking rather than database-based?

    Best place to ask would be vbulletin.com me thinks!
     
  16. eagle

    eagle Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Strange, two servers today, one on CPanel Stable and one on Release ....

    Any idea what causes this?
     
  17. simonpearce

    simonpearce Well-Known Member

    Joined:
    Jun 20, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Ditto - we've found this problem on three of nine servers so far . . .

    Fixed with server time update in WHM but a very bizarre error from cPanel!
     
  18. mrcbrown

    mrcbrown Well-Known Member

    Joined:
    Jun 5, 2003
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    When I sync with the WHM update, it stays wrong, I had to sync to an time server elsewhere other than the cpanel one it sync's to by default.

    Is there a way to take the cPanel one out of the equation that anyone knows of?
     
  19. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    cpanel's time server is now correct. I just tested it. use teh time update in WHM again see what you get.
     
  20. zigzam

    zigzam Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    206
    Likes Received:
    0
    Trophy Points:
    16
    I had this happen a few days back and now again.
     
Loading...

Share This Page