Discussion:
How to best troubleshoot the kojid error "koji.AuthError: User 3 is not a host"
Tengiz Dawkins
2017-04-25 00:14:41 UTC
Permalink
Hi all,

For the lack of koji-users@ list I dared to ask here.

I am very new to koji and I setup a testing stack using
http://www.devops-blog.net/koji/koji-rpm-build-system-installation-part-1

Currently I am stuck at koji builder authentication. The validation user vs
host is not quite clear to me:

***@root@/etc/kojid>/usr/sbin/kojid -f
Traceback (most recent call last):
File "/usr/sbin/kojid", line 5140, in <module>
main(options, session)
File "/usr/sbin/kojid", line 97, in main
tm = TaskManager(options, session)
File "/usr/lib/python2.7/site-packages/koji/daemon.py", line 480, in
__init__
self.host_id = self.session.host.getID()
File "/usr/lib/python2.7/site-packages/koji/__init__.py", line 1945, in
__call__
return self.__func(self.__name, args, opts)
File "/usr/lib/python2.7/site-packages/koji/__init__.py", line 2381, in
_callMethod
raise err
koji.AuthError: User 3 is not a host

Should user ever be a host?

I used --debug-xmlrpc but it doesn't give any useful info. Bumping up the
koji-hub debug level is not useful neither (KojiDebug=on).

Any pointers are appreciated.

The OS is centos7, stock koji (i guess 1.11, but user agent claims it is
1.7).
Thomas
2017-04-25 07:36:45 UTC
Permalink
Hi,

It usually happen when you launch a kojid instance before adding the host
to the koji-hub.

You probably have "LoginCreatesUser" set to "On" in /etc/koji-hub/hub.conf

The only way I know of :
- stop kojid
- delete user 3 from the DB (I don't think there is a way to so it from
cli/correct me if I am wrong)
- koji add-host <fqdn>
- restart kojid

And "LoginCreatesUser" can be set to Off to avoid this in the future.

If it's a test system you are better off recreating the hub (maybe only the
database) as modifying the database is never a good solution.
--
Thomas.
Post by Tengiz Dawkins
Hi all,
I am very new to koji and I setup a testing stack using
http://www.devops-blog.net/koji/koji-rpm-build-system-installation-part-1
Currently I am stuck at koji builder authentication. The validation user
File "/usr/sbin/kojid", line 5140, in <module>
main(options, session)
File "/usr/sbin/kojid", line 97, in main
tm = TaskManager(options, session)
File "/usr/lib/python2.7/site-packages/koji/daemon.py", line 480, in
__init__
self.host_id = self.session.host.getID()
File "/usr/lib/python2.7/site-packages/koji/__init__.py", line 1945, in
__call__
return self.__func(self.__name, args, opts)
File "/usr/lib/python2.7/site-packages/koji/__init__.py", line 2381, in
_callMethod
raise err
koji.AuthError: User 3 is not a host
Should user ever be a host?
I used --debug-xmlrpc but it doesn't give any useful info. Bumping up the
koji-hub debug level is not useful neither (KojiDebug=on).
Any pointers are appreciated.
The OS is centos7, stock koji (i guess 1.11, but user agent claims it is
1.7).
_______________________________________________
--
--
Thomas
Tengiz Dawkins
2017-04-25 20:46:26 UTC
Permalink
Thanks a lot Thomas,

That really helped!

I also noted that the user that is being used for login is CN part of the
client cert.

