When connecting using jabberpy-0.5-0 from windows pc, connection is closed by server


I am using the test_client.py (included with jabberpy-0.5-0) example to connect to the Openfire Server (3.60a) from a windows box. When the client sends the presence, the connection for some reason is closed - the below is what I see in nohup.out. I do not see any errors in error.log or warn.log.

I’m using the jabberpy-0.5-0 version. When I connect using this same version from a linux box the connection is made and remains up after the presence is received.

At the windows side I see a traceback once the connection is closed.

Would anyone have any ideas why the connection is being closed ?

Best Regards,


Openfire server nohup.out:


C2S - RECV (26573637): <?xml version='1.0' encoding='UTF-8' ?> <stream:stream to=‘atg-a2m-1’ xmlns=‘jabber:client’ xmlns:stream=‘http://etherx.jabber.org/streams’>
C2S - SENT (26573637): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client” from=“atg-a2m-1” id=“edcb3d55” xml:lang=“en”>
C2S - RECV (26573637): test
C2S - SENT (26573637): test
C2S - RECV (26573637): testrsrc65fbc1511554814d7db4 c795405ec05a6e8a378c
C2S - SENT (26573637):
C2S - RECV (26573637):
C2S - SENT (26573637):
C2S - RECV (26573637):
CLOSED (26573637)

Windows test_client.py


DEBUG: DEPTH -> 3 , tag -> jabber:iq:roster query, attrs -> {}



DEBUG: Got iq stanza

DEBUG: got roster response

DEBUG: roster -> <jabber.Roster instance at 0x00B94468>

Tue Dec 02 13:01:31 2008 - SENT: -

DEBUG: sent

<-[;31mOk, ready<-[0m

<-[;31mType /help for help<-[0m

Traceback (most recent call last):

File “test_client.py”, line 246, in (module)

inputs, output, errors, = select([sys.stdin], [], [], 1)

select.error: (10038, ‘An operation was attempted on something that is not a socket’)

The test_client.py is using:


inputs,outputs,errors = select.select([sys.stdin], [], [],1)

if sys.stdin in inputs:




According to the Python docs:

On Windows, the underlying select() function is provided by the WinSock library, and

does not handle file descriptors that don’t originate from WinSock.

The Win32 functions are

-WaitForSingleObject (to wait with a short timeout)

-GetStdHandle (to get at the Win32 handle for sys.stdin)

Can also try Mark Hammonds Win32 extension if these functions are exported to Python.