I keep getting this error on my relay, I set my timezone as Bucharest, Romania. The relay is running ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-119-generic x86_64) and using Tor 0.3.2.10
[WARN] Received ns flavor consensus with skewed time (CONSENSUS): It seems that our clock is behind by 1 minutes, 1 seconds, or that theirs is ahead. Tor requires an accurate clock to work: please check your time, timezone, and date settings.17:58:59 [WARN] Our clock is 1 minutes, 1 seconds behind the time published in the consensus network status document (2018-04-09 15:00:00 UTC). Tor needs an accurate clock to work correctly. Please check your time and date settings!
Trac: Username: Dbryrtfbcbhgf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
The clock skew tolerance should probably be larger than 61 seconds so this might be an actual bug. I think we could use a little more information though. Is the skew the same amount each time you get that warning, or does it change?
What output do you get from ntpq -n -c sysinfo -c peers?
Do we have a log message around there that says where we got the consensus from?
Since this is a dir mirror, we got it from an authority, right?
There is a tiny part of me that wonders if this is because dizum's clock is 65 seconds early.
But...it can't be just that, right? Since this relay is seeing a consensus that was made in the future, and that means this relay's clock is set far enough in the past that all the dir auths made a consensus and timestamped it and made it available yet it was still in the future from this relay's perspective.
Scenario: dizum is 65 seconds early. So it votes early, and sends a signature early, and most importantly, it makes the new consensus available early.
So if the relay here has the correct time, and it happens to ask for a consensus at the 59 minute mark, then dizum has already switched over to handing out the new consensus, and most importantly, it sticks a timestamp on the new consensus that says it came from the top of the hour. And while all the other dir auths have accurate clocks, they send their signatures early (5 minutes early) for robustness. So it doesn't matter whether they have accurate clocks, dizum can by itself produce a consensus with a timestamp in the future that their signatures on it, and it can do this theoretically as soon as it has enough signatures from dir auths for that round -- i.e. 5 minutes early if it wanted to drift more.
I'm going to file a consensus-health ticket and a doctor ticket, to have us check the dir auths for clock skew, to get earlier notice when they go wrong.
I'm going to contact dizum's operator and get him to fix it one more time.
I continue to think we should change the relay consensus fetching algorithm to wait a little while when it rolls the dice and they come up between :55 and :00. Dgoulet says he has a diagram, in his little book, of when each role fetches the consensus. We should get that transcribed into dir-spec, and then build a plan for this third item.
I'm going to contact dizum's operator and get him to fix it one more time.
Also done (well, initiated).
I continue to think we should change the relay consensus fetching algorithm to wait a little while when it rolls the dice and they come up between :55 and :00. Dgoulet says he has a diagram, in his little book, of when each role fetches the consensus. We should get that transcribed into dir-spec, and then build a plan for this third item.
The clock skew tolerance should probably be larger than 61 seconds so this might be an actual bug. I think we could use a little more information though. Is the skew the same amount each time you get that warning, or does it change?
What output do you get from ntpq -n -c sysinfo -c peers?
associd=0 status=c016 leap_alarm, sync_unspec, 1 event, restart,
system peer: 0.0.0.0:0
system peer mode: unspec
leap indicator: 11
stratum: 16
log2 precision: -24
root delay: 0.000
root dispersion: 0.045
reference ID: INIT
reference time: 00000000.00000000 Thu, Feb 7 2036 8:28:16.000
system jitter: 0.000000
clock jitter: 0.000
clock wander: 0.000
broadcast delay: 0.000
symm. auth. delay: 0.000
remote refid st t when poll reach delay offset jitter
==============================================================================
0.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
1.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
2.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
3.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
ntp.ubuntu.com .POOL. 16 p - 64 0 0.000 0.000 0.000
What output do you get from ntpq -n -c sysinfo -c peers?
{{{
associd=0 status=c016 leap_alarm, sync_unspec, 1 event, restart,
system peer: 0.0.0.0:0
system peer mode: unspec
}}}
Thanks. I'm pretty sure the above means the ntpd is not synchronized; possibly it has just restarted?
{{{
leap indicator: 11
stratum: 16
log2 precision: -24
root delay: 0.000
root dispersion: 0.045
reference ID: INIT
reference time: 00000000.00000000 Thu, Feb 7 2036 8:28:16.000
system jitter: 0.000000
clock jitter: 0.000
clock wander: 0.000
broadcast delay: 0.000
symm. auth. delay: 0.000
remote refid st t when poll reach delay offset jitter
==============================================================================
0.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
1.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
2.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
3.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
ntp.ubuntu.com .POOL. 16 p - 64 0 0.000 0.000 0.000
}}}
I think the other output is also consistent with the ntpd having just restarted.
Anyway, as arma commented above, the more likely problem seems to be a dirauth having an inaccurate clock.
During this week's meeting, we decided it would be a good idea to relax this test to account for the voting schedule. That way for a client or relay to get a "consensus is coming from the future" warning, enough dirauths would have to have their clocks skewed by about the same amount. A single dirauth with an early clock shouldn't be able to induce this warning by releasing a consensus early. (This is what happened with dizum.)
arma says the voting-delay consensus parameter is something we want to look at if we want to not hard code this.
VA-DistSeconds-VoteSeconds: The authorities exchange votes. VA-DistSeconds-VoteSeconds/2: The authorities try to download any votes they don't have. VA-DistSeconds: The authorities calculate the consensus and exchange signatures. VA-DistSeconds/2: The authorities try to download any signatures they don't have. VA: All authorities have a multiply signed consensus.
So VA-DistSeconds is the earliest that a dirauth with a skewed clock could possibly release a valid consensus, assuming that the other dirauths don't have skewed clocks. We probably shouldn't decide that a consensus is "early" before that time. (We probably should add some tolerance as well.)
If multiple dirauths have skewed clocks the story gets more complicated. Maybe it'll be rare enough to avoid thinking about for now?