Getting messages to spark from xmpppy.py command line

I am wanting to send server problem messages through command line on linux.

I have installed python xmpppy.py and configured the script to send messages to myself, the users its sending as is zabbix.

From the debug i get this when i send a messageclear

./xmpp.sh sidrake@openfire ‘test’
Invalid debugflag given: always
Invalid debugflag given: nodebuilder
DEBUG:
DEBUG: Debug created for build/bdist.linux-x86_64/egg/xmpp/client.py
DEBUG: flags defined: always,nodebuilder
DEBUG: socket start Plugging <xmpp.transports.TCPsocket instance at 0x2b2335264f80> into <xmpp.client.Client instan ce at 0x2b2335264a28>
DEBUG: socket warn Could not load one of the supported DNS libraries (dnspython or pydns). SRV records will not be queried and you may need to set custom hostname/port for some servers to be accessible.\n
DEBUG: socket start Successfully connected to remote host (‘openfire’, 5222)
DEBUG: dispatcher start Plugging <xmpp.dispatcher.Dispatcher instance at 0x2b2335272758> into <xmpp.client.Client insta nce at 0x2b2335264a28>
DEBUG: dispatcher info Registering namespace "unknown"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(unknown)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(unknown)
DEBUG: dispatcher info Registering namespace "http://etherx.jabber.org/streams"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/str eams)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/str eams)
DEBUG: dispatcher info Registering namespace "jabber:client"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(jabber:client)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(jabber:client)
DEBUG: dispatcher info Registering protocol “iq” as <class ‘xmpp.protocol.Iq’>(jabber:client)
DEBUG: dispatcher info Registering protocol “presence” as <class ‘xmpp.protocol.Presence’>(jabber:client)
DEBUG: dispatcher info Registering protocol “message” as <class ‘xmpp.protocol.Message’>(jabber:client)
DEBUG: dispatcher info Registering handler <bound method Dispatcher.streamErrorHandler of <xmpp.dispatcher.Dispatcher instance at 0x2b2335272758>> for “error” type-> ns->(http://etherx.jabber.org/streams)
DEBUG: dispatcher warn Registering protocol “error” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/strea ms)
DEBUG: socket sent <?xml version='1.0'?>
<stream:stream xmlns=“jabber:client” to=“openfire” version=“1.0” xmlns:stream=“http://etherx.jabber.org/streams” >
DEBUG: socket got <?xml version='1.0' encoding='UTF-8'?>
<stream:stream xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client” from=“openfire” id=“6ba16506” xml: lang=“en” version=“1.0”>
DEBUG: socket got stream:features




DIGEST-MD5
PLAIN
ANONYMOUS
CRAM-MD5

</stream:features>
DEBUG: dispatcher warn Unknown stanza: features
DEBUG: dispatcher ok Dispatching unknown stanza with type-> props->[u’urn:ietf:params:xml:ns:xmpp-tls’, u’urn:ietf:p arams:xml:ns:xmpp-sasl’] id->None
DEBUG: tls start Plugging <xmpp.transports.TLS instance at 0x2b2335273440> into <xmpp.client.Client instance at 0x2b2335264a28>
DEBUG: tls ok TLS supported by remote server. Requesting TLS start.
DEBUG: dispatcher info Registering handler <bound method TLS.StartTLSHandler of <xmpp.transports.TLS instance at 0x2b2 335273440>> for “proceed” type-> ns->(urn:ietf:params:xml:ns:xmpp-tls)
DEBUG: dispatcher warn Registering namespace "urn:ietf:params:xml:ns:xmpp-tls"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(urn:ietf:params:xml:ns:xmpp- tls)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(urn:ietf:params:xml:ns:xmpp- tls)
DEBUG: dispatcher warn Registering protocol “proceed” as <class ‘xmpp.protocol.Protocol’>(urn:ietf:params:xml:ns:xmpp- tls)
DEBUG: dispatcher info Registering handler <bound method TLS.StartTLSHandler of <xmpp.transports.TLS instance at 0x2b2 335273440>> for “failure” type-> ns->(urn:ietf:params:xml:ns:xmpp-tls)
DEBUG: dispatcher warn Registering protocol “failure” as <class ‘xmpp.protocol.Protocol’>(urn:ietf:params:xml:ns:xmpp- tls)
DEBUG: socket sent
DEBUG: socket got
DEBUG: dispatcher ok Got urn:ietf:params:xml:ns:xmpp-tls/proceed stanza
DEBUG: dispatcher ok Dispatching proceed stanza with type-> props->[] id->None
DEBUG: tls ok Got starttls proceed response. Switching to TLS/SSL…
DEBUG: dispatcher stop Plugging <xmpp.dispatcher.Dispatcher instance at 0x2b2335272758> out of <xmpp.client.Client ins tance at 0x2b2335264a28>.
DEBUG: dispatcher start Plugging <xmpp.dispatcher.Dispatcher instance at 0x2b2335273710> into <xmpp.client.Client insta nce at 0x2b2335264a28>
DEBUG: dispatcher info Registering namespace "unknown"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(unknown)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(unknown)
DEBUG: dispatcher info Registering namespace "http://etherx.jabber.org/streams"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/str eams)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/str eams)
DEBUG: dispatcher info Registering namespace "jabber:client"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(jabber:client)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(jabber:client)
DEBUG: dispatcher info Registering protocol “iq” as <class ‘xmpp.protocol.Iq’>(jabber:client)
DEBUG: dispatcher info Registering protocol “presence” as <class ‘xmpp.protocol.Presence’>(jabber:client)
DEBUG: dispatcher info Registering protocol “message” as <class ‘xmpp.protocol.Message’>(jabber:client)
DEBUG: dispatcher info Registering handler <bound method Dispatcher.streamErrorHandler of <xmpp.dispatcher.Dispatcher instance at 0x2b2335273710>> for “error” type-> ns->(http://etherx.jabber.org/streams)
DEBUG: dispatcher warn Registering protocol “error” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/strea ms)
DEBUG: socket sent <?xml version='1.0'?>
<stream:stream xmlns=“jabber:client” to=“openfire” version=“1.0” xmlns:stream=“http://etherx.jabber.org/streams” >
connected with tls
DEBUG: socket got <?xml version='1.0' encoding='UTF-8'?>
<stream:stream xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client” from=“openfire” id=“6ba16506” xml: lang=“en” version=“1.0”>
stream:features

