You are not logged in.

#1 2013-06-10 23:52:05

gregoryjm
Member
Registered: 2013-01-26
Posts: 9

timedatectl returns error: Failed to issue method call

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

#2 2013-06-11 00:20:59

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

Re: timedatectl returns error: Failed to issue method call

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

#3 2013-06-11 01:19:20

gregoryjm
Member
Registered: 2013-01-26
Posts: 9

Re: timedatectl returns error: Failed to issue method call

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

#4 2013-06-11 02:43:56

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

Re: timedatectl returns error: Failed to issue method call

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

#5 2013-06-11 03:33:00

gregoryjm
Member
Registered: 2013-01-26
Posts: 9

Re: timedatectl returns error: Failed to issue method call

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

#6 2013-06-11 03:40:58

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

Re: timedatectl returns error: Failed to issue method call

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

#7 2013-06-11 04:02:36

gregoryjm
Member
Registered: 2013-01-26
Posts: 9

Re: timedatectl returns error: Failed to issue method call

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

#8 2013-06-11 04:19:04

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

Re: timedatectl returns error: Failed to issue method call

Do you have an /etc/hostname file, and what is in it?

Offline

#9 2013-06-11 04:37:43

gregoryjm
Member
Registered: 2013-01-26
Posts: 9

Re: timedatectl returns error: Failed to issue method call

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

#10 2013-06-11 04:58:20

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

Re: timedatectl returns error: Failed to issue method call

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

#11 2013-06-11 05:21:03

gregoryjm
Member
Registered: 2013-01-26
Posts: 9

Re: timedatectl returns error: Failed to issue method call

Ah actually I did not know that, thanks for the info, hopefully I won't make that mistake again though lol.

Offline

#12 2013-06-11 07:46:13

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: timedatectl returns error: Failed to issue method call

If your problems are fixed, please mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

#13 2013-06-11 17:03:11

gregoryjm
Member
Registered: 2013-01-26
Posts: 9

Re: timedatectl returns error: Failed to issue method call

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

Board footer

Powered by FluxBB