Bug 548547 - jabberd osa-dispatcher issue with spacewalk 0.7 (upgrade from 0.6)
Summary: jabberd osa-dispatcher issue with spacewalk 0.7 (upgrade from 0.6)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.7
Hardware: i386
OS: Linux
low
high
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space10
TreeView+ depends on / blocked
 
Reported: 2009-12-17 18:45 UTC by Romain
Modified: 2010-05-04 09:18 UTC (History)
3 users (show)

Fixed In Version: jabberd-2.2.8-2.el5
Clone Of:
Environment:
Last Closed: 2010-05-04 08:29:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Romain 2009-12-17 18:45:13 UTC
Description of problem:
After an upgrade from 0.6 to 0.7 jabberd and osa-dispatcher seems to have issues to start or connect

Version-Release number of selected component (if applicable):
spacewalk 0.7

jabberpy-0.5-0.17.el5
jabberd-2.2.8-2.el5
jabberd-selinux-1.4.7-1.el5

How reproducible:
everytime osa-dispatcher starts

Steps to Reproduce:
1.
2.
3.
  
Actual results:
starting services:
Starting osa-dispatcher: RHN 3021 2009/12/17 13:14:42 -04:00: ('Traceback (most recent call last):\n  File "/usr/share/rhn/osad/jabber_lib.py", line 254, in setup_connection\nc = self._get_jabber_client(js)\nFile "/usr/share/rhn/osad/jabber_lib.py", line 311, in get_jabber_client\n    c.connect()\n  File "/usr/share/rhn/osad/jabber_lib.py", line 577
, in connect\n    jabber.Client.connect(self)\n  File "/usr/lib/python2.4/site-packages/jabber/xmlstream.py", line 464, in connect\n    else: self._sock.connect((self._hostIP, self._port))\n  File "<string>", line 1, in connect\nerror: (111, \'Connection refused\')\n',)

Log:
2009/12/17 13:42:26 -04:00 8133 0.0.0.0: osad/jabber_lib.print_message('socket error',)
2009/12/17 13:42:26 -04:00 8133 0.0.0.0: osad/jabber_lib.print_message('Could not connect to jabber server', 'cnxsrb38.gsr.connexim.ca') 
2009/12/17 13:42:26 -04:00 8133 0.0.0.0: osad/jabber_lib.setup_connection('ERROR', 'Traceback (most recent call last):\n  File "/usr/share/rhn/osad/jabber_lib.py", line 254, in setup_connection\n    c = self._get_jabber_client(js)\n  File "/usr/share/rhn/osad/jabber_lib.py", line 311, in _get_jabber_client\n    c.connect()\n  File "/usr/share/rhn/osad/jabber_lib.py", line 577, in connect\n    jabber.Client.connect(self)\n  File "/usr/lib/python2.4/site-packages/jabber/xmlstream.py", line 464, in connect\n    else: self._sock.connect((self._hostIP, self._port))\n  File "<string>", line 1, in connect\nerror: (111, \'Connection refused\')\n')
2009/12/17 13:42:26 -04:00 8133 0.0.0.0: osad/jabber_lib.setup_connection('Could not connect to any jabber server',)
2009/12/17 13:42:26 -04:00 8133 0.0.0.0: osad/jabber_lib.main('Unable to connect to jabber servers, sleeping 10 seconds',)

service status:
[root@cnxsrb38:/var/log/rhn]/etc/init.d/jabberd status
router (pid 9802) is running...
sm dead but subsys locked
c2s dead but subsys locked
s2s dead but subsys locked

Expected results:


Additional info:

Comment 1 Jan Pazdziora (Red Hat) 2010-02-02 11:01:14 UTC
Romain, I wonder if this could be either iptables or SELinux issue.

Could you check your iptables settings and also /var/log/audit/audit.log for AVC denials?

Thank you,

Jan

Comment 2 Romain 2010-02-02 23:01:00 UTC
Hi,
I have tested with and without iptables loaded but have the same issue. Also SELinux is not loaded.
Romain

Comment 3 Jan Pazdziora (Red Hat) 2010-02-03 08:44:38 UTC
What is in

# grep jabber /var/log/messages

?

Comment 4 Romain 2010-02-05 20:12:49 UTC
I have found the following errors when restart rhn-satellite:

[root@cnxsrb38:~]grep jabber /var/log/2010/02/local3-notice--2010-02-05.log
2010-02-05 15:02:51 cnxsrb38 jabberd/router[29455]: shutting down
2010-02-05 15:02:58 cnxsrb38 jabberd/router[21157]: starting up
2010-02-05 15:02:58 cnxsrb38 jabberd/router[21157]: loaded user table (1 users)
2010-02-05 15:02:58 cnxsrb38 jabberd/router[21157]: couldn\'t open filter file /etc/jabberd/router-filter.xml: Permission denied
2010-02-05 15:02:58 cnxsrb38 jabberd/router[21157]: [0.0.0.0, port=5347] listening for incoming connections

So I have done a 
[root@cnxsrb38:~]ls -alrt /etc/jabberd/router-filter.xml
-rw-r----- 1 root root 1505 Dec 22 12:47 /etc/jabberd/router-filter.xml

I have changed the permissions
chmod 755 /etc/jabberd/router-filter.xml

then the log show:
2010-02-05 15:07:18 cnxsrb38 jabberd/router[24123]: shutting down
2010-02-05 15:07:26 cnxsrb38 jabberd/router[25660]: starting up
2010-02-05 15:07:26 cnxsrb38 jabberd/router[25660]: loaded user table (1 users)
2010-02-05 15:07:26 cnxsrb38 jabberd/router[25660]: loaded filters (0 rules)
2010-02-05 15:07:26 cnxsrb38 jabberd/router[25660]: [0.0.0.0, port=5347] listening for incoming connections

So this error disappeared.

I have also this logs:
2010-02-05 15:02:58 cnxsrb38 jabberd/router[21157]: process id is 21157, written to /var/lib/jabberd/pid/router.pid
2010-02-05 15:05:04 cnxsrb38 jabberd/router[22645]: process id is 22645, written to /var/lib/jabberd/pid/router.pid
2010-02-05 15:06:15 cnxsrb38 jabberd/router[24123]: process id is 24123, written to /var/lib/jabberd/pid/router.pid
2010-02-05 15:07:26 cnxsrb38 jabberd/router[25660]: process id is 25660, written to /var/lib/jabberd/pid/router.pid

But the main issues still there and I still receive the same error messages

Comment 5 Patrick Kelso 2010-02-17 04:31:05 UTC
I had this same problem and it turned out to be the c2s.xml file was owned by root not the jabber user. 

I noticed I was able to start c2s manually as root, but it fails when starting from scripts.

It looks like the upgrade to 0.7 may have changed a few permissions.

Comment 6 Jan Pazdziora (Red Hat) 2010-05-04 08:29:32 UTC
Hello,

I've now checked Spacewalk 1.0 with jabberd-2.2.8-2.el5 and the permissions are as follows:

# ls -la /etc/jabberd
total 320
drwxr-x---  3 jabber jabber  4096 Apr 29 14:32 .
drwxr-xr-x 89 root   root    4096 May  4 10:17 ..
-rw-r-----  1 jabber jabber 20611 Apr 29 14:32 c2s.xml
-rw-r-----  1 jabber jabber 20387 Jul 22  2009 c2s.xml.dist
-rw-r-----  1 jabber jabber 20565 Apr 29 14:23 c2s.xml-swsave
-rw-r-----  1 jabber jabber  1505 Apr 29 14:23 router-filter.xml
-rw-r-----  1 jabber jabber  1505 Jul 22  2009 router-filter.xml.dist
-rw-r-----  1 jabber jabber   292 Apr 29 14:23 router-users.xml
-rw-r-----  1 jabber jabber   258 Jul 22  2009 router-users.xml.dist
-rw-r-----  1 jabber jabber  6768 Apr 29 14:23 router.xml
-rw-r-----  1 jabber jabber  6734 Jul 22  2009 router.xml.dist
-rw-r-----  1 jabber jabber 11205 Apr 29 14:32 s2s.xml
-rw-r-----  1 jabber jabber 10990 Jul 22  2009 s2s.xml.dist
-rw-r-----  1 jabber jabber 11024 Apr 29 14:23 s2s.xml-swsave
-rw-r-----  1 root   jabber  2376 Apr 29 14:23 server.pem
-rw-r-----  1 jabber jabber 28717 Apr 29 14:32 sm.xml
-rw-r-----  1 jabber jabber 28592 Jul 22  2009 sm.xml.dist
-rw-r-----  1 jabber jabber 28708 Apr 29 14:23 sm.xml-swsave
drwxr-x---  2 jabber jabber  4096 Apr 29 14:23 templates

So this was resolved with the latest jabberd.


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