DIGEST-MD5
PLAIN
ANONYMOUS
CRAM-MD5


zlib


</stream:features>
DEBUG: dispatcher warn Unknown stanza: features
DEBUG: dispatcher ok Dispatching unknown stanza with type-> props->[u’urn:ietf:params:xml:ns:xmpp-sasl’, u’[http://ja](http://ja) bber.org/features/compress’, u’http://jabber.org/features/iq-auth’] id->None
DEBUG: sasl start Plugging <xmpp.auth.SASL instance at 0x2b2335277200> into <xmpp.client.Client instance at 0x2b2 335264a28>
DEBUG: dispatcher info Registering handler <bound method SASL.SASLHandler of <xmpp.auth.SASL instance at 0x2b233527720 0>> for “challenge” type-> ns->(urn:ietf:params:xml:ns:xmpp-sasl)
DEBUG: dispatcher warn Registering namespace "urn:ietf:params:xml:ns:xmpp-sasl"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(urn:ietf:params:xml:ns:xmpp- sasl)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(urn:ietf:params:xml:ns:xmpp- sasl)
DEBUG: dispatcher warn Registering protocol “challenge” as <class ‘xmpp.protocol.Protocol’>(urn:ietf:params:xml:ns:xmp p-sasl)
DEBUG: dispatcher info Registering handler <bound method SASL.SASLHandler of <xmpp.auth.SASL instance at 0x2b233527720 0>> for “failure” type-> ns->(urn:ietf:params:xml:ns:xmpp-sasl)
DEBUG: dispatcher warn Registering protocol “failure” as <class ‘xmpp.protocol.Protocol’>(urn:ietf:params:xml:ns:xmpp- sasl)
DEBUG: dispatcher info Registering handler <bound method SASL.SASLHandler of <xmpp.auth.SASL instance at 0x2b233527720 0>> for “success” type-> ns->(urn:ietf:params:xml:ns:xmpp-sasl)
DEBUG: dispatcher warn Registering protocol “success” as <class ‘xmpp.protocol.Protocol’>(urn:ietf:params:xml:ns:xmpp- sasl)
DEBUG: socket sent
DEBUG: socket got cmVhbG09Im9wZW5maXJlIixub25jZT0iZFlhNX VSWUU xTjBpcnZ1STBZb1pBdEYwdm9COXJuWnlMbGtHTVk1VCIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi04LG FsZ29yaXRobT1tZDUtc2Vzcw==
DEBUG: dispatcher ok Got urn:ietf:params:xml:ns:xmpp-sasl/challenge stanza
DEBUG: dispatcher ok Dispatching challenge stanza with type-> props->[] id->None
DEBUG: sasl ok Got challenge:realm=“openfire”,nonce=“dYa5uRYE1N0irvuI0YoZAtF0voB9rnZyLlkGMY5T”,qop =“auth”,char set=utf-8,algorithm=md5-sess
DEBUG: socket sent Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iemFiYm l4QG9w ZW5maXJlIixyZWFsbT0ib3BlbmZpcmUiLG5vbmNlPSJkWWE1dVJZRTFOMGlydnVJMFlvWkF0RjB2b0I 5cm5aeUxsa0dNWTVUIixuYz0wMDAwMDAwMSxjbm9uY 2U9IjVjNGE2NjNhN2QxMTA4NWI4YjQ5NDg2ODFkODQ2YzZlMjQwZWNlZWE2ZmY1YjNiOWEiLGRpZ2Vz dC11cmk9InhtcHAvb3BlbmZpcmUiLHJlc3BvbnNlPT czMTdhNDA4OmLHFvcD1hdXRo
DEBUG: socket got cnNwYXV0aD0xNTkyOWIzmMWEyOWUwODQyZjIyM WY0ZjdiOQ==
DEBUG: dispatcher ok Got urn:ietf:params:xml:ns:xmpp-sasl/success stanza
DEBUG: dispatcher ok Dispatching success stanza with type-> props->[] id->None
DEBUG: sasl ok Successfully authenticated with remote server.
DEBUG: dispatcher stop Plugging <xmpp.dispatcher.Dispatcher instance at 0x2b2335273710> out of <xmpp.client.Client ins tance at 0x2b2335264a28>.
DEBUG: dispatcher start Plugging <xmpp.dispatcher.Dispatcher instance at 0x2b2335272758> into <xmpp.client.Client insta nce at 0x2b2335264a28>
DEBUG: dispatcher info Registering namespace "unknown"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(unknown)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(unknown)
DEBUG: dispatcher info Registering namespace "http://etherx.jabber.org/streams"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/str eams)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/str eams)
DEBUG: dispatcher info Registering namespace "jabber:client"
DEBUG: dispatcher info Registering protocol “unknown” as <class ‘xmpp.protocol.Protocol’>(jabber:client)
DEBUG: dispatcher info Registering protocol “default” as <class ‘xmpp.protocol.Protocol’>(jabber:client)
DEBUG: dispatcher info Registering protocol “iq” as <class ‘xmpp.protocol.Iq’>(jabber:client)
DEBUG: dispatcher info Registering protocol “presence” as <class ‘xmpp.protocol.Presence’>(jabber:client)
DEBUG: dispatcher info Registering protocol “message” as <class ‘xmpp.protocol.Message’>(jabber:client)
DEBUG: dispatcher info Registering handler <bound method Dispatcher.streamErrorHandler of <xmpp.dispatcher.Dispatcher instance at 0x2b2335272758>> for “error” type-> ns->(http://etherx.jabber.org/streams)
DEBUG: dispatcher warn Registering protocol “error” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/strea ms)
DEBUG: socket sent <?xml version='1.0'?>
<stream:stream xmlns=“jabber:client” to=“openfire” version=“1.0” xmlns:stream=“http://etherx.jabber.org/streams” >
DEBUG: bind start Plugging <xmpp.auth.Bind instance at 0x2b2335277518> into <xmpp.client.Client instance at 0x2b2 335264a28>
DEBUG: dispatcher info Registering handler <bound method Bind.FeaturesHandler of <xmpp.auth.Bind instance at 0x2b23352 77518>> for “features” type-> ns->(http://etherx.jabber.org/streams)
DEBUG: dispatcher warn Registering protocol “features” as <class ‘xmpp.protocol.Protocol’>(http://etherx.jabber.org/st reams)
DEBUG: socket got <?xml version='1.0' encoding='UTF-8'?>
<stream:stream xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client” from=“openfire” id=“6ba16506” xml: lang=“en” version=“1.0”>
stream:features

zlib



</stream:features>
DEBUG: dispatcher ok Got http://etherx.jabber.org/streams/features stanza
DEBUG: dispatcher ok Dispatching features stanza with type-> props->[u’[http://jabber.org/features/compress](http://jabber.org/features/compress)’, u’urn:i etf:params:xml:ns:xmpp-bind’, u’urn:ietf:params:xml:ns:xmpp-session’] id->None
DEBUG: socket sent

spark


DEBUG: dispatcher wait Waiting for ID:1 with timeout 25…
DEBUG: socket got

zabbix@openfire/spark


DEBUG: dispatcher ok Got jabber:client/iq stanza
DEBUG: dispatcher ok Dispatching iq stanza with type->result props->[u’urn:ietf:params:xml:ns:xmpp-bind’] id->1
DEBUG: dispatcher ok Expected stanza arrived!
DEBUG: bind ok Successfully bound zabbix@openfire/spark.
DEBUG: socket sent


DEBUG: dispatcher wait Waiting for ID:2 with timeout 25…
DEBUG: socket got


DEBUG: dispatcher ok Got jabber:client/iq stanza
DEBUG: dispatcher ok Dispatching iq stanza with type->result props->[u’urn:ietf:params:xml:ns:xmpp-session’] id->2
DEBUG: dispatcher ok Expected stanza arrived!
DEBUG: bind ok Successfully opened session.
authenticated using sasl
sent to sidrake@openfire
message sent
DEBUG: socket sent

wakeup sent message with id 3

I have also added the zabbix user to my spark so i see the user going on and off, but dont get any message, see below:

*** zabbix went offline at 10:55 AM
*** zabbix went offline at 10:57 AM
*** zabbix went offline at 11:00 AM
*** zabbix went offline at 11:06 AM
*** zabbix went offline at 11:07 AM
*** zabbix went offline at 11:08 AM
*** zabbix went offline at 11:17 AM
*** zabbix went offline at 11:18 AM
*** zabbix went offline at 11:18 AM
*** zabbix went offline at 11:19 AM
*** zabbix went offline at 11:39 AM

Anyone have any idea why I am not getting any messages ?

I dont get any errors in the openfire logs.

Thanks

Simon