LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-17-2020, 04:42 PM   #16
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76

Code:
root@darkstar:~# ntpdate pool.ntp.org
17 Aug 21:40:03 ntpdate[1131]: the NTP socket is in use, exiting
root@darkstar:~#
This was under debian 10. I first, by mistake, installed ntp. Then, recognizing my error, install ntpdate. Now, this is the output I get. Why?

I even reboot and ran the command again.

Last edited by stf92; 08-17-2020 at 04:43 PM.
 
Old 08-17-2020, 05:18 PM   #17
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Quote:
Originally Posted by stf92 View Post
I have first to set the hardware clock to the correct time in the BIOS menu. Once this is done, I'll issue the above command and see what happens.
No, use the date --set="string" to set the system clock.

[/quote]date --set="17 AUG 2020 18:00:00" [/quote]


You can not run ntp and command ntpdate at the same time since they both use the same port. Stop ntp first.

ntpdate is run once to sync time but ntp runs continuously.

Last edited by michaelk; 08-17-2020 at 05:19 PM.
 
Old 08-17-2020, 06:50 PM   #18
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Code:
root@darkstar:/etc/init.d# ntpd stop
root@darkstar:/etc/init.d# ntpdate pool.ntp.org
17 Aug 23:45:16 ntpdate[1368]: the NTP socket is in use, exiting
root@darkstar:/etc/init.d# update-rc.d -f ntpd remove
root@darkstar:/etc/init.d# ntpdate pool.ntp.org
17 Aug 23:48:03 ntpdate[1421]: the NTP socket is in use, exiting
root@darkstar:/etc/init.d#
How do I stop ntp?
 
Old 08-17-2020, 07:05 PM   #19
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Check processes to see if it is really running
 
Old 08-17-2020, 07:08 PM   #20
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Code:
root@darkstar:/etc/init.d# ps -e|grep ntp
  504 ?        00:00:00 ntpd
root@darkstar:/etc/init.d#
 
Old 08-17-2020, 07:35 PM   #21
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
ntp is still running.

update-rc will remove the service from automatically starting at boot but not stop a running service.

/etc/rc.d/rc.ntpd stop
 
Old 08-17-2020, 07:44 PM   #22
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
My fault. I am in Debian. No /etc/rc.d in Debian. But Debian is the OS that seems to have the problem. Should I stay on it?

Last edited by stf92; 08-17-2020 at 08:01 PM.
 
Old 08-17-2020, 08:51 PM   #23
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
debian 10 uses systemd. ntpdate has been deprecated but it is still in the repositories.

systemctl status ntp

systemctl stop ntp

timedatectl status should show RTC in local TZ: no. To match slackware run the command.

timedatectl set-local-rtc 1
 
Old 08-18-2020, 06:09 AM   #24
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Code:
root@darkstar:~# systemctl status ntp
● ntp.service - Network Time Service
   Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-08-18 07:17:04 UTC; 3h 44min ago
     Docs: man:ntpd(8)
  Process: 492 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
 Main PID: 503 (ntpd)
    Tasks: 2 (limit: 2249)
   Memory: 2.5M
   CGroup: /system.slice/ntp.service
           └─503 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 115:123

Aug 18 10:31:05 darkstar ntpd[503]: Soliciting pool server 159.69.38.175
Aug 18 10:31:05 darkstar ntpd[503]: Soliciting pool server 195.21.137.209
Aug 18 10:43:36 darkstar ntpd[503]: 151.80.124.104 local addr 192.168.0.107 -> <null>
Aug 18 10:43:41 darkstar ntpd[503]: 195.21.137.209 local addr 192.168.0.107 -> <null>
Aug 18 10:43:44 darkstar ntpd[503]: 158.174.65.248 local addr 192.168.0.107 -> <null>
Aug 18 10:43:45 darkstar ntpd[503]: 159.69.38.175 local addr 192.168.0.107 -> <null>
Aug 18 10:44:36 darkstar ntpd[503]: 103.120.116.13 local addr 192.168.0.107 -> <null>
Aug 18 10:49:13 darkstar ntpd[503]: 31.131.0.123 local addr 192.168.0.107 -> <null>
Aug 18 10:51:27 darkstar ntpd[503]: 103.76.40.123 local addr 192.168.0.107 -> <null>
Aug 18 10:57:05 darkstar ntpd[503]: 95.97.2.35 local addr 192.168.0.107 -> <null>
root@darkstar:~# systemctl stop ntp
Code:
root@darkstar:~# timedatectl status 
               Local time: Tue 2020-08-18 11:06:04 UTC
           Universal time: Tue 2020-08-18 11:06:04 UTC
                 RTC time: Tue 2020-08-18 11:06:04
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: inactive
          RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode cannot be fully supported. It will create various problems
         with time zone changes and daylight saving time adjustments. The RTC
         time is never updated, it relies on external facilities to maintain it.
         If at all possible, use RTC in UTC by calling
         'timedatectl set-local-rtc 0'.
root@darkstar:~#
This is really weird. I had both Arch and Debian in this machine and had no problems with the clock except it couldn't be written. At most, when the machine hanged, I had to manually turn off the machine using the power button and, in this case, maybe I found the RTC contained an incorrect value.

Last edited by stf92; 08-18-2020 at 06:30 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
[SOLVED] Gigabyte BIOS clock is six 6 hours ahead of desktop clock. 1sweetwater! Linux - Desktop 13 04-18-2013 12:48 PM
how unstable is unstable? microsoft/linux Debian 11 01-06-2006 06:12 AM
is ubuntu unstable less unstable than debian unstable? lefty.crupps Ubuntu 9 10-14-2005 01:38 PM
Unstable is really unstable... shorty_boy Debian 22 09-16-2005 01:46 PM
Just how unstable is unstable??? R00ts Debian 8 02-12-2005 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:25 AM.

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