# NTP Failed

## AsianSpices

Hi i am trying to set my clock to sync with a ntp server

I have configured my Ntp-client as they say in this site http://gentoo-wiki.com/HOWTO_NTP

i configured /etc/conf.d/ntp-client  to specify the server that i want to sync to

I ahve also configured /etc/conf.d/ntpd 

but when i start the service

i get this error.

 *Quote:*   

> 
> 
> root@mercury NTP # /etc/init.d/ntp-client start
> 
> shell-init: could not get current directory: getcwd: cannot access parent directories: No such file or directory
> ...

 

can anyone please help me.

Thansk alot  :Smile: 

----------

## ikaro

make sure the directories exist and that ntpd isnt running already when you start it.

----------

## AsianSpices

What directories?

Can you be a bit more specific?

I belive they do exist by the way...

and No the service was not running from befor..

----------

## AsianSpices

this is what the ntp.log file looks like...

 *Quote:*   

> 
> 
> 18 Jul 03:52:16 ntpd[28282]: ntpd exiting on signal 15
> 
> 18 Jul 03:52:42 ntpd[28422]: sendto(204.209.209.91): Bad file descriptor
> ...

 

this is what happens when i try to do a ntpq -p

 *Quote:*   

> 
> 
> root@mercury logs # ntpq -p
> 
> localhost: timed out, nothing received
> ...

 

----------

## ikaro

check that /var/lib/ntp exists

```

shell-init: could not get current directory: getcwd: cannot access parent directories: No such file or directory

```

use killall ntpd and/or  /etc/init.d/ntpd [stop|zap]

```

18 Jul 03:33:40 ntpdate[28212]: the NTP socket is in use, exiting

* Failed to set clock [ !! ]

```

----------

## AsianSpices

Okie/var/lib/ntp does exist 

 *Quote:*   

> 
> 
> root@mercury logs # /var/lib/ntp/
> 
> bash: /var/lib/ntp/: is a directory
> ...

 

----------

## ikaro

so it works now ?

check if the drift file is owned by ntp:ntp

----------

## AsianSpices

No it does not work  :Sad: 

----------

## AsianSpices

 *Quote:*   

> 
> 
> root@mercury logs # ls -al /var/lib/ntp/
> 
> total 4
> ...

 

----------

## AsianSpices

 *Quote:*   

> 
> 
> root@mercury logs # ntpd -d
> 
> ntpd 4.2.0@1.1161-r Mon Jul 18 03:16:42 UTC 2005 (1)
> ...

 

----------

