session-XXXXX.scope failed
Hello, I encountered an issue with AlmaLinux 8.10 + cPanel.
After enabling jailshell for users, cron jobs work correctly, but every time they are executed, sessions are created in systemd-logind, which then fail.
Error logs in journalctl -u systemd-logind:
session-XXXXX.scope: Failed to add PIDs to scope's control group: No such process
session-XXXXX.scope: Failed with result 'resources'.
Unit session-XXXXX.scope has failed.
User sessions in loginctl:
loginctl list-sessions
SESSION UID USER SEAT TTY IDLE SINCE
71201 1001 fdcam
71202 1002 mynarine
71203 1003 mdfkamurj
After executing:
systemctl restart systemd-logind
systemctl --failed
the session-XXXXX.scope failed errors return.
What I have tried:
RemoveIPC=no and KillUserProcesses=no are already set in /etc/systemd/logind.conf.
Environment:
AlmaLinux 8.10
cPanel/WHM (updated to the latest version)
jailshell enabled for users via WHM
How can I prevent the creation and failure of these sessions when cron jobs are executed in jailshell?
Thanks in advance!
-
Hey there! I setup a cron job with a jailshell account that calls a bash script that runs every minute on my personal machine, and I wasn't able to reproduce these errors on my end as I didn't see any login or session errors in the logs.
Could you submit a ticket on this so the issue can be investigated directly on that server having the problem?
0 -
Hi there, we don't have direct license form cpanel, so i can't create ticket
0 -
You would still be able to create a ticket with your host, and then they would escalate the issue to us if they weren't able to resolve it.
0 -
doing right now
0 -
session optional pam_systemd.so in /etc/pam.d/crond solved the problem
0 -
I'm glad you were able to get that resolved, and thanks for sharing the solution here!
0
Please sign in to leave a comment.
Comments
6 comments