Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi clock is off by one hour (daylight savings problem?)

avatar
Rising Star

I'm in the America/New_York timezone and my servers run ntp, and they show the right time. The header of NiFi running on those servers is off by one hour, eg system time says 11:00 and NiFi says 10:00. This question is very similar to

https://community.hortonworks.com/questions/76724/change-timezone-in-nifi.html

but I've tried that solution and no joy. This feels like a daylight savings problem, as the gui says 10:00:00 EST, and really that should be EDT since at time of writing it is summer.

I'm using Oracle Java 1.8.0_71.

Any ideas?

1 ACCEPTED SOLUTION

avatar
Super Mentor

@Oliver Meyn

In NiFi cluster, the time that is displayed could come form anyone of the connected nodes. It is important to use NTP on every node in your NiFi cluster to make sure that time stays in sync.

As far as timezone differences go, Make sure the symlink for /etc/localtime is pointing at the same /usr/share/timezone/... file on every one of you nIfi nodes.

Run the "date --utc" command on all your nodes and compare it to both of the following commands:

zdump /usr/share/zoneinfo/EST

zdump /usr/share/zoneinfo/US/Eastern

If you are looking for EDT time you need to make sure that the symlink for /etc/localtime is point to the following on all yoru nodes:

lrwxrwxrwx.  1 root root     25 Dec  1  2014 localtime -> ../usr/share/zoneinfo/US/Eastern

Thanks,

Matt

View solution in original post

6 REPLIES 6

avatar
Super Mentor

@Oliver Meyn

In NiFi cluster, the time that is displayed could come form anyone of the connected nodes. It is important to use NTP on every node in your NiFi cluster to make sure that time stays in sync.

As far as timezone differences go, Make sure the symlink for /etc/localtime is pointing at the same /usr/share/timezone/... file on every one of you nIfi nodes.

Run the "date --utc" command on all your nodes and compare it to both of the following commands:

zdump /usr/share/zoneinfo/EST

zdump /usr/share/zoneinfo/US/Eastern

If you are looking for EDT time you need to make sure that the symlink for /etc/localtime is point to the following on all yoru nodes:

lrwxrwxrwx.  1 root root     25 Dec  1  2014 localtime -> ../usr/share/zoneinfo/US/Eastern

Thanks,

Matt

avatar
Rising Star

@Matt Clarke thanks, but I am running ntp on all machines, my /etc/localtime all point to the same place (in my case /usr/share/zoneinfo/America/Toronto), and, crucially, the date command on each system returns the same thing, which reports back as EDT, eg:

Wed May 31 13:21:29 EDT 2017

I don't think the problem lies with my servers...

avatar
Super Mentor

@Oliver Meyn

You have run in to the following bug:

https://issues.apache.org/jira/browse/NIFI-3664

The good news is that the fix for this bug is part of HDF 2.1.3.

Thank you,

Matt

avatar
Rising Star

Great find, thanks!

avatar
Super Mentor

No problem... as soon as you added that you were running HDF 2.1.2, it helped.

avatar
Rising Star

I should have added - this is HDF 2.1.2 so NiFi 1.1.0