Katello-agent is not running [Fed27]

Hello,

I have a problem with installing katello-agent on Fedora 27.

I am using this repository (https://fedorapeople.org/groups/katello/releases/yum/3.7/client/f27/x86_64/) which is installing following client: katello-agent-3.3.0-1.fc27.noarch

On my server, Katello version is 3.4.

Once the installation is done, the goferd service appears to be running, but there is no connection between it and the host.

● goferd.service - Gofer Agent
   Loaded: loaded (/usr/lib/systemd/system/goferd.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-06-20 14:32:00 UTC; 54s ago
 Main PID: 693 (python2.7)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/goferd.service
           └─693 /usr/bin/python2.7 /usr/bin/goferd --foreground

Jun 20 14:32:00 host.name systemd[1]: Started Gofer Agent.
Jun 20 14:32:02 host.name goferd[693]: [WARNING][MainThread] gofer.agent.plugin:642 - plugin:demo, DISABLED
Jun 20 14:32:02 host.name goferd[693]: [INFO][Thread-1] gofer.rmi.store:114 - Using: /var/lib/gofer/messaging/pending/demo
Jun 20 14:32:02 host.name goferd[693]: [INFO][Thread-2] gofer.rmi.store:114 - Using: /var/lib/gofer/messaging/pending/katello
Jun 20 14:32:02 host.name goferd[693]: [ERROR][MainThread] gofer.agent.plugin:698 - plugin:katello, import failed
Jun 20 14:32:02 host.name goferd[693]: [ERROR][MainThread] gofer.agent.plugin:698 - Traceback (most recent call last):
Jun 20 14:32:02 host.name goferd[693]: [ERROR][MainThread] gofer.agent.plugin:698 -   File "/usr/lib/python2.7/site-packages/gofer/agent/plugin.py", line 682, in _load
Jun 20 14:32:02 host.name goferd[693]: [ERROR][MainThread] gofer.agent.plugin:698 -     plugin.impl = __import__(path, {}, {}, [path.split('.')[-1]])
Jun 20 14:32:02 host.name goferd[693]: [ERROR][MainThread] gofer.agent.plugin:698 - ImportError: No module named katello.agent.goferd.plugin
Jun 20 14:32:02 host.name goferd[693]: [INFO][MainThread] gofer.agent.main:89 - agent started.

Foreman and Proxy versions:
As mentioned before, Katello is in ver.3.4 and Foreman 1.15

Has anyone had ever before similar situation?

Thanks for help!

@Jonathon_Turel Is this error related to some of the code re-work in katello-host-tools?

Hi buddyjoe,

The 3.7 client repos you mentioned are available as part of the Katello 3.7 RC1 release and it appears you’ve found an issue. There have been some changes to how we’ve packaged up the related deps (gofer, etc) which got us here.

There are two things you can do to get around this. The easiest fix will be to use the 3.6 client repos until we fix the issue you’ve kindly reported.

However, if you’re feeling up to giving it a try you can adjust /etc/yum.repos.d/gofer.repo to look like this and after reinstalling all gofer related packages from it I suspect you’ll have much better luck. If you go that route please report back and let us know if it worked or not. The reason this will fix the issue is that the gofer provided by the repo I linked will run against python3 which is what our updated client tools expect on f27.

Hello Jonathon,

Thanks for reply!

I followed your suggestion and added additional repo and installed goferd from there. Now on my system is newer version:

Hello Jonathon,

Thanks for reply!

I followed your suggestion and added additional repo and installed goferd from there. Now on my system is newer version:

python2-gofer-2.12.0-1.fc27.noarch
gofer-2.12.0-1.fc27.noarch
python2-gofer-proton-2.12.0-1.fc27.noarch

But still this doesn’t look promising I think:

Jun 21 13:52:32 host.name systemd[1]: Started Gofer Agent.
Jun 21 13:52:34 host.name goferd[796]: [WARNING][MainThread] gofer.agent.plugin:640 - plugin:demo, DISABLED
Jun 21 13:52:34 host.name goferd[796]: [INFO][Thread-1] gofer.rmi.store:108 - Using: /var/lib/gofer/messaging/pending/demo
Jun 21 13:52:34 host.name goferd[796]: [INFO][Thread-2] gofer.rmi.store:108 - Using: /var/lib/gofer/messaging/pending/katello
Jun 21 13:52:34 host.name goferd[796]: [ERROR][MainThread] gofer.agent.plugin:696 - plugin:katello, import failed
Jun 21 13:52:34 host.name goferd[796]: [ERROR][MainThread] gofer.agent.plugin:696 - Traceback (most recent call last):
Jun 21 13:52:34 host.name goferd[796]: [ERROR][MainThread] gofer.agent.plugin:696 -   File "/usr/lib/python2.7/site-packages/gofer/agent/plugin.py", line 680, in _load
Jun 21 13:52:34 host.name goferd[796]: [ERROR][MainThread] gofer.agent.plugin:696 -     plugin.impl = __import__(path, {}, {}, [path.split('.')[-1]])
Jun 21 13:52:34 host.name goferd[796]: [ERROR][MainThread] gofer.agent.plugin:696 - ImportError: No module named katello.agent.goferd.plugin
Jun 21 13:52:34 host.name goferd[796]: [INFO][MainThread] gofer.agent.main:92 - agent started.

Althought there is small change in the Foreman UI itself as the host now is visible as the one who is having the “katello-agent” installed. Unfortunately I am not able to make any use of it as I can’t install a single package from the UI perspective.

Is there anything else I can do to help? Any other output needed?

BTW. How I can make a use of the v.3.6 katello-agent package as all I can find under it is just the client-repos package?

katello-client-repos-3.6.0-5.fc27.noarch.rpm
katello-client-repos-latest.rpm

And the content of the “latest” rpm is as follows…

# Place this file in your /etc/yum.repos.d/ directory

[katello-client]
name=Katello Client 3.6
baseurl=https://fedorapeople.org/groups/katello/releases/yum/3.6/client/fc27/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-katello
enabled=1
gpgcheck=1

# source repositories

[katello-client-source]
name=Katello Client 3.6 Source
baseurl=https://fedorapeople.org/groups/katello/releases/source/srpm/3.6/client/fc27/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-katello
enabled=0
gpgcheck=1

It points exactly to the same URL…

Thanks and regards!

Ah ha! I left out an important detail. That repo I pointed you to contains both python 2 and 3 RPMs.

The packages you want are: gofer python3-gofer python3-gofer-proton

Sorry about that omission. Give it a try.

OK,

So not sure what actually helped here but now everything seems to be working fine:

● goferd.service - Gofer Agent
   Loaded: loaded (/usr/lib/systemd/system/goferd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-06-21 14:42:23 UTC; 9s ago
 Main PID: 4354 (python3)
    Tasks: 12 (limit: 4915)
   CGroup: /system.slice/goferd.service
           ├─4354 /usr/bin/python3 /usr/bin/goferd --foreground
           └─4368 /usr/bin/python3 /usr/bin/goferd --foreground

Jun 21 14:42:31 host.name env[4354]: Transaction check succeeded.
Jun 21 14:42:31 host.name goferd[4368]: [INFO][worker-0] dnf:745 - Transaction check succeeded.
Jun 21 14:42:31 host.name env[4354]: Running transaction test
Jun 21 14:42:31 host.name goferd[4368]: [INFO][worker-0] dnf:748 - Running transaction test
Jun 21 14:42:32 host.name env[4354]: Transaction test succeeded.
Jun 21 14:42:32 host.name goferd[4368]: [INFO][worker-0] dnf:765 - Transaction test succeeded.
Jun 21 14:42:32 host.name goferd[4368]: [DDEBUG][worker-0] dnf:181 - timer: transaction test: 356 ms
Jun 21 14:42:32 host.name env[4354]: Running transaction
Jun 21 14:42:32 host.name goferd[4368]: [INFO][worker-0] dnf:780 - Running transaction
Jun 21 14:42:32 host.name goferd[4368]: [DDEBUG][worker-0] dnf:859 - RPM transaction start.

Below gofer packages installed at this moment:

python3-gofer-proton-2.12.0-1.fc27.noarch
python3-gofer-2.12.0-1.fc27.noarch
python2-gofer-2.12.0-1.fc27.noarch
python2-gofer-proton-2.12.0-1.fc27.noarch
gofer-2.12.0-1.fc27.noarch

and katello-agent version:

katello-agent-3.3.0-1.fc27.noarch

Below the change I performed (w/o the change, agent was throwing an error):

/etc/sysconfig/goferd
# Python interpreter.
--> PYTHON=/usr/bin/python3
--> PYTHONPATH=/usr/lib/python3.6/site-packages/
# Python optimization (0=disabled, 1=enabled).
PYTHONOPTIMIZE=1

I tested it and now I am able for example to install a package from the Foreman UI.

Regards!

Glad you got it working. On my f27 system I didn’t need to modify the PYTHON in the gofer config so long as the python3 gofer packages were installed. Nevertheless - good stuff!