Ubuntu Linux server schedule delayed

Asked

Viewed 693 times

1

I have a Linux server running Ubuntu 14.4, configured with the timezone America/Sao_Paulo.

But the time he is picking up this 2 min late, it seems little thing, but as the system that runs on it needs to enable functionality at certain exact times, the user ends up thinking it is a mistake.

Using the command date he shows me the following time

$ date

Wed Feb 3 17:00:18 BRST 2016

But now it’s 17:02

  • 1

    Probably no NTP (date/time timing) active on the machine. If it is VM, you may need to configure the synchronization in the virtualization system (installing the VM client in the OS can be a path).

  • Thank you @Bacco, it worked perfectly, if you can put this as a response for me to select and help others in the future :) - I used this tutorial

  • 1

    Jeferson, if you could just briefly post how you solved it, as your answer, it would be of great value to others with the same problem. I could even try to research and elaborate something specific for Ubuntu, but as you are with "the hand in the dough", I think you could elaborate faster than me. If they are machines in Brazil, recommend using the servers a.ntp.br, b.ntp.br and c.ntp.br, because of shorter response time than outside.

1 answer

0

I was able to solve my problem with the help of @Bacco by installing NTP on the server.

1º Install the NTL

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ntp ntpdate

2º Change the settings in the file ntp.conf

sudo nano /etc/ntp.conf

3º Change the default server by the server of your choice

Change that part that is in the settings

server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com

For

server 0.br.pool.ntp.org
server 1.br.pool.ntp.org
server 2.br.pool.ntp.org
server 3.br.pool.ntp.org

(If you want to use the Brazilian server - full list of servers)

4º After 10 - 20 minutes you have taken the above steps, NTP will sync the times.

You can run the code below to view delay information between servers and other information

5º Stop and start NTP service

sudo service ntp start
sudo service ntp stop
sudo service ntp restart

I used this tutorial to solve the problem by following the @Bacco tip

Browser other questions tagged

You are not signed in. Login or sign up in order to post.