You are not logged in.

#1 2012-09-03 14:46:13

miek
Member
Registered: 2012-09-03
Posts: 25
Website

[Solved] Localtime is messed up, and pacman doesn't work anymore

Hi everyone,

I'm quite new to Arch Linux but I've succeded so far in installing the base system, setting up my wifi card (wasn't easy) and installing xfce4. When I first installed everything seemed to work fine (wifi, dropbox, pacman, etc.) but I noticed that my time doesn't reflect the current local time. I've selected America/Montreal in rc.conf and through "Orage Globaltime" in xfce4 but both return the UTC instead of the localtime. Also, when I try to get the UTC from Orage, it returns my localtime instead (Montreal)...

So there's definitely something wrong there. I've then had a look at the forums/wiki and found that a network synchronisation should be used to correct the issue (such as ntp) but now pacman can't connect to anything. It returns something like this when I try to install/update/search:

$ sudo pacman -Syu
Password:
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from mirror.us.leaseweb.net : Connection time-out
^C (keeps on getting time-outs if I don't interrupt)

##############################

Some info on my system:
---------------------------------
General info: as stated above, internet over wifi (wlan0) works, pacman times-out and the local time is off.

$ uname -a
Linux giga-arch 3.5.3-1-ARCH #1 SMP PREEMPT Sun Aug 26 08:15:06 UTC 2012 i686 GNU/Linux ---(today's Sept 3, ~10:35am)---

$ cat rc.conf
DAEMONS=(syslog-ng network crond)
TIMEZONE="America/Montreal"

$ ip addr
...
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 84:c9:b2:00:41:e3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.179/24 brd 192.168.0.255 scope global wlan0
    inet6 fe80::86c9:b2ff:fe00:41e3/64 scope link
        valid_lft forever preferred_lft forever

$ cat /var/log/pacman.log
...
[2012-09-02 16:31] starting full system upgrade
[2012-09-02 18:16] Running 'pacman -S ntop'
[2012-09-02 18:17] installed rrdtool (1.4.7-2)
[2012-09-02 18:17] installed geoip-database (20120808-1)
[2012-09-02 18:17] installed geoip (1.4.8-2)
[2012-09-02 18:17] ==> Before running the daemon script for the first time, you need to run
[2012-09-02 18:17]     ntop as the root user to set an administrator password.
[2012-09-02 18:17] ==> If you attempt to run ntop as a daemon without setting a password, a
[2012-09-02 18:17]     FATAL ERROR message is generated and ntop stops.
[2012-09-02 18:17] installed ntop (5.0-2)               <------------ At this point pacman worked, but the time wasn't right (it was ~22:17)
[2012-09-03 04:43] Running 'pacman -Syu ntp'      <------------ From this point on pacman would time-out continually
[2012-09-03 04:43] synchronizing package lists
[2012-09-03 04:45] Running 'pacman -S ntp'
[2012-09-03 04:51] Running 'pacman -Syu'
[2012-09-03 04:51] synchronizing package lists
[2012-09-03 04:51] Running 'pacman -Syu'
[2012-09-03 04:51] synchronizing package lists
[2012-09-03 06:00] Running 'pacman -Syu'
[2012-09-03 06:00] synchronizing package lists
[2012-09-03 06:30] Running 'pacman -Syu'
[2012-09-03 06:30] synchronizing package lists
...

$ ls -lhA /etc | grep localtime
lrwxrwxrwx 1 root root   36 Sep  3 04:34 localtime -> /usr/share/zoneinfo/America/Montreal

##############################

My first guess was that the localtime offset was preventing me from accessing pacman's repositories, but since it worked yesterday (when the time was already corrupt) it seems otherwize. Now I'm quite lost, especially since no one seems to report every pacman repository being down... could anyone please help me solve this problem?

Thanks!

Last edited by miek (2012-09-03 20:28:44)

Offline

#2 2012-09-03 14:58:29

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Localtime is messed up, and pacman doesn't work anymore

Welcome to the forum.

I've selected America/Montreal in rc.conf

Then you didn't follow the Beginners' Guide or you didn't use the latest Arch Linux ISO.

We don't set TIMEZONE in rc.conf anymore. It's considered deprecated now.

Try:

# pacman -Syy

And can you ping Google?

Last edited by DSpider (2012-09-03 14:58:51)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2012-09-03 15:07:03

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] Localtime is messed up, and pacman doesn't work anymore

I think you may find relevant information here.  I ahve seem many of these threads in the forums lately.  Are you dual booting w/ another operating system... in particular, one that uses localtime for the hardware clock (and there is only one that does this).

Offline

#4 2012-09-03 17:35:31

miek
Member
Registered: 2012-09-03
Posts: 25
Website

Re: [Solved] Localtime is messed up, and pacman doesn't work anymore

DSpider wrote:

Welcome to the forum.

I've selected America/Montreal in rc.conf

Then you didn't follow the Beginners' Guide or you didn't use the latest Arch Linux ISO.

We don't set TIMEZONE in rc.conf anymore. It's considered deprecated now.

Try:

# pacman -Syy

And can you ping Google?

I did follow the beginners' guide at first but the resulting time was wrong so I tried this fix from another thread/wiki (can't remember).

Typing

# pacman -Syy

seems to have solved the issue with pacman. I'll have to look deeper into pacman's doc, I don't understand why -Syu couldn't connect to the servers (time-out) and -Syy can...

Yes I can ping google.

Offline

#5 2012-09-03 17:40:52

miek
Member
Registered: 2012-09-03
Posts: 25
Website

Re: [Solved] Localtime is messed up, and pacman doesn't work anymore

WonderWoofy wrote:

I think you may find relevant information here.  I ahve seem many of these threads in the forums lately.  Are you dual booting w/ another operating system... in particular, one that uses localtime for the hardware clock (and there is only one that does this).

Thanks I'll look at that entry. Still I'd like to point out that this page clearly says that the timezone is to be set in rc.conf, which is a bit confusing. I must've followed this guide to get to my current configuration. I am dual booting with multiple other systems (xubuntu, win7, puppy, crunchbang) so from what I've read win7 might be the problem, but I haven't started it since i installed arch and my time has been off from the start.

Should I simply use NTP now that pacman is working again?

Thanks

Last edited by miek (2012-09-03 17:41:56)

Offline

#6 2012-09-03 20:28:21

miek
Member
Registered: 2012-09-03
Posts: 25
Website

Re: [Solved] Localtime is messed up, and pacman doesn't work anymore

Installing NTP and adding it to the startup daemons in rc.conf worked, now the localtime shows 16:25 and the UTC (hwclock) returns 12:25, which is correct.

Offline

#7 2012-09-03 20:29:51

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved] Localtime is messed up, and pacman doesn't work anymore

Windows 7 is the problem.  You need to look at that link I gave to solve it.  Don't forget to also disable your windows ntp server, and I also disabled I service called Windows Time, but I am not sure if this is necessary.  TBH, I don't really care much about my Windows install... it can break for all I care, and knowing Windows, it probably will.

Offline

Board footer

Powered by FluxBB