LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-22-2016, 03:41 PM   #1
resuni
Member
 
Registered: Oct 2009
Location: Colorado, USA
Distribution: I use Arch btw
Posts: 142

Rep: Reputation: 12
Are systemd user services feasible on CentOS?


I've spent a few hours now trying to get a systemd user instance to run. On a fresh install of CentOS 7, when I try to run a systemctl --user command as a user, this is what happens:

Code:
$ systemctl --user status
Failed to get D-Bus connection: No such file or directory
Compared to my Arch Linux machine:

Code:
$ systemctl --user status
● snowflake
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Sun 2016-04-24 10:54:10 MDT; 4 weeks 0 days ago
   CGroup: /user.slice/user-1000.slice/user@1000.service
           ├─dbus.service
           │ ├─ 3633 /usr/bin/dbus-daemon --session --address=systemd: --nofork 
           │ ├─ 3641 /usr/lib/GConf/gconfd-2
           │ ├─ 5587 /usr/lib/dconf/dconf-service
           │ └─27011 /usr/lib/xfce4/xfconf/xfconfd
           ├─at-spi-dbus-bus.service
           │ ├─ 3647 /usr/lib/at-spi2-core/at-spi-bus-launcher
           │ ├─22313 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-s
           │ └─22315 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
           ├─pulseaudio.service
           │ └─4764 /usr/bin/pulseaudio --daemonize=no
           └─init.scope
             ├─3512 /usr/lib/systemd/systemd --user
             └─3517 (sd-pam)
When Googling around, I found very few results where CentOS users were trying to use systemd user services. In fact, I can't find any mention of user-specific systemd instances in any official Red Hat or CentOS documentation. The first search results you get for "centos systemd user instance" is the systemd/User page on the Arch wiki. When I search for my problem specifically, I get results from the Arch forums. Most of the solutions from these threads refer to an old version of the Arch wiki systemd/User page saying that dbus.socket and dbus.service files need to be created in /etc/systemd/user/. I pulled up the old version of this page from the page history and followed the instructions, which had no effect on my problem. This enforces my belief that different distributions seem to implement systemd very differently, which leaves me at a dead end since the only potential solutions I can find are from the Arch forums.

The only person I found trying to do this on CentOS was on a mailing list, where another user mentioned that CentOS removed this functionality: https://marc.ttias.be/systemd-devel/...3/msg00100.php

Has anyone gotten this working on CentOS? Or should I be looking to do this on a different distribution entirely?
 
Old 05-22-2016, 05:06 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,791

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I haven't had time to research this, but perhaps the systemd version is relevant here.
Code:
systemctl --version
So, maybe you need to consider upgrading CentOS to latest version?
 
Old 05-22-2016, 06:42 PM   #3
resuni
Member
 
Registered: Oct 2009
Location: Colorado, USA
Distribution: I use Arch btw
Posts: 142

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by ferrari View Post
I haven't had time to research this, but perhaps the systemd version is relevant here.
Code:
systemctl --version
So, maybe you need to consider upgrading CentOS to latest version?
This is the output on a fresh install of CentOS 7 before a yum update:

Code:
$ systemctl --version
systemd 219
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
$ systemctl --user status
Failed to get D-Bus connection: No such file or directory
Here is the output after yum update (which did include systemd updates):

Code:
Updated:
  chkconfig.x86_64 0:1.3.61-5.el7_2.1
  device-mapper.x86_64 7:1.02.107-5.el7_2.2
  device-mapper-libs.x86_64 7:1.02.107-5.el7_2.2
  glibc.x86_64 0:2.17-106.el7_2.6
  glibc-common.x86_64 0:2.17-106.el7_2.6
  kernel-tools.x86_64 0:3.10.0-327.18.2.el7
  kernel-tools-libs.x86_64 0:3.10.0-327.18.2.el7
  kpartx.x86_64 0:0.4.9-85.el7_2.4
  libgudev1.x86_64 0:219-19.el7_2.9
  libndp.x86_64 0:1.2-6.el7_2
  libunwind.x86_64 2:1.1-5.el7_2.2
  pcre.x86_64 0:8.32-15.el7_2.1
  python-perf.x86_64 0:3.10.0-327.18.2.el7
  systemd.x86_64 0:219-19.el7_2.9
  systemd-libs.x86_64 0:219-19.el7_2.9
  systemd-sysv.x86_64 0:219-19.el7_2.9
Code:
$ systemctl --version
systemd 219
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
$ systemctl --user status
Failed to get D-Bus connection: No such file or directory
After a yum update and reboot:
Code:
$ systemctl --version
systemd 219
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
$ systemctl --user status
Failed to get D-Bus connection: No such file or directory
 
Old 05-22-2016, 09:16 PM   #4
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
I just checked my centos7 server and --user isn't listed as an option in the systemctl man page, where it is in the man page on fedora 23. I get the same error messsage you do on centos7
 
Old 01-23-2018, 04:03 AM   #5
gabx
LQ Newbie
 
Registered: Jan 2018
Posts: 1

Rep: Reputation: Disabled
systemd user in centos/RHL/Fedora

I came across same issue when setting a Fedora server, coming from Arch.
Did you find any clean solution?
 
Old 12-06-2018, 04:35 AM   #6
sakbhav
LQ Newbie
 
Registered: Dec 2018
Posts: 2

Rep: Reputation: Disabled
It looks like RHEL has removed the --user feature from version 7 which is applicable for Cent OS 7 too.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1173278
 
Old 12-06-2018, 05:10 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by sakbhav View Post
It looks like RHEL has removed the --user feature from version 7 which is applicable for Cent OS 7 too.
See: https://bugzilla.redhat.com/show_bug.cgi?id=1173278
this thread is from 2016, and the bug report is from 2014 (!).
please show us where this is still relevant today.
i could not find that information from the bug report.
 
Old 12-06-2018, 10:59 AM   #8
sakbhav
LQ Newbie
 
Registered: Dec 2018
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
this thread is from 2016, and the bug report is from 2014 (!).
please show us where this is still relevant today.
i could not find that information from the bug report.
Well, the bug report was updated in Sep 2018 and in one of the solutions (https://access.redhat.com/solutions/3461241) RHEL has claimed that systemctl --user is not implemented in any of the EL7 versions.

Also, as per the comment (which is coming from Lennart himself :P) in https://bugzilla.redhat.com/show_bug.cgi?id=1173278 This feature is not going to be implemented in RHEL 7.
 
Old 12-07-2018, 01:10 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ ok, thanks for the clarification.

i don't know the impact on RHEL, but i can assure you that systemd-user has worked on my system for a long while now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't access full journalctl from script via systemd service even though user is in systemd-journal group iwtbf Linux - Newbie 0 02-19-2016 02:44 PM
systemd starting services jzoudavy Linux - Newbie 2 05-16-2015 06:33 PM
LXer: Managing Services on Linux with systemd LXer Syndicated Linux News 0 12-20-2011 04:00 PM
LXer: Managing Services on Linux with systemd LXer Syndicated Linux News 0 12-20-2011 11:50 AM
Start services without user login - Centos 5.5 Nick_N Linux - Server 1 10-04-2010 03:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration