Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goferd.service is failing, when starting without network ready #102

Open
jortel opened this issue Mar 1, 2019 · 0 comments
Open

goferd.service is failing, when starting without network ready #102

jortel opened this issue Mar 1, 2019 · 0 comments

Comments

@jortel
Copy link
Owner

jortel commented Mar 1, 2019

https://bugzilla.redhat.com/show_bug.cgi?id=1681182

Description of problem:
If network is not already online and in case network.service is disabled, the goferd.service will report error in logs.

How reproducible:
maybe only in slow networks, where assinging IP take some time

Steps to Reproduce:

  1. install client from satellite-6
  2. disable network.service on client
  3. boot client
Actual results:
Feb 06 10:57:23 sample-host goferd[14030]: [WARNING][MainThread] gofer.agent.plugin:647 - plugin:demo, DISABLED
Feb 06 10:57:23 sample-host goferd[14030]: [INFO][Thread-1] gofer.rmi.store:108 - Using: /var/lib/gofer/messaging/pending/demo
Feb 06 10:57:23 sample-host goferd[14030]: [INFO][Thread-2] gofer.rmi.store:108 - Using: /var/lib/gofer/messaging/pending/katello
Feb 06 10:57:23 sample-host goferd[14030]: [INFO][MainThread] gofer.agent.plugin:692 - plugin:katello loaded using: katello.agent.goferd.plugin
Feb 06 10:57:23 sample-host goferd[14030]: [INFO][MainThread] rhsm.connection:871 - Connection built: host=sat-qs.wob.vw.vwg port=443 handler=/rhsm auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 - [Errno -2] Name or service not known
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 - Traceback (most recent call last):
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib/python2.7/site-packages/katello/agent/goferd/plugin.py", line 197, in validate_registration
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     consumer = uep.getConsumer(consumer_id)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1105, in getConsumer
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     return self.conn.request_get(method)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 693, in request_get
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     return self._request("GET", method, headers=headers)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 719, in _request
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     info=info, headers=headers)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 557, in _request
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     conn.request(request_type, handler, body=body, headers=final_headers)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/httplib.py", line 1041, in request
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     self._send_request(method, url, body, headers)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/httplib.py", line 1075, in _send_request
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     self.endheaders(body)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/httplib.py", line 1037, in endheaders
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     self._send_output(message_body)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/httplib.py", line 881, in _send_output
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     self.send(msg)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/httplib.py", line 843, in send
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     self.connect()
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/httplib.py", line 1251, in connect
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     HTTPConnection.connect(self)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/httplib.py", line 824, in connect
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     self.timeout, self.source_address)
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -   File "/usr/lib64/python2.7/socket.py", line 553, in create_connection
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 -     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
Feb 06 10:57:23 sample-host goferd[14030]: [ERROR][MainThread] katello.agent.goferd.plugin:206 - gaierror: [Errno -2] Name or service not known
Feb 06 10:57:23 sample-host goferd[14030]: [WARNING][MainThread] katello.agent.goferd.plugin:87 - [Errno -2] Name or service not known

Expected results:
service should start without any error reporting.

Additional info:
It's possible to fix this, when the service-unit is changed like.

 [Unit]
 Description=Gofer Agent
-After=network.target
+After=network-online.target
+Wants=network-online.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant