Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bosh Set up using openfire

Tags:

xmpp

openfire

I am using openfire in windows to set up bosh connection manager...the installation is successfull but wen i give the url http://localhost:9090/bosh it says

HTTP ERROR: 404

NOT_FOUND RequestURI=/http-bind/

Powered by Jetty://

tried http://localhost:9090/http-bind/ gives the same error

can anyone pls tel me wat s happening... how do i troubleshoot Thanks

like image 597
enthusiastic Avatar asked Feb 21 '11 11:02

enthusiastic


3 Answers

Try setting the port to 7070 I believe that's the default BOSH port for Openfire. Go to the Admin consol and check out http binding (what bosh does is bind the xmpp protocol to a http request response model.... basically)

http://127.0.0.1:9090/http-bind.jsp

Edit: Actually what do you mean by "give the url"? are you putting that into the browser? The admin consol url is http://127.0.0.1:9090/index.jsp

like image 141
James W Avatar answered Nov 12 '22 13:11

James W


Try using POST rather than GET containing a <body/> element, as specified in XEP-0206:

POST /bosh HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: 275

<body content='text/xml; charset=utf-8'
      from='user@localhost'
      hold='1'
      rid='1573741820'
      to='localhost'
      wait='60'
      xml:lang='en'
      xmpp:version='1.0'
      xmlns='http://jabber.org/protocol/httpbind'
      xmlns:xmpp='urn:xmpp:xbosh'/>
like image 28
Joe Hildebrand Avatar answered Nov 12 '22 15:11

Joe Hildebrand


The BOSH request requires a BODY.

If your HTTP Bind Settings do not allow for Script Syntax then you will get a 404 error for a GET request. If you enable Script Syntax, i.e. Allows BOSH clients with limited access to connect to the server, then you will get a 400 error for a GET request, so you will at least know that Jetty is listening on that port.

enter image description here

To send a valid request you should make a POST request with a body, e.g. with cURL you can run (line breaks added for clarity):

curl -X POST -d "<body content='text/xml; charset=utf-8' 
    from='user@localhost' 
    hold='1' 
    rid='1573741820' 
    to='localhost' 
    wait='60' 
    xml:lang='en' 
    xmpp:version='1.0' 
    xmlns='http://jabber.org/protocol/httpbind' xmlns:xmpp='urn:xmpp:xbosh'/>" 
        http://desktop-nquceg9:7070/http-bind/
like image 1
isapir Avatar answered Nov 12 '22 15:11

isapir