lhost / sendxmpp

perl-script to send xmpp (jabber), similar to what mail(1) does for mail.
64 stars 22 forks source link

spark openfire "user went offline at xx:xx am/pm" #22

Closed aurepito closed 8 years ago

aurepito commented 8 years ago

Hi everyone !

When I send :

echo "hello" | sendxmpp admin@192.168.xxx.xxx

I recieve on Spark XMPP Client : *** user went offline at xx:xx am/pm

And I don't recieve hello

Someone can help ? Thx.

lhost commented 8 years ago

Which version of sendxmpp are you using? Did you try sendxmpp --debug ?

aurepito commented 8 years ago

I have version 1.24

Debug :

sendxmpp: config: 'jserver' => '192.168.xxx.xxx'
sendxmpp: config: 'port' => '5222'
sendxmpp: config: 'password' => '*******'
sendxmpp: config: 'username' => 'server'
XML::Stream: new: hostname= (openfire-test)
XML::Stream: SetCallBacks: tag(node) func(CODE(0x26ad720))
XMPP::Conn: xmppCallbackInit: start
XMPP::Conn: SetCallBacks: tag(message) func(CODE(0x26d1158))
XMPP::Conn: SetCallBacks: tag(presence) func(CODE(0x16ea6d0))
XMPP::Conn: SetCallBacks: tag(iq) func(CODE(0x16ea778))
XMPP::Conn: SetPresenceCallBacks: type(unsubscribed) func(CODE(0x26d0bb8))
XMPP::Conn: SetPresenceCallBacks: type(subscribed) func(CODE(0x16e10a0))
XMPP::Conn: SetPresenceCallBacks: type(unsuscribe) func(CODE(0x265e400))
XMPP::Conn: SetPresenceCallBacks: type(subscribe) func(CODE(0x16ea6b8))
XMPP::Conn: SetDirectXPathCallBacks: xpath(/@xmlns="urn:ietf:params:xml:ns:xmpp-tls"]) func(CODE(0x16ea880))
XMPP::Conn: SetDirectXPathCallBacks: xpath(/@xmlns="urn:ietf:params:xml:ns:xmpp-sasl"]) func(CODE(0x265e1d8))
XMPP::Conn: xmppCallbackInit: stop
sendxmpp: ssl_verify: 1
sendxmpp: tls_ca_path:
XMPP::Conn: Connect: host(192.168.xxx.xxx:5222) namespace(jabber:client)
XMPP::Conn: Connect: timeout(10)
XML::Stream: Connect: type(tcpip)
XML::Stream: Connect: Got a connection
XML::Stream: Send: (<?xml version='1.0'?><stream:stream version='1.0' xmlns:stream='http://etherx/jabber.org/streams' xmlns='jabber:client' to='192.168.xxx.xxx' from='openfire-test' xml:lang='en' >)
XML::Stream: Read: buff(<?xml version ='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns='jabber:client' from="openfire-test" id="xxxxxxxxxx" xml:lang='en'' version="1.0"><stream:features><starttls cmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanism></mechanism><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features>)
XMPP::Conn: Connect: connection made
XML::Stream: SetCallBacks: tag(node) func(CODE(0x16eaa48))
sendxmpp: Connect: 1
XMPP::Conn: AuthIQAuth: old school auth
XMPP::Conn: SendAndReveiveWithID: object(Net::XMPP::IQ=HASH(0x16eb000))
XMPP::Conn: SendWithID: id(net-jabber-0)
XMPP::Conn: SendWithID: in(<iq type='get'><query xmlns='jabber:iq:auth'><username>server</username></query></iq>)
XMPP::Conn: RegisterID: tag(iq) id(netjabber-0)
XMPP::Conn: SendWithID: out(<iq id='netjabber-0' type='get'><query xmlns='jabber:iq:auth'><username>server</username></query></iq>)
XMPP::Conn: SendXML: sent(<iq id='netjabber-0' type='get'><query xmlns='jabber:iq:auth'><username>server</username></query></iq>)
XMPP::Conn: Send: (<iq id='netjabber-0' type='get'><query xmlns='jabber:iq:auth'><username>server</username></query></iq>)
XMPP::Conn: SendAndReceiveWithID: sent with id(netjabber-0)
XMPP::Conn: WaitForID: id(netjabber-0)
XMPP::Conn: ReceivedID: id(netjabber-0)
XMPP::Conn: ReceivedID: nope...
XMPP::Conn: WaitForID: haven't gotten it yet... let's wait for more packets
XMPP::Conn: Process: timeout(1)
XML::Stream: Read: buff(<iq type="result" id="netjabber-0"><query xmlns="jabber:iq:auth""><username>server</username><password/><resource/></query></iq>
XMPP::Conn: CallBack: sid(xxxxxxxxxx) received(<iq id='netjabber-0' type='result'><query xmlns='jabber:iq:auth'><username>server</username><password/><resource/></query></iq>)
XMPP::Conn: CallBack: tag(iq)
XMPP::Conn: CallBack: id(netjabber-0)
XMPP::Conn: CallBack: we either want it or were waiting for it.
XMPP::Conn: CallBack: check directxpath
XMPP::Conn: CallBack: check directxpath(/@xmlns="urn:ietf:params:xml:ns:xmpp-sasl"])
XMPP::Conn: CallBack: check directxpath(/@xmlns="urn:ietf:params:xml:ns:xmpp-tls"])
XMPP::Conn: BuildObject: tag(iq) package(Net::XMPP::IQ)
XMPP::Conn: CheckID: tag(iq) id(netjabber-0)
XMPP::Conn: CheckID: we have that here somewhere...
XMPP::Conn: CallBack: found registry entry: tag(iq) id(netjabber-0)
XMPP::Conn: DeregisterID: tag(iq) id(netjabber-0)
XMPP::Conn: CallBack: they still want it... we still got it...
XMPP::Conn: GotID: id'netjabber-0) xml(<iq id='netjabber-0' type='result'><query xmlns='jabber:iq:auth'><username>server</username><password/><resource/></query></iq>)
XMPP::Conn: ReceivedID: id(netjabber-0)
XMPP::Conn: ReceivedID: id(netjabber-0)
XMPP::Conn: WaitForID: we got it!
XMPP::Conn: GetID: id(netjabber-0)
XMPP::Conn: ReceivedID: id(netjabber-0)
XMPP::Conn: CleanID: id(netjabber-0)
XMPP::Conn: AuthIQAuth: authType(plain)
XMPP::Conn: SendAndReceiveWithID: object(Net::XMPP:IQ=HASH(0x26f5400))
XMPP::Conn: SendWithID: id(netjabber-1)
XMPP::Conn: SendWithID: in(<iq id='netjabber-1' type='set'><query xmlns='jabber:iq:auth'><password>******</password><resource>sendxmpp</resource><username>server</username></query></iq>)
XMPP::Conn: RegisterID: tag(iq) id(netjabber-1)
XMPP::Conn: SendWithID: out(<iq id='netjabber-1' type='set'><query xmlns='jabber:iq:auth'><password>******</password><resource>sendxmpp</resource><username>server</username></query></iq>)
XMPP::Conn: SendXML: sent(<iq id='netjabber-1' type='set'><query xmlns='jabber:iq:auth'><password>******</password><resource>sendxmpp</resource><username>server</username></query></iq>)
XML::Stream: Send: (<iq id='netjabber-1' type='set'><query xmlns='jabber:iq:auth'><password>******</password><resource>sendxmpp</resource><username>server</username></query></iq>)
XMPP::Conn: SendAndReceiveWithID: sent with id(netjabber-1)
XMPP::Conn: WaitForID: id(netjabber-1)
XMPP::Conn: ReceivedID: id(netjabber-1)
XMPP::Conn: ReceivedID: nope...
XMPP::Conn: WaitForID: haven't gotten it yet... let's wait for more packets
XMPP::Conn: Process: timeout(1)
XML::Stream: Read: buff(<iq type="result" id="netjabber-1" to="server@openfire-test/sendxmpp"/>
XMPP::Conn: CallBack: sid(xxxxxxxxxx) received(<iq id="netjabber-1" to="server@openfire-test/sendxmpp" type='result'/>)
XMPP::Conn: CallBack: tag(iq)
XMPP::Conn: CallBack: id(netjabber-1)
XMPP::Conn: CallBack: we either want it or were waiting for it.
XMPP::Conn: CallBack: check directxpath
XMPP::Conn: CallBack: check directxpath(/@xmlns="urn:ietf:params:xml:ns:xmpp-sasl"])
XMPP::Conn: CallBack: check directxpath(/@xmlns="urn:ietf:params:xml:ns:xmpp-tls"])
XMPP::Conn: BuildObject: tag(iq) package(Net::XMPP::IQ)
XMPP::Conn: CheckID: tag(iq) id(netjabber-1)
XMPP::Conn: CheckID: we have that here somewhere...
XMPP::Conn: CallBack: found registry entry: tag(iq) id(netjabber-1)
XMPP::Conn: DeregisterID: tag(iq) id(netjabber-1)
XMPP::Conn: CallBack: they still want it... we still got it...
XMPP::Conn: GotID: id(netjabber-1) xml(<iq id='netjabber-1' to='server@openfire-test/sendxmpp' type='result'/>
XMPP::Conn: ReceivedID: id(netjabber-1)
XMPP::Conn: ReceivedID: id(netjabber-1)
XMPP::Conn: WaitForID: we got it!
XMPP::Conn: GetID: id(netjabber-1)
XMPP::Conn: ReceivedID: id(netjabber-1)
XMPP::Conn: CleanID: id(netjabber-1)
XMPP::Conn: AuthIQAuth: we authed!
sendxmpp: AuthSend: ok
XMPP::Conn: SendXML: sent(<message to='admin@192.168.201.236' type='chat'><body>hello</body><subject></subject></message>)
sendxmpp: MessageSend
XML::Stream: Send: (</stream:stream>)
XML::Stream: SetCallBacks: tag(node) func(CODE(0x26e28a0))
XMPP::Conn: Disconnect: bye bye
sendxmpp: Disconnect
aurepito commented 8 years ago

Actually I find it !

I'm connected with 'server' on '192.168.201.236' alias 'openfire-test'.

The XML stream take the alias 'openfire-test', so 'server@openfire-test'

To talk with another buddy, you have to send to 'user@openfire-test' and nit 'user@192.168.201.236'