correct way to set time in freeNATs

The forum for help and support with FreeNATS as well as any useful hints and tips
Post Reply
wolfgang
Posts: 21
Joined: Wed Jun 11, 2008 9:09 pm
Location: Montreal, Canada

correct way to set time in freeNATs

Post by wolfgang » Sun Oct 04, 2009 8:17 am

Hi,

What is the correct way to set time in freeNATs? For example I want to use for all time display, UTC time. just set UTC and internet sync in rPath appliance? or need to be done more ? How do I know if rPath reaches ntp server on internet? When I only select UTC and ntp from internet, it looks like the time is not correct set, Is it correct and necessary to set at first manual the time and then set to "synchronize time with internet servers" ?

Thanks, Wolfgang

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: correct way to set time in freeNATs

Post by dave » Sun Oct 04, 2009 3:05 pm

Hi there,

Yes the correct way to set the time for the appliance is via the rPath interface. I've just tried changing the time manually and just the timezone - both changes were reflected in the system (to check you can do a "date" from the command-line or look at the "last 24 hours" of a FreeNATS test to see what the finish time [now] is).

ntp will work (though requires a direct connection to the server) but, by default, it will "drift" to the time in very small steps (see below for why). If you want you can always do an "ntpdate time.server" from the command-line for a sudden jump to that time.

Please be aware that many services and FreeNATS in particular are time-sensitive e.g. the time is used in a number of ways and sudden time changes may have unexpected results. For example sessions may be expired or frozen test sessions may continue to not be automatically deleted if you have "gone back" in time.

Specifically you may also see strangeness in results for example twin sets of records overlapping the same period.

Hope that is ok for you,

Cheers,

Dave.

wolfgang
Posts: 21
Joined: Wed Jun 11, 2008 9:09 pm
Location: Montreal, Canada

Re: correct way to set time in freeNATs

Post by wolfgang » Mon Oct 05, 2009 8:36 am

Hi,

Ok, here what i found out.

Timezone setting in rPath, works, Manual Time setting in rPath works, when you try to set "Synchronize clock with Internet Server" it seems NOT to work. If you apply the check mark, in the result window it says always "ok", even if the configured timeserver is not reachable, if a replace it with a timeserver what is for sure reachable, even the time is hours offset, it says in result OK and time is not corrected. Maybe this is also a timeout issue on a slow network. (Would need some test on other networks)

Anyway, the correct way seems to be, you have to install Vmware tools in freeNATs appliance, othervise this will never be somehow accurate, and then set the timezone and time once manual and that the vmware tools should synchronize with the host machine. In host machine use a tool like http://www.analogx.com/contents/downloa ... eeware.htm to keep time in PC correct, has also a buildt in NTP server, so you can use also with Linux to manually sync. For the time issue in Vmware see http://www.vmware.com/pdf/vmware_timekeeping.pdf for rPath see http://wiki.rpath.com/wiki/Appliance_Ad ... ystem_Time and
http://wiki.rpath.com/wiki/rPath_Applia ... ime_Plugin but it does not give any details how it really should work.

Will report again, after I have installed vmware tools and the Atomic time sync to report of results in a couple of days.

Thanks, Wolfgang

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: correct way to set time in freeNATs

Post by dave » Mon Oct 05, 2009 8:49 am

Hi,

Hmm... well the NTP service is running - not sure why it doesn't work.

Perhaps try a "ntpdate time.server.here" and see what occurs.

Anyway - a word of warning; the reason vmware tools isn't installed on the guest is when we tried (albeit over a year ago) that rPath appliance wouldn't take vmware tools without crashing.

Kind of gave up at that point. If it now works ok let me know and I'll make sure future VMs have tools installed.

Regards,

Dave.

wolfgang
Posts: 21
Joined: Wed Jun 11, 2008 9:09 pm
Location: Montreal, Canada

Re: correct way to set time in freeNATs

Post by wolfgang » Wed Oct 07, 2009 9:25 am

Hi,

Well, a little longer post.

NTP, there are different time services, a lot of times called NTP, but in reality different names and protocols and ports

real NTP and SNTP using port 123 (mostly used on 'nix systems) RFC-1305
Daytime protocol, using port 13 (mostly on DOS, windows systems) RFC-867
Time protocol, using port 37 (only few systems use this) RFC-868

The time servers on internet mostly provide all 4 protocols on the 3 ports

rPath uses real NTP port 123, the problem in rPath seems to be that it does not give any error message when it can not reach the time server, so if you do not check the time and compare, you never know the time setting worked or not. This seems dangerous to me.

In my case the mobile network blocks port 123 (mobile networks only have open port 80, and 443, 56 and maybe few others on the low side), but rpath never gives any indication that it does not reach time server. on the other hand the Daytime protocol, port 13 is allowed and works, so my host PC for freeNATs VM can get automatically synchronized with some SW, like http://www.analogx.com/contents/downloa ... eeware.htm (but the buildt in time server only supports also Daytime protocol on port 13). For this reason when host is synced, and vmware tools sync to VM, all should be ok (hopefully)

Time protocols explained at: http://tf.nist.gov/timefreq/service/its.htm
Time protocols and also php code to retrieve them at: http://www.kloth.net/software/timesrv1.php This code could be used in freeNATs to sync with any of the different time protocols, depending what is available at the current installation.

To install Vmware tools in rPath appliance of freeNATs is a bit complicated. Explanations are here http://communities.vmware.com/message/782259 (did not work for me) and here http://communities.vmware.com/message/4 ... 1762ADB47F did only partly work for me, see below.

This is what i did do install Vmware tools, seems to work, but i do not know if this install may creates other issues.

Here we go:

you must be in Vmware window working, update from putty session into freeNATs does not allow you to finish install session.
conary update gcc --resolve
conary update kernel
REBOOT
now decompress the vmware tools and start installation
When installation asks multiple times for re-compilation of some drivers, say always ENTER
should successful end, then you will be ask to configure Vmware tools.
say ENTER to all defaults, now this creates question, because on some new time function it says NO as default, not sure if when you say NO all the timing issues are solved.

Vmware install and config ends successful, show even up in rPath services as vmware tools

Could also not find a instruction how to test now the sync function of time between host PC and freeNATs. I adjusted now timezone and time in rpath manually and will wait a couple of days to see if it starts to drift away.

Not related to time, but you should also add following lines to your .vmx file in freeNATs VM:

bios.bootDelay = "10000"

This will now display the BIOS boot options and you can configure the BIOS for your freeNATs VM.

Will keep you informed to see if time now stays stable in freeNATs.

regards, Wolfgang

wolfgang
Posts: 21
Joined: Wed Jun 11, 2008 9:09 pm
Location: Montreal, Canada

Re: correct way to set time in freeNATs

Post by wolfgang » Wed Oct 07, 2009 9:41 am

One more thing I forgot.

Check in Vmware log file for this meassage, or sometimes it is displayed during boot of VM, you need to do more:

=======================================================================================
Additional time issue with VMware:
VMware Workstation has measured your CPU speed to be 1662 MHz, but Windows reports that it is 1667 MHz. This may mean that your computer has a power-saving feature that varies the processor speed. As a result, the clock in your virtual machine may run too fast or too slow.
Sep 03 20:47:13.920: vmx|
Sep 03 20:47:13.920: vmx| For a workaround, please refer to the VMware knowledge base article at:
Sep 03 20:47:13.920: vmx| http://vmware.com/info?id=97
=======================================================================================

If this is the case, you must make some changes to your PC, see this http://vmware.com/info?id=97

//Wolfgang

wolfgang
Posts: 21
Joined: Wed Jun 11, 2008 9:09 pm
Location: Montreal, Canada

Re: correct way to set time in freeNATs

Post by wolfgang » Wed Oct 07, 2009 2:00 pm

This took me a while to figure out, how to check if vmware tools are proper configured for the timesync.

Short explanation:

Check in .vmx file if you find the line

tools.syncTime = "TRUE" if tools.syncTime = "FALSE" , then tools are installed, but sync feature is switched off.

Long explanation:

At normal you should start vmware tools in Linux with commandline like:

vmware-toolbox &

You get following error message:

=======================================================
[root@localhost bin]# vmware-toolbox &
[1] 22074
You have new mail in /var/spool/mail/root
[root@localhost bin]#
(vmware-toolbox-gtk:22074): Gtk-WARNING **: cannot open display:
========================================================
because x-window is not installed in rPath. Could not figure out if you can install x-window with conary........If anyone knows? please let me know.

Now the other way is via command-line. There is no manual for VMware tools, all instructions are in VMware Workstation manual 6.5, chapter 5, page 130. download from http://www.vmware.com/pdf/ws65_manual.pdf
The command line way of doing is:
cd /usr/bin/
and use following commands
to switch timesync on:
vmware-guestd --cmd "vmx.set_option synctime 0 1"
to switch timesync off:
vmware-guestd --cmd "vmx.set_option synctime 1 0"

Hope this completes the time issue, except how to install the graphical interface.

//Wolfgang

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: correct way to set time in freeNATs

Post by dave » Thu Oct 08, 2009 8:22 am

Hi Wolfgang,

Thank you very much for your detailed post on the timing issue.

I will certainly try and incorporate vmware tools and working time sync in the next build of the VM (whenever that may happen).

With regard to the "cannot open display" this would involve not only installing X but having it running in order to have an available display. Not sure what you think but I would certainly think this was a lot of resources to throw, especially if the time sync is working but with just a single error.

Regards,

Dave.

wolfgang
Posts: 21
Joined: Wed Jun 11, 2008 9:09 pm
Location: Montreal, Canada

Re: correct way to set time in freeNATs

Post by wolfgang » Thu Oct 08, 2009 10:45 pm

yes, I agree, to have continues the x running is waste of resources. Should be good enough for this purpose with the command line. out of curiosity, how you install x window in rpath? With a conary update ? could not find it.

//Wolfgang

dave
Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK
Contact:

Re: correct way to set time in freeNATs

Post by dave » Fri Oct 09, 2009 9:26 am

Hi,

Looks like "conary update xorg-x11" though there do seem to be a lot of posts detailing problems with X11 install.

Unfortunately I don't have the time (or bandwidth!!) at the moment to have a proper dig about with X.

Cheers,

Dave.

Post Reply