Bug 790797 - jabberpy can not reach jabberd server running on IPv6 network config
Summary: jabberpy can not reach jabberd server running on IPv6 network config
Keywords:
Status: CLOSED DUPLICATE of bug 715333
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client
Version: 541
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 790326
TreeView+ depends on / blocked
 
Reported: 2012-02-15 12:29 UTC by Jan Hutař
Modified: 2012-03-15 15:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-15 15:29:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2012-02-15 12:29:55 UTC
Description of problem:
I have a Spacewalk 1.6 (running jabberd server) on RHEL5 on system with only IPv6 enabled with RHN Tools channel enabled and when I restart osa-dispatcher service on it, I see error and osa-dispatcher fails to connect.


Version-Release number of selected component (if applicable):
jabberpy-0.5-0.20.el5sat (this is from rhn-tools-rhel-x86_64-server-5, in EPEL there is older jabberpy-0.5-0.18.el5)
jabberd-2.2.11-3.el5


How reproducible:
1 of 1


Steps to Reproduce:
1. Make sure jabberd runs:
   # netstat -pln  | grep 5222
2. # service osa-dispatcher restart


Actual results:
# service osa-dispatcher restart
Shutting down osa-dispatcher:                              [  OK  ]
Starting osa-dispatcher: RHN 5784 2012/02/15 07:05:25 -04:00: ('Traceback (most recent call last):\n  File "/usr/share/rhn/osad/jabber_lib.py", line 252, in setup_connection\n    c = self._get_jabber_client(js)\n  File "/usr/share/rhn/osad/jabber_lib.py", line 309, in _get_jabber_client\n    c.connect()\n  File "/usr/share/rhn/osad/jabber_lib.py", line 567, in connect\n    jabber.Client.connect(self)\n  File "/usr/lib/python2.4/site-packages/jabber/xmlstream.py", line 465, in connect\n    else: self._sock.connect((self._hostIP, self._port))\n  File "<string>", line 1, in connect\ngaierror: (-2, \'Name or service not known\')\n',)
                                                           [  OK  ]


Expected results:
osa-dispatcher should be able to connect to jabberd even on IPv6 system


Additional info:
This "fixed" my problem:

# diff -u /usr/lib/python2.4/site-packages/jabber/xmlstream.py{.ORIG,}
--- /usr/lib/python2.4/site-packages/jabber/xmlstream.py.ORIG	2012-02-15 07:03:57.000000000 -0500
+++ /usr/lib/python2.4/site-packages/jabber/xmlstream.py	2012-02-15 07:12:13.000000000 -0500
@@ -458,7 +458,7 @@
             self._setupComms()
             return
 
-        self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+        self._sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
         try:
             if self._proxy: self._sock.connect((self._proxy['host'], self._proxy['port']))
             else: self._sock.connect((self._hostIP, self._port))

Comment 1 Milan Zázrivec 2012-03-07 15:39:13 UTC
You actually do have to use jabberpy-0.5-0.18 from EPEL, this version does
support IPv6 connections.

Comment 2 Jan Pazdziora (Red Hat) 2012-03-15 15:29:19 UTC
For the purpose of RHEL and Satellite, we are tracking IPv6-ification of jabberpy in bug 715333.

*** This bug has been marked as a duplicate of bug 715333 ***

Comment 3 Jan Hutař 2012-03-15 15:51:28 UTC
Thanks Milan (and sorry for a delayed response), you were absolutely right:

# rpm -V jabberpy
# service osa-dispatcher restart
Shutting down osa-dispatcher:                              [  OK  ]
Starting osa-dispatcher:                                   [  OK  ]
# rpm -q jabberpy
jabberpy-0.5-0.21.el6.noarch

# rpm -V jabberpy
# service osa-dispatcher restart
Shutting down osa-dispatcher:                              [  OK  ]
Starting osa-dispatcher:                                   [  OK  ]
# rpm -q jabberpy
jabberpy-0.5-0.18.el5


Note You need to log in before you can comment on or make changes to this bug.