The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

lkaltz (2) [Avatar] Offline
#1
Hello,

I am trying to open a stream. I connect to the server on port 5222 no problem. The problem is when I send over the stream request nothing happens. If I send it over the request a second time the server responds with the correct response but also closes the stream. Why do I have to send over the request twice before the server responds? Here the conversation(Client: / Server: Tags are added for readability):

Client: <?xml version='1.0'?><stream:stream to='129.204.212.11' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
Client: <?xml version='1.0'?><stream:stream to='129.204.212.11' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
Server: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="mtngt2rfl.motown.lmco.com" id="9a9d6eb3" xml:lang="en"></stream:stream>

Thank you for any help,

Lou Kaltz
lkaltz (2) [Avatar] Offline
#2
Re: Problem Opening stream
It works fine in telnet not using java sockets. I think it may have something to do with null characters but I am not sure. The server doesn't respond until I send the second xml string.
Ronen (1) [Avatar] Offline
#3
Re: Problem Opening stream
EDIT:

My post read:

'Hi, off the top of my head, XMPP requires version='1.0' attribute in the stream:stream element. ejabberd was just ignoring me without it. That might explain the strange behaviour.'

But this is utterly untrue.

Message was edited by:
Ronen