LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-10-2010, 09:48 PM   #1
directedition
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
Tor thinks my time is off?


I know my system clock is correct. I'm running debian in a VM and both the host system and the debian VM agree on the time, and it's the official time for my timezone (as per time.gov). But when I launch Tor, it won't build any chains because it says my clock is a few hours and some minutes behind (the time difference it gives is inconsistent, right now (10:46pm) it says that I'm 3 hours and 14 minutes behind the consensus, which is 2am GMT, and it seems to think that it is ALWAYS 2:00am GMT, or at least has been exactly that for the last half hour), and it won't work till I set the time ahead. Why does Tor only work when I tell it that it's in the future? This is for a system which will eventually be a livecd, and I need to make sure it works for any timezone that the disc is loaded in. What's more odd, is that on one of my systems, when I boot it up, it never has time problems and connects consistently.

Thanks for any help, much appreciated!
 
Old 05-11-2010, 04:53 PM   #2
directedition
LQ Newbie
 
Registered: May 2010
Posts: 3

Original Poster
Rep: Reputation: 0
I went ahead and installed ntp on the vm, and that seems to fix it after being run for a few minutes. But unfortunately, this is meant for distribution on a livecd, and the last thing I want to do is muck up the user's hardware clock. Is there a way to prevent the ntp from changing the hardware clock?
 
Old 05-12-2010, 02:12 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by directedition View Post
Is there a way to prevent the ntp from changing the hardware clock?
The virtualisation software should (ha!) not propagate operations on the virtual hardware clock to the real hardware clock.

AFAIK the NTP programs do not set the hardware clock but it is done during shutdown, on Slackware 13.0 by the /etc/rc.d/rc.6 script which uses the /sbin/hwclock executable to do it. For belt-and-braces, in the VM's root file system, you could remove hwclock or replace it with /bin/true.

But what you report is strange; the usual advice is that VM's should not run NTP and should rely on the virtualisation software supplying data from the host's clock to the virtual hardware clock.
 
Old 05-12-2010, 06:43 AM   #4
directedition
LQ Newbie
 
Registered: May 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
AFAIK the NTP programs do not set the hardware clock but it is done during shutdown, on Slackware 13.0 by the /etc/rc.d/rc.6 script which uses the /sbin/hwclock executable to do it. For belt-and-braces, in the VM's root file system, you could remove hwclock or replace it with /bin/true.
I'm only using the VM for development and testing, it will be deployed on live systems. Thanks for the good idea of replacing hwclock with true! I think that's what I'll do.
 
Old 05-12-2010, 06:49 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by directedition View Post
I'm only using the VM for development and testing, it will be deployed on live systems. Thanks for the good idea of replacing hwclock with true! I think that's what I'll do.
In case you ever do need hwclock, it might be prudent to rename it as hwclock.original and to make the change to true more obvious you could make hwclock a symbolic link to true.

EDIT: on reflection this is a workaround for something that is broken and could better be fixed in case it causes other trouble.

Last edited by catkin; 05-12-2010 at 07:10 AM.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
TOR: traffic between my workstation TOR entry point really not encrypted..? john99 Incognito 3 11-11-2009 01:06 AM
LXer: Changing what time a process thinks it is with libfaketime LXer Syndicated Linux News 0 09-22-2008 06:41 PM
TOR-there seems to be no tor.pkg- what now? me-$-on Slackware 5 06-06-2008 11:08 AM
KDE thinks it knows better l0rddarkf0rce Slackware 7 03-23-2005 02:02 AM
how they thinks ? amjad General 13 11-13-2003 03:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration