7

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

enthusiastic
  • 1,702
  • 4
  • 19
  • 31

4 Answers4

4

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

j0k
  • 22,600
  • 28
  • 79
  • 90
James W
  • 41
  • 2
2

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'/>
Joe Hildebrand
  • 10,354
  • 2
  • 38
  • 48
1

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/
isapir
  • 21,295
  • 13
  • 115
  • 116
0

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

Luca
  • 9,259
  • 5
  • 46
  • 59
liuyork
  • 64
  • 3