7
votes

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

4

4 Answers

4
votes

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

2
votes

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'/>
1
votes

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/
0
votes

Try to set Script Syntax to Enable at http://127.0.0.1:9090/http-bind.jsp