Bug 670881

Summary: osad on IPv6 throws "gaierror: (-2, 'Name or service not known')"
Product: [Community] Spacewalk Reporter: Jan Hutař <jhutar>
Component: ClientsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satellite-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 1.2   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-22 16:51:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 487666, 723481    

Description Jan Hutař 2011-01-19 15:31:01 UTC
Description of problem:
I have RHEL5 system registered to Satellite and want to run osad on the server, but I'm getting a traceback. Client <-> Satellite connection is through IPv6.


Version-Release number of selected component (if applicable):
Satellite 5.4.0
osa-dispatcher-5.9.38-1.el5sat
osad-5.9.38-1.el5sat


How reproducible:
tested only on one my system


Steps to Reproduce:
1. Have RHEL5 client configured to register to Sat540@RHEL5 using IPv6
2. Register client using serverURL=http://...
3. On client run:
   # service osad restart


Actual results:
I have enabled debugging and this is the output:
# service osad restart
Shutting down osad: [  OK  ]
Starting osad: 2011-01-19 10:21:59 osad._setup_config: Updating configuration
2011-01-19 10:21:59 osad._setup_config: Time drift 0
2011-01-19 10:21:59 osad._setup_config: Client name e638de55a1f20219
2011-01-19 10:21:59 osad._setup_config: Shared key 53c9a4ee4a727939584cd984d7c5b39538b1fab1
2011-01-19 10:21:59 jabber_lib.setup_connection: Connecting to sun-v40z-01.rhts.eng.bos.redhat.com
2011-01-19 10:21:59 jabber_lib._get_jabber_client: 
2011-01-19 10:21:59 jabber_lib._get_jabber_client: Connecting to sun-v40z-01.rhts.eng.bos.redhat.com
2011-01-19 10:21:59 jabber_lib.__init__: 
2011-01-19 10:21:59 jabber_lib.__init__: 
2011-01-19 10:21:59 jabber_lib.check_cert: Loading cert <X509Name object '/C=CZ/ST=./L=Brno/O=Systems Management QA Brno/OU=./CN=sun-v40z-01.rhts.eng.bos.redhat.com'>
2011-01-19 10:21:59 jabber_lib.connect: 
2011-01-19 10:21:59 jabber_lib.connect: Attempting to connect
2011-01-19 10:21:59 jabber_lib.print_message: socket error
2011-01-19 10:21:59 jabber_lib.print_message: Could not connect to jabber server sun-v40z-01.rhts.eng.bos.redhat.com
Traceback (most recent call last):
  File "/usr/share/rhn/osad/jabber_lib.py", line 254, in setup_connection
    c = self._get_jabber_client(js)
  File "/usr/share/rhn/osad/jabber_lib.py", line 311, in _get_jabber_client
    c.connect()
  File "/usr/share/rhn/osad/jabber_lib.py", line 577, in connect
    jabber.Client.connect(self)
  File "/usr/lib/python2.4/site-packages/jabber/xmlstream.py", line 464, in connect
    else: self._sock.connect((self._hostIP, self._port))
  File "<string>", line 1, in connect
gaierror: (-2, 'Name or service not known')

2011-01-19 10:21:59 jabber_lib.setup_connection: Could not connect to any jabber server
2011-01-19 10:21:59 jabber_lib.push_to_background: Pushing process into background
[  OK  ]


Expected results:
Should just PASS

Comment 1 Jan Hutař 2011-01-25 08:51:54 UTC
On RHEL4 osad starts without traceback, but do not connect:

2011-01-25 03:38:18 osad.setup_config: Skipping config setup; counter=2; interval=86
2011-01-25 03:38:18 jabber_lib.setup_connection: Connecting to sun-v40z-01.rhts.eng.bos.redhat.com
2011-01-25 03:38:18 jabber_lib._get_jabber_client: 
2011-01-25 03:38:18 jabber_lib._get_jabber_client: Connecting to sun-v40z-01.rhts.eng.bos.redhat.com
2011-01-25 03:38:18 jabber_lib.__init__: 
2011-01-25 03:38:18 jabber_lib.__init__: 
2011-01-25 03:38:18 jabber_lib.check_cert: Loading cert <X509Name object '/C=CZ/ST=./L=Brno/O=Systems Management QA Brno/OU=./CN=sun-v40z-01.rhts.eng.bos.redhat.com'>
2011-01-25 03:38:18 jabber_lib.connect: 
2011-01-25 03:38:18 jabber_lib.connect: Attempting to connect
2011-01-25 03:38:18 jabber_lib.print_message: socket error
2011-01-25 03:38:18 jabber_lib.print_message: Could not connect to jabber server sun-v40z-01.rhts.eng.bos.redhat.com
2011-01-25 03:38:18 jabber_lib.setup_connection: Could not connect to any jabber server
2011-01-25 03:38:18 jabber_lib.main: Unable to connect to jabber servers, sleeping 66 seconds

I have:

osad-5.9.10-5.el4sat
up2date-4.9.1-29.el4
rhnlib-2.1.4-17.el4_8.1
python-2.3.4-14.7.el4

Comment 2 Jan Hutař 2011-01-25 09:19:03 UTC
Similar error on RHEL6 as well:

# rpm -q osad rhnlib
osad-5.9.38-1.el6sat.noarch
rhnlib-2.5.22-9.el6.noarch
# service osad restart
Shutting down osad: [  OK  ]
Starting osad: /usr/lib/python2.6/site-packages/jabber/jabber.py:68: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha, time
Traceback (most recent call last):
  File "/usr/share/rhn/osad/jabber_lib.py", line 254, in setup_connection
    c = self._get_jabber_client(js)
  File "/usr/share/rhn/osad/jabber_lib.py", line 311, in _get_jabber_client
    c.connect()
  File "/usr/share/rhn/osad/jabber_lib.py", line 577, in connect
    jabber.Client.connect(self)
  File "/usr/lib/python2.6/site-packages/jabber/xmlstream.py", line 464, in connect
    else: self._sock.connect((self._hostIP, self._port))
  File "<string>", line 1, in connect
gaierror: [Errno -2] Name or service not known

[  OK  ]

Comment 3 Miroslav Suchý 2011-04-11 07:34:22 UTC
We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5.

Comment 4 Miroslav Suchý 2011-04-11 07:37:31 UTC
We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5.

Comment 5 Jan Pazdziora 2011-07-20 11:53:01 UTC
Aligning under space16.

Comment 6 Milan Zázrivec 2011-09-23 10:40:46 UTC
Updated jabberpy has been submitted to F16, F17, EPEL5 and EPEL6:

    jabberpy-0.5-0.23.fc16
    jabberpy-0.5-0.23.fc17
    jabberpy-0.5-0.18.el5
    jabberpy-0.5-0.21.el6

Comment 7 Milan Zázrivec 2011-12-22 16:51:10 UTC
Spacewalk 1.6 has been released.