Home Forums Hortonworks Sandbox Time in Sandbox VM is off compared to Host

This topic contains 6 replies, has 3 voices, and was last updated by  James Solderitsch 1 year, 9 months ago.

  • Creator
    Topic
  • #18166

    Running in the Eastern time zone in the US (now Daylight Savings Time). The time as reported in the Sandbox is 4 hours off — instead of 5:42PM, the date command in my shell (via ssh) is 13:42. The day is right: March 19, 2013.

    Is there any way to get the clocks in sync? I know that VMware tools is not installed but one of the parameters in the config options in VMware player is to set Time Sync as on or off. Right now the setting is off. Is there any harm in making the setting be on?

    Does this screw up Ambari’s ability to report in any way? There was some warning about time drift in the Ambari setup instructions.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #18249

    The server that Larry specifies for rdate timed out. So I uninstalled that and yum installed ntpdate and the same server (time.nist.gov) worked for ntpdate.

    This advanced the datetime to the current (correct) datetime.

    As I suspected, this confused Ambari — all graphs were flat — and then I saw that HBase went from green to red status.

    From the services tab in Ambari I saw that the Stop button was de-activated for HBase. So I clicked the Start button and after a period of apparent ramp-up time, all of the conditions leading to HBase being red were corrected and HBase (and the rest of the Hadoop components) were all green again.

    PLUS, the little summary graphs (for example in the Metrics section when viewing HBase) that previously were empty with No Data messages now all show real data in them.

    I complained about this in another thread in this forum.

    So the key takeaway is that ntpdate can sync your clock for you, but be prepared for consequences if you do.

    Jim

    Collapse
    #18248

    Larry Liu
    Moderator

    Hi, James

    You can try this too:
    rdate is not install on sandbox. So install it first
    yum install rdate
    rdate -s time.nist.gov
    hwclock –systohc

    Thanks
    Larry

    Collapse
    #18208

    I just executed:

    sudo ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime

    and re-checked the date and its still 4 hours off.

    Collapse
    #18205

    I did check the timezone and it does appear to be set to a city supporting the Eastern US Timezone. The date output reports the time is EDT which is Eastern Daylight Time. So I don’t think it’s the wrong timezone but I might try to do this symbolic link just in case.

    Collapse
    #18174

    Yi Zhang
    Moderator

    Hi James,

    You can either install NTP to sync the time, or you can link the sandbox time to the proper timezone, for example

    ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime

    Thanks,
    Yi

    Collapse
    #18167

    I did toggle the Time Sync setting and rebooted. The time in the VM is still off by 4 hours. The reported timezone in the VM and from Windows is EDT. So it’s not a timezone thing as far as I can tell.

    Collapse
Viewing 6 replies - 1 through 6 (of 6 total)