How can I contribute to the user documentation of koji setup process to
clear up the confusion?
Post by Thomas
Hi,
It usually happen when you launch a kojid instance before adding the host
to the koji-hub.
You probably have "LoginCreatesUser" set to "On" in /etc/koji-hub/hub.conf
- stop kojid
- delete user 3 from the DB (I don't think there is a way to so it from
cli/correct me if I am wrong)
- koji add-host <fqdn>
- restart kojid
And "LoginCreatesUser" can be set to Off to avoid this in the future.
If it's a test system you are better off recreating the hub (maybe only
the database) as modifying the database is never a good solution.
--
Thomas.
Post by Tengiz Dawkins
Hi all,
I am very new to koji and I setup a testing stack using
http://www.devops-blog.net/koji/koji-rpm-build-system-installation-part-1
Currently I am stuck at koji builder authentication. The validation user
File "/usr/sbin/kojid", line 5140, in <module>
main(options, session)
File "/usr/sbin/kojid", line 97, in main
tm = TaskManager(options, session)
File "/usr/lib/python2.7/site-packages/koji/daemon.py", line 480, in
__init__
self.host_id = self.session.host.getID()
File "/usr/lib/python2.7/site-packages/koji/__init__.py", line 1945,
in __call__
return self.__func(self.__name, args, opts)
File "/usr/lib/python2.7/site-packages/koji/__init__.py", line 2381,
in _callMethod
raise err
koji.AuthError: User 3 is not a host
Should user ever be a host?
I used --debug-xmlrpc but it doesn't give any useful info. Bumping up the
koji-hub debug level is not useful neither (KojiDebug=on).
Any pointers are appreciated.
The OS is centos7, stock koji (i guess 1.11, but user agent claims it is
1.7).
_______________________________________________
--
--
Thomas
_______________________________________________
Tomas Kopecek
2017-04-27 07:57:42 UTC
Permalink
Post by Tengiz Dawkins
Thanks a lot Thomas,
That really helped!
I also noted that the user that is being used for login is CN part of
the client cert.
How can I contribute to the user documentation of koji setup process to
clear up the confusion?
Best way is to create pull request in https://pagure.io/koji. If it is
too much hassle for you (and only one-time contribution), send a patch
to koji-***@lists.fedoraproject.org.

Thanks for helping with koji!
Post by Tengiz Dawkins
Hi,
It usually happen when you launch a kojid instance before adding the
host to the koji-hub.
You probably have "LoginCreatesUser" set to "On"
in /etc/koji-hub/hub.conf
- stop kojid
- delete user 3 from the DB (I don't think there is a way to so it
from cli/correct me if I am wrong)
- koji add-host <fqdn>
- restart kojid
And "LoginCreatesUser" can be set to Off to avoid this in the future.
If it's a test system you are better off recreating the hub (maybe
only the database) as modifying the database is never a good solution.
--
Thomas.
On Tue, Apr 25, 2017 at 2:14 AM Tengiz Dawkins
Hi all,
I am very new to koji and I setup a testing stack using
http://www.devops-blog.net/koji/koji-rpm-build-system-installation-part-1
<http://www.devops-blog.net/koji/koji-rpm-build-system-installation-part-1>
Currently I am stuck at koji builder authentication. The
File "/usr/sbin/kojid", line 5140, in <module>
main(options, session)
File "/usr/sbin/kojid", line 97, in main
tm = TaskManager(options, session)
File "/usr/lib/python2.7/site-packages/koji/daemon.py", line
480, in __init__
self.host_id = self.session.host.getID()
File "/usr/lib/python2.7/site-packages/koji/__init__.py", line
1945, in __call__
return self.__func(self.__name, args, opts)
File "/usr/lib/python2.7/site-packages/koji/__init__.py", line
2381, in _callMethod
raise err
koji.AuthError: User 3 is not a host
Should user ever be a host?
I used --debug-xmlrpc but it doesn't give any useful info.
Bumping up the koji-hub debug level is not useful neither
(KojiDebug=on).
Any pointers are appreciated.
The OS is centos7, stock koji (i guess 1.11, but user agent
claims it is 1.7).
_______________________________________________
To unsubscribe send an email to
--
--
Thomas
_______________________________________________
To unsubscribe send an email to
_______________________________________________
--

Tomas Kopecek <***@redhat.com>
Release Engineering Development, RedHat
_______________________________________________
buildsys mailing list -- ***@lists.fedoraproject.org
To unsubscribe se

Loading...