You are not logged in.
Hi,
I normally start xbmc via a service file and do not use a login manager, and have done successfully for some time now,
I can no longer start xbmc.service since upgrading to xbmc 12.3-10
The errors I receive in the journal are:
Feb 27 10:52:20 wolverine systemd[242]: pam_nologin(login:account): conversation failed
Feb 27 10:52:20 wolverine systemd[242]: Failed at step PAM spawning /usr/bin/xinit: Operation not permittedLooking at the old and new xbmc.service files, the new xbmc.service now has an additional line specifying "PamName=login"
Not sure what I need to look at to fix this, any ideas are much appreciated.
I am temporarily using the old xbmc.service file from the xbmc 12.3-9 package to ensure xbmc starts.
Thanks in advance for any help.
Offline
Try commenting out the new line. It's probably the cause but let's not jump to conclusions. Once we find out that is indeed the cause we need to find out the original PAM file and check for differences.
fs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline
The old xbmc.service I am using is identical to the new except it does not have the Line of code PAMName=login
Offline
COuld you post the list of files in /etc/pam.d ?
ls /etc/pam.d/fs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline
Hi,
ls of /etc/pam.d as below
chage groupadd other shadow system-local-login userdel
chfn groupdel passwd sshd system-login usermod
chgpasswd groupmems rlogin su system-remote-login
chpasswd groupmod rsh su-l system-services
chsh login samba sudo systemd-user
crond newusers screen system-auth useraddThanks for your help on this.
Offline
It's description is located in systemd.exec . Apparently it's possible to use different execution contexts for each service. And since these can all be shared with unit, socket, service, swap and mount. So, we are unfortunately going to see more of this.
PAMName=
Sets the PAM service name to set up a session as. If set, the executed process will be registered as a
PAM session under the specified service name. This is only useful in conjunction with the User=
setting. If not set, no PAM session will be opened for the executed processes. See pam(8) for details.
Do you have a 'User=' line in the xbmc.service file? What kind of user is it? Does it have a valid shell?
Could you post the output of:
cat /etc/pam.d/loginfs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline
Hi,
I use another service I created (stored in /etc/systemd/system) to modify the arch linux xbmc.service as below as I use another user account to run the xbmc application. (the Arch package uses User=xbmc and Group=xbmc)
.include /usr/lib/systemd/system/xbmc.service
[Service]
User = lee
Group = usersuser lee is a member of the following groups and uses /bin/zsh for a shell.
disk wheel mail log network video audio optical storage power users xbmcThe contents of /etc/pam.d/login are:
#%PAM-1.0
auth required pam_securetty.so
auth requisite pam_nologin.so
auth include system-local-login
account include system-local-login
session include system-local-loginOffline
Try commenting out the line with pam_securetty.so and see if it works.
Alternatively, comment out the pam_nologin.so and see if it works (but I don't think that is it).
fs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline
Hi,
I commented out pam_securetty.so and rebooted and it still failed.
I commented out pam_nologin.so and rebooted and it still failed.
Tried them individually and both together commented out (rebooting accordingly) and is still failed to start xbmc.service when rebooted.
If I login via ssh with user account lee after reboot and then issue "sudo systemctl restart xbmc.service" it starts up xbmc no problem.
Offline
I took another look at your error message. It seems to fail at nologin in the account section (huh?). Also, the output you specified seems to come from SystemD directly.
Could you reproduce the failure and then post the output of:
systemctl -l status xbmc.servicefs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline
Hi,
Output from "systemctl -l status xbmc.service" as requested.
Thanks again for your help.
xbmc.service - Starts instance of XBMC using xinit
Loaded: loaded (/etc/systemd/system/xbmc.service; enabled)
Active: failed (Result: exit-code) since Fri 2014-02-28 14:07:07 GMT; 1min 10s ago
Process: 245 ExecStart=/usr/bin/xinit /usr/bin/dbus-launch /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp (code=exited, status=224/PAM)
Main PID: 245 (code=exited, status=224/PAM)
CGroup: /system.slice/xbmc.serviceOffline
You should wait for the prompt to return. Or was that all?
fs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline
Sorry, that was all the output I received from "systemctl -l status xbmc.service"
Offline
Will need to run that command again using sudo as I suspect the output was limited due to me using a standard user account to issue the command. Will post results again in a little while.
Offline
Will need to run that command again using sudo as I suspect the output was limited due to me using a standard user account to issue the command. Will post results again in a little while.
Cool, didn't knew that would work. Good catch!
fs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline
Ok, output of "sudo systemctl -l status xbmc.service" as follows:
xbmc.service - Starts instance of XBMC using xinit
Loaded: loaded (/etc/systemd/system/xbmc.service; enabled)
Active: failed (Result: exit-code) since Fri 2014-02-28 16:35:21 GMT; 1min 15s ago
Process: 250 ExecStart=/usr/bin/xinit /usr/bin/dbus-launch /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp (code=exited, status=224/PAM)
Main PID: 250 (code=exited, status=224/PAM)
CGroup: /system.slice/xbmc.service
Feb 28 16:35:20 wolverine systemd[1]: Started Starts instance of XBMC using xinit.
Feb 28 16:35:20 wolverine systemd[250]: pam_nologin(login:account): conversation failed
Feb 28 16:35:21 wolverine systemd[1]: xbmc.service: main process exited, code=exited, status=224/PAM
Feb 28 16:35:21 wolverine systemd[1]: Unit xbmc.service entered failed state.Offline
Thought I'd chime in here, as I'm having the same problem. I am using the default service file provided by the xbmc package. Commenting out PAMName=login in xbmc.service allows xbmc to start successfully on boot. If I start xbmc.service from a normal shell prompt, it will start fine even with PAMName set.
cat /usr/lib/systemd/system/xbmc.service
[Unit]
Description = Starts instance of XBMC using xinit
After = remote-fs.target
[Service]
User = xbmc
Group = xbmc
PAMName=login
Type = simple
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp
Restart = on-abort
[Install]
WantedBy = multi-user.targetsystemctl -l status xbmc.service
xbmc.service - Starts instance of XBMC using xinit
Loaded: loaded (/usr/lib/systemd/system/xbmc.service; enabled)
Active: failed (Result: exit-code) since Fri 2014-02-28 10:56:50 EST; 42min ago
Process: 205 ExecStart=/usr/bin/xinit /usr/bin/dbus-launch /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp (code=exited, status=224/PAM)
Main PID: 205 (code=exited, status=224/PAM)
CGroup: /system.slice/xbmc.service
Feb 28 10:56:49 zbox systemd[1]: Starting Starts instance of XBMC using xinit...
Feb 28 10:56:49 zbox systemd[1]: Started Starts instance of XBMC using xinit.
Feb 28 10:56:50 zbox systemd[1]: xbmc.service: main process exited, code=exited, status=224/PAM
Feb 28 10:56:50 zbox systemd[1]: Unit xbmc.service entered failed state.cat /etc/pam.d/login
#%PAM-1.0
auth required pam_securetty.so
auth requisite pam_nologin.so
auth include system-local-login
account include system-local-login
session include system-local-loginOffline
Try this:
PAMName=suThis is just to diagnose.
fs/super.c : "Self-destruct in 5 seconds. Have a nice day...\n",
Offline
Started at boot, with PAMName=su
[zbox@zbox ~]$ sudo systemctl -l status xbmc.service
xbmc.service - Starts instance of XBMC using xinit
Loaded: loaded (/usr/lib/systemd/system/xbmc.service; enabled)
Active: active (running) since Fri 2014-02-28 12:50:01 EST; 56s ago
Main PID: 205 (xinit)
CGroup: /system.slice/xbmc.service
├─205 /usr/bin/xinit /usr/bin/dbus-launch /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp
├─217 (sd-pam
├─219 X :0 -nolisten tcp
├─322 /bin/sh /usr/bin/xbmc-standalone -l /run/lirc/lircd
├─326 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
├─328 /bin/sh /usr/bin/xbmc --standalone -l /run/lirc/lircd
└─337 /usr/lib/xbmc/xbmc.bin --standalone -l /run/lirc/lircd
Feb 28 12:50:03 zbox xinit[205]: Initializing built-in extension XFree86-VidModeExtension
Feb 28 12:50:03 zbox xinit[205]: Initializing built-in extension XFree86-DGA
Feb 28 12:50:03 zbox xinit[205]: Initializing built-in extension XFree86-DRI
Feb 28 12:50:03 zbox xinit[205]: Initializing built-in extension DRI2
Feb 28 12:50:05 zbox xinit[205]: Loading extension GLX
Feb 28 12:50:07 zbox xinit[205]: Loading extension NV-GLX
Feb 28 12:50:07 zbox xinit[205]: Loading extension NV-CONTROL
Feb 28 12:50:07 zbox xinit[205]: Loading extension XINERAMA
Feb 28 12:50:11 zbox xinit[205]: /usr/lib/xbmc/xbmc.bin: /usr/lib/libmysqlclient.so.18: no version information available (required by /usr/lib/xbmc/xbmc.bin)
Feb 28 12:50:21 zbox xinit[205]: libpng warning: iCCP: known incorrect sRGB profileLast edited by jarfbarker (2014-02-28 17:58:55)
Offline
Started from shell prompt, not at boot, with PAMName=login
[zbox@zbox ~]$ sudo systemctl -l status xbmc.service
xbmc.service - Starts instance of XBMC using xinit
Loaded: loaded (/usr/lib/systemd/system/xbmc.service; enabled)
Active: active (running) since Fri 2014-02-28 12:55:20 EST; 3s ago
Main PID: 547 (xinit)
CGroup: /system.slice/xbmc.service
‣ 547 /usr/bin/xinit /usr/bin/dbus-launch /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp
Feb 28 12:55:20 zbox systemd[1]: Started Starts instance of XBMC using xinit.
Feb 28 12:55:20 zbox systemd[547]: pam_unix(login:session): session opened for user xbmc by (uid=0)Offline
Started from shell prompt, not at boot, with PAMName=su
[zbox@zbox ~]$ sudo systemctl -l status xbmc.service
xbmc.service - Starts instance of XBMC using xinit
Loaded: loaded (/usr/lib/systemd/system/xbmc.service; enabled)
Active: active (running) since Fri 2014-02-28 13:07:13 EST; 3s ago
Main PID: 426 (xinit)
CGroup: /system.slice/xbmc.service
├─426 /usr/bin/xinit /usr/bin/dbus-launch /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp
├─427 (sd-pam
└─428 X :0 -nolisten tcp
Feb 28 13:07:14 zbox xinit[426]: Initializing built-in extension XVideo
Feb 28 13:07:14 zbox xinit[426]: Initializing built-in extension XVideo-MotionCompensation
Feb 28 13:07:14 zbox xinit[426]: Initializing built-in extension XFree86-VidModeExtension
Feb 28 13:07:14 zbox xinit[426]: Initializing built-in extension XFree86-DGA
Feb 28 13:07:14 zbox xinit[426]: Initializing built-in extension XFree86-DRI
Feb 28 13:07:14 zbox xinit[426]: Initializing built-in extension DRI2
Feb 28 13:07:15 zbox xinit[426]: Loading extension GLX
Feb 28 13:07:17 zbox xinit[426]: Loading extension NV-GLX
Feb 28 13:07:17 zbox xinit[426]: Loading extension NV-CONTROL
Feb 28 13:07:17 zbox xinit[426]: Loading extension XINERAMAOffline
And for completeness (sorry if this is too much)....
Started from shell prompt, not at boot, with PAMName commented out
[zbox@zbox ~]$ sudo systemctl -l status xbmc.service
xbmc.service - Starts instance of XBMC using xinit
Loaded: loaded (/usr/lib/systemd/system/xbmc.service; enabled)
Active: active (running) since Fri 2014-02-28 13:32:14 EST; 2s ago
Main PID: 806 (xinit)
CGroup: /system.slice/xbmc.service
├─806 /usr/bin/xinit /usr/bin/dbus-launch /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp
├─807 X :0 -nolisten tcp
├─811 /bin/sh /usr/bin/xbmc-standalone -l /run/lirc/lircd
├─815 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
├─817 /bin/sh /usr/bin/xbmc --standalone -l /run/lirc/lircd
└─826 /usr/lib/xbmc/xbmc.bin --standalone -l /run/lirc/lircd
Feb 28 13:32:14 zbox xinit[806]: Initializing built-in extension XVideo-MotionCompensation
Feb 28 13:32:14 zbox xinit[806]: Initializing built-in extension XFree86-VidModeExtension
Feb 28 13:32:14 zbox xinit[806]: Initializing built-in extension XFree86-DGA
Feb 28 13:32:14 zbox xinit[806]: Initializing built-in extension XFree86-DRI
Feb 28 13:32:14 zbox xinit[806]: Initializing built-in extension DRI2
Feb 28 13:32:14 zbox xinit[806]: Loading extension GLX
Feb 28 13:32:15 zbox xinit[806]: Loading extension NV-GLX
Feb 28 13:32:15 zbox xinit[806]: Loading extension NV-CONTROL
Feb 28 13:32:15 zbox xinit[806]: Loading extension XINERAMA
Feb 28 13:32:16 zbox xinit[806]: /usr/lib/xbmc/xbmc.bin: /usr/lib/libmysqlclient.so.18: no version information available (required by /usr/lib/xbmc/xbmc.bin)Offline
Some time ago, I had followed the advice in this thread and modified systemd-user-sessions.service to contain the line "After=network.target". Apparently, this was causing systemd-user-sessions.service to be delayed until after xbmc.service, resulting in the PAM session error. Restoring the original systemd-user-sessions.service has solved the problem for me - xbmc now starts fine at boot using the service provided with the package.
FYI, I'm having no issues with shutdown via ssh even without the modified systemd-user-sessions.service, so perhaps that issue was addressed upstream.
Perhaps the OP made a similar forgotten modification somewhere?
Offline
After additional reboots, with xbmc failing to start a couple of times, it appears that a further step is required.
Create the file /etc/systemd/system/xbmc.service.d/wait-for-systemd-user-sessions.conf with the following content:
[Unit]
After=systemd-user-sessions.serviceSeems like a race between xbmc and systemd-user-sessions. Not sure if there's a better way to handle this, or if the systemd-user-sessions dependency should be added to the packaged service file.
Offline