The insights-client service fails to start due to PermissionError: [Errno 13] Permission denied: 'S.gpg-agent'

Solution Verified - Updated -

Issue

  • The insights-client service failed to start with the following error:

    [root@rhel-client ~]# systemctl status insights-client -l
    × insights-client.service - Insights Client
        Loaded: loaded (/usr/lib/systemd/system/insights-client.service; static)
        Active: failed (Result: exit-code) since Wed 2024-09-18 11:22:02 CEST; 1min 22s ago
      Duration: 4.090s
    TriggeredBy: ● insights-client.timer
          Docs: man:insights-client(8)
       Process: 224207 ExecStart=/usr/bin/insights-client --retry 3 (code=exited, status=1/FAILURE)
      Main PID: 224207 (code=exited, status=1/FAILURE)
           CPU: 1.253s
    
    Sep 18 11:22:01 rhel-client insights-client[224207]:   File "/usr/lib64/python3.9/shutil.py", line 734, in rmtree
    Sep 18 11:22:01 rhel-client insights-client[224207]:     _rmtree_safe_fd(fd, path, onerror)
    Sep 18 11:22:01 rhel-client insights-client[224207]:   File "/usr/lib64/python3.9/shutil.py", line 690, in _rmtree_safe_fd
    Sep 18 11:22:01 rhel-client insights-client[224207]:     onerror(os.unlink, fullname, sys.exc_info())
    Sep 18 11:22:01 rhel-client insights-client[224207]:   File "/usr/lib64/python3.9/shutil.py", line 688, in _rmtree_safe_fd
    Sep 18 11:22:01 rhel-client insights-client[224207]:     os.unlink(entry.name, dir_fd=topfd)
    Sep 18 11:22:01 rhel-client insights-client[224207]: PermissionError: [Errno 13] Permission denied: 'S.gpg-agent'
    Sep 18 11:22:02 rhel-client systemd[1]: insights-client.service: Main process exited, code=exited, status=1/FAILURE
    Sep 18 11:22:02 rhel-client systemd[1]: insights-client.service: Failed with result 'exit-code'.
    Sep 18 11:22:02 rhel-client systemd[1]: insights-client.service: Consumed 1.253s CPU time.
    
  • The issue started occurring after Insights Core 3.4.5-1 was released in July 2024.

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content