You are not logged in.
So I have just finished the recent update and in the process of doing so I changed to systemd as my system and service manager.
I know systemd is active:
$ cat /proc/1/comm
systemd
when I try to run timedatectl I get:
$ timedatectl
Failed to issue method call: Activation of org.freedesktop.timedate1 timed out
If I try with sudo I get this:
$ sudo timedatectl
Failed to issue method call: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
My time is set to UTC:
cat /etc/adjtime
0.000000 1370906669 0.000000
1370906669
UTC
If I try check the time and date service status after trying to start with systemctl I get this:
sudo systemctl status systemd-timedated
systemd-timedated.service - Time & Date Service
Loaded: loaded (/usr/lib/systemd/system/systemd-timedated.service; static)
Active: failed (Result: exit-code) since Mon 2013-06-10 19:12:51 EDT; 28min ago
Docs: man:systemd-timedated.service(8)
man:localtime(5)
http://www.freedesktop.org/wiki/Software/systemd/timedated
Process: 950 ExecStart=/usr/lib/systemd/systemd-timedated (code=exited, status=1/FAILURE)
Jun 10 19:12:26 LittleBeast systemd[1]: Starting Time & Date Service...
Jun 10 19:12:51 LittleBeast systemd[1]: systemd-timedated.service: main process exited, code=e...URE
Jun 10 19:12:51 LittleBeast systemd[1]: Failed to start Time & Date Service.
Jun 10 19:12:51 LittleBeast systemd[1]: Unit systemd-timedated.service entered failed state.
I also have the same problem with hostnamectl.
Searching the forums and google I find that people have trouble setting the timezone (which I also can not do with timedatectl) but I have not seen anyone else who has systemd active and cannot get the basic output from timedatectl.
If I try and set timedatectl timezone I get this:
sudo timedatectl set-timezone America/Los_Angeles
Error getting authority: Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)
However, timedatectl list-timezones works properly.
timedatectl version:
$ timedatectl --version
systemd 204
+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ
Offline
I'm not entirely sure, but I think you need to ensure that your session is active (with logind/loginctl) in order to do this. I might be totally wrong though. Those functions use dbus though, so for example, if you are in a chroot it will not work.
Offline
Ok, I tried loginctl and this is what I got:
135/995MB 0.33 0.26 0.33 1/216 1763
[408:403 1:559] 09:16:03 Mon Jun 10 [sphere@LittleBeast: +3] ~
(3:559)$ loginctl
SESSION UID USER SEAT
1 1000 sphere seat0
1 sessions listed.
That should mean I am logged in since I am user sphere?
Offline
Oh, you need to use loginctl to see if you have an active session. But again, I am not entirely sure if this is necessary for the use of timedatectl...
loginctl show-session <session #>
Offline
Ok thanks, here is my output from loginctl:
105/995MB 1.61 0.73 0.43 2/232 2390
[408:403 1:567] 11:30:29 Mon Jun 10 [sphere@LittleBeast: +3] ~
(3:567)$ loginctl show-session 1
Id=1
Timestamp=Mon 2013-06-10 23:30:19 EDT
TimestampMonotonic=16156992518
DefaultControlGroup=systemd:/user/1000.user/1.session
VTNr=1
TTY=tty1
Remote=no
Service=login
Leader=199
Audit=1
Type=tty
Class=user
Active=yes
State=active
KillProcesses=no
IdleHint=yes
IdleSinceHint=1370905928856632
IdleSinceHintMonotonic=666398821
Name=sphere
Offline
Your session is active... so I don't know enough about timedatectl to get you any further. Apparently what I thought I did know about timedatectl was wrong anyway.
If all you are trying to do is set the time, you should just create the /etc/localtime symlink manually. You can find the necessary file to symlink to in /usr/share/zoneinfo where you will find your continent and a city that represents your timezone. For example, mine would be /usr/share/zoneinfo/America/Los_Angeles.
Offline
Ok thanks,
I went ahead and did but I had to force it because /etc/localtime was already there:
$ sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
This fixes my timezone problem...
Which seems OK
but I also have the same problems with hostnamectl as timedatectl and was hoping to fix those ctl programs. I had to also manually change my hostname, I sort of think there might be a relationship between these problems. Systemctl seems to work fine though.
Offline
Do you have an /etc/hostname file, and what is in it?
Offline
I did not have one for a while because I accidentally deleted it and I accidentally deleted my /etc/passwd file along with some other file(I think it was the /etc/shadow file) that made it a real pain to login and I had to use puppy linux on a usb to make a new one in order to be able to log back into arch.
(I accidentally deleted it while trying to reset my login info because I had a setup where it would lock me out after an incorrect password)
Seems possible I might have messed something up while doing this.
When I had init my hostname was no-name, with systemd it was localhost until I changed it manually.
Anyways, now my hostname reads this:
144/995MB 0.80 0.62 0.52 11/218 2672
[408:403 1:582] 09:29:05 Mon Jun 10 [sphere@LittleBeast: +3] ~
(3:582)$ cat /etc/hostname
LittleBeast
Last edited by gregoryjm (2013-06-11 04:40:25)
Offline
You know that the system saves copies of /etc/shadow, /etc/group, /etc/gpasswd and /etc/passwd ? The saved ones end in a '-'. This is so that you can recover from mistakes like that.
Offline
Ah actually I did not know that, thanks for the info, hopefully I won't make that mistake again though lol.
Offline
If your problems are fixed, please mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309
Offline
Problem is not fixed. timedatectl still has the exact errors I mentioned in the first post. I never mentioned that the problem was fixed...
Last edited by gregoryjm (2013-06-11 17:04:08)
Offline