Issue with time

Status
Not open for further replies.

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
There's a new tunables section in the GUI. I'm not currently running a recent box but there's discussion of how to set tunables in the forums.
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875
Hi MSCFAdmin,

I was wondering if you were visualizing this filer....

Take a look at this KB article. It's mostly about Linux, but it gets a bit more Unix-in-general in the bottom third of the post

http://kb.vmware.com/selfservice/mi...nguage=en_US&cmd=displayKC&externalId=1006427

Read this:

http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf

if you really want to know all about why time in a VM environment is such a pain.

So what should you do? This is what I would try:

Ssh into your filer and run " service ntpd stop" to turn off the ntpd daemon so you can run "ntpdate"

Run "ntpdate -b 0.pool.ntp.org" to sync you FreeNAS clock to a known good time source. You could also just point it to your internal time server....with any luck they will both agree on what time it is making the choice a wash.

Restart ntpd with "service ntpd start"

check the time service by running "ntpq", you should get an "ntpq>" prompt and then run "peers". You should see something like this:

Code:
ntpq> peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 10.56.56.13     128.252.19.1     2 u    -   64    1    0.245   -0.350   0.422
 10.56.56.14     128.252.19.1     2 u    1   64    1    0.342    4.030   0.308
 2602:100:18b6:b 189.141.160.61   2 u    -   64    1    0.311    0.496   0.349


Note: I have my filer sync it's time to both my DC's & my firewall, those boxes sync to a number of time servers out of the ntp.org pool. I run 2 FreeBSD boxes on ESXi and I have each of them sync to those 3 boxes and 3 more pool servers. My windows clients all sync to the DC's.

-Will
 

MSCFAdmin

Dabbler
Joined
Jul 26, 2012
Messages
17
@survive - I tried ntpd after stopping the service and it can't seem to sync to anything (internal or external):

[root@freenas ~]# ntpdate
28 Jul 15:54:32 ntpdate[47696]: no servers can be used, exiting
[root@freenas ~]# ntpdate 0.pool.ntp.org
28 Jul 15:54:49 ntpdate[47698]: no server suitable for synchronization found

Here is my ntpq result:

[root@freenas ~]# ntpq
ntpq> peers
remote refid st t when poll reach delay offset jitter
==============================================================================
10.161.*** .LOCL. 1 u 1 64 1 0.405 56169.8 5.900
ntpq>
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875
Hi MSCFAdmin,

Do you have a default route & dns set up on the filer?

Try stopping ntpd & run "ntpdate -b 128.252.19.1" to sync against one of the US navy time servers (you need to -b to force the time to sync since it's so far off) or run "ntpdate -b <ip of your internal time server>" if you can't talk to the outside world\no dns default route set up.

-Will
 

MSCFAdmin

Dabbler
Joined
Jul 26, 2012
Messages
17
I have setup the DNS and default route. I just tried the 128 address and got the same error, but I can ping outside servers:

Code:
[root@freenas ~]# ntpdate -b 128.252.19.1                                       
28 Jul 16:06:48 ntpdate[47984]: no server suitable for synchronization found    
[root@freenas ~]# ping www.google.com                                           
PING www.l.google.com (74.125.45.105): 56 data bytes                            
64 bytes from 74.125.45.105: icmp_seq=0 ttl=52 time=23.781 ms                   
64 bytes from 74.125.45.105: icmp_seq=1 ttl=52 time=25.143 ms                   
64 bytes from 74.125.45.105: icmp_seq=2 ttl=52 time=24.415 ms                   
64 bytes from 74.125.45.105: icmp_seq=3 ttl=52 time=23.501 ms                   
^C                                                                              
--- www.l.google.com ping statistics ---   
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875
Hi MSCFAdmin,

Well that just doesn't make any sense....

How far off is your clock? Can you set the date on the system as close to "right now" as you can and try "ntpdate -d 128.252.19.1" or "sntp -v 128.252.19.1"...also try with 0.pool.ntp.org as the server name.

-Will
 

MSCFAdmin

Dabbler
Joined
Jul 26, 2012
Messages
17
I have previously set it with ntpdate, and all the errors I've been seeing have been after that. It is currently about 45 seconds off my internal time server. Here are the results of those commands:

Code:
[root@freenas ~]# ntpdate -d 128.252.19.1                                       
28 Jul 16:22:00 ntpdate[48256]: ntpdate 4.2.4p5-a (1)                           
transmit(128.252.19.1)                                                          
transmit(128.252.19.1)                                                          
transmit(128.252.19.1)                                                          
transmit(128.252.19.1)                                                          
transmit(128.252.19.1)                                                          
128.252.19.1: Server dropped: no data                                           
server 128.252.19.1, port 123                                                   
stratum 0, precision 0, leap 00, trust 000                                      
refid [128.252.19.1], delay 0.00000, dispersion 64.00000                        
transmitted 4, in filter 4                                                      
reference time:    00000000.00000000  Thu, Feb  7 2036  0:28:16.000             
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  0:28:16.000           
transmit timestamp:  d3bed67b.6d8796eb  Sat, Jul 28 2012 16:22:03.427           
filter delay:  0.00000  0.00000  0.00000  0.00000                               
         0.00000  0.00000  0.00000  0.00000                                     
filter offset: 0.000000 0.000000 0.000000 0.000000                              
         0.000000 0.000000 0.000000 0.000000                                    
delay 0.00000, dispersion 64.00000                                              
offset 0.000000                                                                 
                                                                                
28 Jul 16:22:04 ntpdate[48256]: no server suitable for synchronization found    [root@freenas ~]# ntpdate -d 128.252.19.1                                       
28 Jul 16:22:00 ntpdate[48256]: ntpdate 4.2.4p5-a (1)                           
transmit(128.252.19.1)                                                          
transmit(128.252.19.1)                                                          
transmit(128.252.19.1)                                                          
transmit(128.252.19.1)                                                          
transmit(128.252.19.1)                                                          
128.252.19.1: Server dropped: no data                                           
server 128.252.19.1, port 123                                                   
stratum 0, precision 0, leap 00, trust 000                                      
refid [128.252.19.1], delay 0.00000, dispersion 64.00000                        
transmitted 4, in filter 4                                                      
reference time:    00000000.00000000  Thu, Feb  7 2036  0:28:16.000             
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  0:28:16.000           
transmit timestamp:  d3bed67b.6d8796eb  Sat, Jul 28 2012 16:22:03.427           
filter delay:  0.00000  0.00000  0.00000  0.00000                               
         0.00000  0.00000  0.00000  0.00000                                     
filter offset: 0.000000 0.000000 0.000000 0.000000                              
         0.000000 0.000000 0.000000 0.000000                                    
delay 0.00000, dispersion 64.00000                                              
offset 0.000000                                                                 
                                                                                
28 Jul 16:22:04 ntpdate[48256]: no server suitable for synchronization found    


Code:
... bunch of IPs...
transmit timestamp:  d3bed6cc.7f7e6282  Sat, Jul 28 2012 16:23:24.498           
filter delay:  0.00000  0.00000  0.00000  0.00000                               
         0.00000  0.00000  0.00000  0.00000                                     
filter offset: 0.000000 0.000000 0.000000 0.000000                              
         0.000000 0.000000 0.000000 0.000000                                    
delay 0.00000, dispersion 64.00000                                              
offset 0.000000                                                                 
                                                                                
server 64.191.49.17, port 123                                                   
stratum 0, precision 0, leap 00, trust 000                                      
refid [64.191.49.17], delay 0.00000, dispersion 64.00000                        
transmitted 4, in filter 4                                                      
reference time:    00000000.00000000  Thu, Feb  7 2036  0:28:16.000             
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  0:28:16.000           
transmit timestamp:  d3bed6cc.b2b09d4e  Sat, Jul 28 2012 16:23:24.698           
filter delay:  0.00000  0.00000  0.00000  0.00000                               
         0.00000  0.00000  0.00000  0.00000                                     
filter offset: 0.000000 0.000000 0.000000 0.000000                              
         0.000000 0.000000 0.000000 0.000000                                    
delay 0.00000, dispersion 64.00000                                              
offset 0.000000                                                                 
                                                                                
28 Jul 16:23:25 ntpdate[48284]: no server suitable for synchronization found 


Code:
[root@freenas ~]# sntp -v 128.252.19.1                                          
sntp options: a=1 v=1 e=0.100 E=5.000 P=30.000                                  
    d=15 c=5 x=0 op=1 l= f= 128.252.19.1                                        
                                                                                
sntp: not enough valid responses received in time   


Code:
[root@freenas ~]# sntp -v 0.pool.ntp.org                                        
sntp options: a=1 v=1 e=0.100 E=5.000 P=30.000                                  
    d=15 c=5 x=0 op=1 l= f= 0.pool.ntp.org                                      
sntp: not enough valid responses received in time   
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875
So what do you get when you try to sync to your internal time server?

It sure looks like you just can't talk out port 123.

-Will
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875

MSCFAdmin

Dabbler
Joined
Jul 26, 2012
Messages
17
I'm 3 minutes off the navy time on my time server.

It looks like the ntpdate works with my internal server:
Code:
transmit(10.161.10.1)                                                           
receive(10.161.10.1)                                                            
transmit(10.161.10.1)                                                           
receive(10.161.10.1)                                                            
transmit(10.161.10.1)                                                           
receive(10.161.10.1)                                                            
transmit(10.161.10.1)                                                           
server 10.161.10.1, port 123                                                    
stratum 1, precision -6, leap 00, trust 000                                     
refid [LOCL], delay 0.04149, dispersion 0.00031                                 
transmitted 4, in filter 4                                                      
reference time:    d3bee0e0.57f7ced9  Sat, Jul 28 2012 17:06:24.343             
originate timestamp: d3bfc320.64000000  Sun, Jul 29 2012  9:11:44.390           
transmit timestamp:  d3bfc2e9.488c8436  Sun, Jul 29 2012  9:10:49.283           
filter delay:  0.04208  0.04150  0.04149  0.04150                               
         0.00000  0.00000  0.00000  0.00000                                     
filter offset: 55.10822 55.10764 55.10736 55.10709                              
         0.000000 0.000000 0.000000 0.000000                                    
delay 0.04149, dispersion 0.00031                                               
offset 55.107360                                                                
                                                                                
29 Jul 09:10:49 ntpdate[61430]: step time server 10.161.10.1 offset 55.107360 se
c   


But I see the following shows up in my console still
Code:
Jul 29 09:12:16 freenas ntpd[61553]: ntpd 4.2.4p5-a (1)
Jul 29 09:12:16 freenas ntpd[61554]: unable to bind to wildcard socket address 0.0.0.0 - another process may be running - EXITING
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You sure you don't have another copy of ntpd running? Check if something's listening on port 123 ("netstat -an|grep 123").

I'd forget all this advice about alternate time servers. If your other gear is all synced to your internal clock, even if its time is wrong, any problems with authentication relating to time are only going to be made worse if your machines do not have a common network clock. You don't need outside connectivity or a default route to be talking on the local network, and the steps you had already taken were showing your problems not to be network related, but rather a problem with your local VM's clock. You were much better off working with your local clock.
 

MSCFAdmin

Dabbler
Joined
Jul 26, 2012
Messages
17
Nothing else shows up with the netstat command. And I do have 5 other servers hosted on this VM (all Windows) with no time keeping issues.
 
Status
Not open for further replies.
Top