#3233 Kojid not able to authenticate when ccache is empty
Closed: Fixed 2 years ago by tkopecek. Opened 2 years ago by djuarezg.

We have observed that when a machine reboots unexpectedly it may end up having an empty file on /var/tmp/kojid.ccache, which would then cause authentication to fail with the following:

[root@koji34 ~]# service kojid status
Redirecting to /bin/systemctl status kojid.service
● kojid.service - Koji build server
   Loaded: loaded (/usr/lib/systemd/system/kojid.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2022-01-31 11:25:56 CET; 6min ago
     Docs: https://docs.pagure.org/koji/server_howto/
  Process: 5754 ExecStart=/usr/sbin/kojid --fg --force-lock --verbose (code=exited, status=1/FAILURE)
 Main PID: 5754 (code=exited, status=1/FAILURE)

Jan 31 11:25:55 koji34.cern.ch systemd[1]: Started Koji build server.
Jan 31 11:25:56 koji34.cern.ch kojid[5754]: Traceback (most recent call last):
Jan 31 11:25:56 koji34.cern.ch kojid[5754]:   File "/usr/sbin/kojid", line 6586, in <module>
Jan 31 11:25:56 koji34.cern.ch kojid[5754]:     ccache=options.ccache)
Jan 31 11:25:56 koji34.cern.ch kojid[5754]:   File "/usr/lib/python3.6/site-packages/koji/__init__.py", line 2531, in gssapi_login
Jan 31 11:25:56 koji34.cern.ch kojid[5754]:     raise GSSAPIAuthError(err)
Jan 31 11:25:56 koji34.cern.ch kojid[5754]: koji.GSSAPIAuthError: unable to obtain a session (gssapi auth failed: requests.exceptions.HTTPError: 401 Client Error: >
Jan 31 11:25:56 koji34.cern.ch kojid[5754]: Use following documentation to debug kerberos/gssapi auth issues. https://docs.pagure.org/koji/kerberos_gssapi_debug/
Jan 31 11:25:56 koji34.cern.ch systemd[1]: kojid.service: Main process exited, code=exited, status=1/FAILURE
Jan 31 11:25:56 koji34.cern.ch systemd[1]: kojid.service: Failed with result 'exit-code'.

A simple file size check before authenticating should be enough to remove this cache file before trying.


Metadata Update from @tkopecek:
- Custom field Size adjusted to None
- Issue set to the milestone: 1.29

2 years ago

Metadata Update from @tkopecek:
- Issue tagged with: testing-ready

2 years ago

Metadata Update from @mfilip:
- Issue tagged with: testing-done

2 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #3234 Merged 2 years ago