Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
systemctl --user not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
foux
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2004
Posts: 89
Location: Rennes, France

PostPosted: Sat Oct 04, 2014 12:03 pm    Post subject: systemctl --user not working Reply with quote

Hello,

I've installed a new server, trying for the first time systemd.

Everything works like a charm, except for systemctl --user, which always returns

Code:
Failed to get D-Bus connection: Connexion refusée


(Connexion refusée means Connection refused)

Any idea where this might come from?

Thanks
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Sat Oct 04, 2014 12:44 pm    Post subject: Reply with quote

That means d-bus didn't get started, and likely also means systemd never got started... Check if your bootloader whether or not it starts systemd instead of the default init?

init=/usr/lib/systemd/systemd

(or in my case, my custom initramfs needs real_init=/usr/lib/systemd/systemd)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
foux
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2004
Posts: 89
Location: Rennes, France

PostPosted: Sat Oct 04, 2014 1:01 pm    Post subject: Reply with quote

Systemd is indeed started with grub :

Code:
genlight system # ps -p 1 -o comm=
systemd


DBus is also started.

I've got no problem with systemctl as root, It's only when I'm with another user and I try to do any operation with systemctl --user that I've got the problem

Here's my systemctl --status :

Code:
genlight system # systemctl status
● genlight.tfdn.org
    State: degraded
     Jobs: 0 queued
   Failed: 1 units
    Since: sam. 2014-10-04 13:25:55 CEST; 1h 33min ago
   CGroup: /
           ├─1 /usr/lib/systemd/systemd
           ├─system.slice
           │ ├─nginx.service
           │ │ ├─15936 nginx: master process /usr/sbin/ngin
           │ │ ├─15937 nginx: worker proces
           │ │ ├─15938 nginx: worker proces
           │ │ ├─15939 nginx: worker proces
           │ │ └─15940 nginx: worker proces
           │ ├─systemd-networkd.service
           │ │ └─11270 /usr/lib/systemd/systemd-networkd
           │ ├─dhcpcd.service
           │ │ └─9620 /sbin/dhcpcd -q --nobackground
           │ ├─mysqld.service
           │ │ ├─3953 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           │ │ └─4470 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --log-error=/var/log/mysql/mysqld.err --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
           │ ├─sshd.service
           │ │ └─3985 /usr/sbin/sshd -D -e
           │ ├─deluge-web.service
           │ │ └─3948 /usr/bin/python2.7 /usr/bin/deluge-web -l /var/log/deluge/web.log -L warning
           │ ├─deluged.service
           │ │ └─3947 /usr/bin/python2.7 /usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning
           │ ├─dbus.service
           │ │ └─3919 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
           │ ├─systemd-logind.service
           │ │ └─3903 /usr/lib/systemd/systemd-logind
           │ ├─systemd-timesyncd.service
           │ │ └─3888 /usr/lib/systemd/systemd-timesyncd
           │ ├─systemd-udevd.service
           │ │ └─3882 /usr/lib/systemd/systemd-udevd
           │ ├─systemd-journald.service
           │ │ └─3408 /usr/lib/systemd/systemd-journald
           │ ├─system-dropbox.slice
           │ │ └─dropbox@foux.service
           │ │   ├─27656 /home/foux/.dropbox-dist/dropbox-lnx.x86_64-2.10.30/dropbox /newerversion
           │ │   └─27700 /opt/dropbox/dropbox
           │ └─system-php\x2dfpm.slice
           │   └─php-fpm@5.5.service
           │     ├─3950 php-fpm: master process (/etc/php/fpm-php5.5/php-fpm.conf)                   
           │     ├─4481 php-fpm: pool www                                                           
           │     ├─4482 php-fpm: pool www                                                           
           │     ├─4483 php-fpm: pool www                                                           
           │     ├─4484 php-fpm: pool www                                                           
           │     ├─4485 php-fpm: pool www                                                           
           │     ├─4486 php-fpm: pool www                                                           
           │     ├─4487 php-fpm: pool www                                                           
           │     ├─4488 php-fpm: pool www                                                           
           │     ├─4489 php-fpm: pool www                                                           
           │     ├─4490 php-fpm: pool www                                                           
           │     ├─4491 php-fpm: pool www                                                           
           │     ├─4492 php-fpm: pool www                                                           
           │     ├─4493 php-fpm: pool www                                                           
           │     ├─4494 php-fpm: pool www                                                           
           │     ├─4495 php-fpm: pool www                                                           
           │     ├─4496 php-fpm: pool www                                                           
           │     ├─4497 php-fpm: pool www                                                           
           │     ├─4498 php-fpm: pool www                                                           
           │     ├─4499 php-fpm: pool www                                                           
           │     └─4500 php-fpm: pool www                                                           
           └─user.slice
             └─user-0.slice
               ├─session-c5.scope
               │ ├─12637 sshd: root@pts/2       
               │ └─12814 -bash
               ├─session-c3.scope
               │ ├─22590 sshd: root@pts/1       
               │ ├─22688 -bash
               │ ├─24027 man systemd.time
               │ └─24039 less
               ├─session-c2.scope
               │ ├─10402 sshd: root@pts/0       
               │ ├─10492 -bash
               │ ├─27725 systemctl status
               │ └─27726 /usr/bin/less
               ├─session-c1.scope
               │ ├─3934 /bin/login --     
               │ └─9416 -bash
               └─user@0.service
                 ├─9412 /usr/lib/systemd/systemd --user
                 └─9414 (sd-pam)


Any other idea where this might come from?

Thanks
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Sat Oct 04, 2014 2:30 pm    Post subject: Reply with quote

Hmm... Ok I don't get this at all. Can't use --user on my machine with root (sudoed) but works with an unprivlileged user.
More for me to study... https://wiki.archlinux.org/index.php/Systemd/User
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
foux
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2004
Posts: 89
Location: Rennes, France

PostPosted: Sat Oct 04, 2014 2:50 pm    Post subject: Reply with quote

It is unfortunately the same with su.

I will look at your arch link, thanks
Back to top
View user's profile Send private message
foux
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2004
Posts: 89
Location: Rennes, France

PostPosted: Sun Oct 05, 2014 1:39 pm    Post subject: Reply with quote

I kinda fixed it, thanks to you.

As it turns out, I only tried systemctl --user while sudoed into an user.
If I connect to this user directly, it works.

Not ideal, but at least I'm able to do what I want
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum