RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1892833 - Lots of sudo commands leads to errors
Summary: Lots of sudo commands leads to errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Michal Sekletar
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-29 18:43 UTC by Orion Poplawski
Modified: 2023-12-15 19:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-31 13:53:14 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 6099891 0 None None None 2022-12-08 06:04:37 UTC

Description Orion Poplawski 2020-10-29 18:43:38 UTC
Description of problem:

We're running Lansweeper's LSAgent on our machines.  It runs a series of commands with sudo.  This is triggering the following errors:

Oct 28 09:27:00 localhost systemd[1]: Started Session c8 of user root.
Oct 28 09:27:00 localhost systemd[1]: user-runtime-dir: Start request repeated too quickly.
Oct 28 09:27:00 localhost systemd[1]: user-runtime-dir: Failed with result 'start-limit-hit'.
Oct 28 09:27:00 localhost systemd[1]: Failed to start /run/user/0 mount wrapper.
Oct 28 09:27:00 localhost systemd[1]: Dependency failed for User Manager for UID 0.
Oct 28 09:27:00 localhost systemd[1]: user: Job user/start failed with result 'dependency'.
Oct 28 09:27:00 localhost sudo[1969408]: pam_systemd(sudo:session): Failed to create session: Start job for unit user failed with 'dependency'
Oct 28 09:27:00 localhost sudo[1969408]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 28 09:27:00 localhost sudo[1969408]: pam_unix(sudo:session): session closed for user root

and

Oct 29 09:27:32 localhost sudo[2024817]:     root : TTY=unknown ; PWD=/opt/LansweeperAgent ; USER=root ; COMMAND=/usr/sbin/dmidecode -t 32
Oct 29 09:27:32 localhost systemd[1]: user-runtime-dir: Unit not needed anymore. Stopping.
Oct 29 09:27:32 localhost sudo[2024817]: pam_systemd(sudo:session): Failed to create session: Start job for unit user-0.slice failed with 'canceled'
Oct 29 09:27:32 localhost systemd[1]: Started Session c27 of user root.
Oct 29 09:27:32 localhost systemd[1]: user: Start request repeated too quickly.
Oct 29 09:27:32 localhost systemd[1]: user: Failed with result 'start-limit-hit'.
Oct 29 09:27:32 localhost sudo[2024817]: pam_unix(sudo:session): session opened for user root by (uid=0)

Version-Release number of selected component (if applicable):
systemd-239-31.el8_2.2.x86_64

Steps to Reproduce:
1.  Run a series of commands in quick succession with sudo

Comment 1 Orion Poplawski 2020-10-30 18:01:39 UTC
So I tried disabling the start limit, but still end up with lots of errors:

Oct 30 09:28:03 localhost systemd[2094125]: Starting Exit the Session...
Oct 30 09:28:03 localhost sudo[2094145]:     root : TTY=unknown ; PWD=/opt/LansweeperAgent ; USER=root ; COMMAND=/usr/sbin/dmidecode
Oct 30 09:28:03 localhost sudo[2094145]: pam_systemd(sudo:session): Failed to create session: Start job for unit user-0.slice failed with 'canceled'
Oct 30 09:28:03 localhost sudo[2094145]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 30 09:28:03 localhost systemd[1]: Started Session c37 of user root.
Oct 30 09:28:03 localhost sudo[2094145]: pam_unix(sudo:session): session closed for user root
Oct 30 09:28:03 localhost systemd[1]: Starting User Manager for UID 0...
Oct 30 09:28:03 localhost sudo[2094158]:     root : TTY=unknown ; PWD=/opt/LansweeperAgent ; USER=root ; COMMAND=/usr/sbin/dmidecode -t 6
Oct 30 09:28:03 localhost systemd[1]: Started Session c38 of user root.
Oct 30 09:28:03 localhost systemd[2094155]: pam_unix(systemd-user:session): session opened for user root by (uid=0)
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Reached target Timers.
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused
Oct 30 09:28:03 localhost systemd[2094155]: Reached target Paths.
Oct 30 09:28:03 localhost systemd[2094155]: Failed to connect to API bus: Connection refused

This feels pretty heavy-weight for just running some sudo commands, especially by a daemon.

Comment 2 Orion Poplawski 2020-11-20 14:36:15 UTC
This may be fixed in 8.3, at least I'm not seeing it on my one RHEL 8.3 VM.  I'll know more once CentOS 8.3 is out and my other machines update.

systemd-239-41.el8_3.x86_64

Comment 4 Orion Poplawski 2020-12-10 15:59:58 UTC
Things are definitely better with 8.3, but still can see errors like this:

Dec 10 01:37:38 localhost sudo[84839]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 10 01:37:38 localhost sudo[84839]: pam_unix(sudo:session): session closed for user root
Dec 10 01:37:38 localhost systemd[1]: session-c2.scope: Succeeded.
Dec 10 01:37:38 localhost systemd[1]: Stopping User Manager for UID 0...
Dec 10 01:37:38 localhost systemd[84842]: Stopped target Default.
Dec 10 01:37:38 localhost systemd[84842]: Stopped target Basic System.
Dec 10 01:37:38 localhost systemd[84842]: Stopped target Sockets.
Dec 10 01:37:38 localhost systemd[84842]: dbus.socket: Succeeded.
Dec 10 01:37:38 localhost systemd[84842]: Closed D-Bus User Message Bus Socket.
Dec 10 01:37:38 localhost systemd[84842]: Stopped target Timers.
Dec 10 01:37:38 localhost systemd[84842]: Stopped target Paths.
Dec 10 01:37:38 localhost systemd[84842]: Reached target Shutdown.
Dec 10 01:37:38 localhost systemd[84842]: Starting Exit the Session...
Dec 10 01:37:38 localhost systemd[1]: user: Succeeded.
Dec 10 01:37:38 localhost sudo[84859]:     root : TTY=unknown ; PWD=/opt/LansweeperAgent ; USER=root ; COMMAND=/usr/sbin/dmidecode -t 0
Dec 10 01:37:38 localhost systemd[1]: Stopped User Manager for UID 0.
Dec 10 01:37:38 localhost systemd[1]: Starting User Manager for UID 0...
Dec 10 01:37:38 localhost sudo[84859]: pam_systemd(sudo:session): Failed to create session: Start job for unit user-0.slice failed with 'canceled'
Dec 10 01:37:38 localhost sudo[84859]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 10 01:37:38 localhost systemd[1]: Started Session c3 of user root.
Dec 10 01:37:38 localhost sudo[84859]: pam_unix(sudo:session): session closed for user root
Dec 10 01:37:38 localhost systemd[84869]: pam_unix(systemd-user:session): session opened for user root by (uid=0)
Dec 10 01:37:38 localhost systemd[1]: session-c3.scope: Succeeded.
Dec 10 01:37:38 localhost sudo[84878]:     root : TTY=unknown ; PWD=/opt/LansweeperAgent ; USER=root ; COMMAND=/usr/sbin/dmidecode -t 1
Dec 10 01:37:38 localhost systemd[1]: Started Session c4 of user root.
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Reached target Timers.
Dec 10 01:37:38 localhost systemd[84869]: Failed to connect to API bus: Connection refused
Dec 10 01:37:38 localhost systemd[84869]: Starting D-Bus User Message Bus Socket.
Dec 10 01:37:38 localhost systemd[84869]: Reached target Paths.
Dec 10 01:37:38 localhost systemd[84869]: Listening on D-Bus User Message Bus Socket.
Dec 10 01:37:38 localhost systemd[84869]: Reached target Sockets.
Dec 10 01:37:38 localhost systemd[84869]: Reached target Basic System.
Dec 10 01:37:38 localhost systemd[1]: Started User Manager for UID 0.

systemd-239-41.el8_3.x86_64

Comment 5 Orion Poplawski 2020-12-16 17:01:56 UTC
Hmm, looks like we can still run into the original errors as well:

Dec 15 14:58:49 localhost systemd[1]: Started Session c78 of user root.
Dec 15 14:58:49 localhost systemd[1]: user-runtime-dir: Start request repeated too quickly.
Dec 15 14:58:49 localhost systemd[1]: user-runtime-dir: Failed with result 'start-limit-hit'.
Dec 15 14:58:49 localhost systemd[1]: Failed to start /run/user/0 mount wrapper.
Dec 15 14:58:49 localhost systemd[1]: Dependency failed for User Manager for UID0.
Dec 15 14:58:49 localhost systemd[1]: user: Job user/start failed with result 'dependency'.
Dec 15 14:58:49 localhost sudo[132510]: pam_systemd(sudo:session): Failed to create session: Start job for unit user failed with 'dependency'
Dec 15 14:58:49 localhost sudo[132510]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 15 14:58:49 localhost sudo[132510]: pam_unix(sudo:session): session closed for user root

Comment 8 David Tardon 2021-03-22 08:45:34 UTC
Can you try with testing rpms from http://people.redhat.com/dtardon/systemd/bz1642460-backport-UserStopDelaySec=/ ?

Comment 9 Tommy Doucet 2021-10-21 15:43:53 UTC
Customer seems to be hitting this issue in OpenStack in case 03051999. does this have any impact or can these be safely ignored? Thanks!

Comment 10 Tommy Doucet 2021-12-23 16:40:49 UTC
(In reply to Tommy Doucet from comment #9)
> Customer seems to be hitting this issue in OpenStack in case 03051999. does
> this have any impact or can these be safely ignored? Thanks!

This has been in this state for a while now. Any update on this? Can this issue be safely ignored?

Thank you!

Comment 11 Orion Poplawski 2022-01-31 18:47:57 UTC
I don't think I'm seeing any more errors with systemd-239-51.el8_5.3.x86_64

Comment 12 Lukáš Nykrýn 2022-05-31 13:53:14 UTC
This bug seems to be fixed in 8.5 and above, so let's close this. If you encounter this issue on newer version feel free to reopen the bug.


Note You need to log in before you can comment on or make changes to this bug.