Giter Club home page Giter Club logo

Comments (16)

sstrigler avatar sstrigler commented on September 6, 2024

if you could provide logs what's actually going across the wire that would make helping out here a lot easier please

from jsjac.

siteroller avatar siteroller commented on September 6, 2024

POST:

RESPONSE:

stream:featuresDIGEST-MD5PLAINANONYMOUSCRAM-MD5zlib/stream:features

POST:

RESPONSE:

cmVhbG09ImtyYW1lciIsbm9uY2U9IjZwTDRrMWVJdHpCb3BqSmZwdDdHeERIaUU5eUpwV0hBSDBSS1NPamYiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=

POST:

dXNlcm5hbWU9InNhbWdvb2R5QHRoZXJhcGlzdGV4cHJlc3MuY29tIixyZWFsbT0iNjYuMjI4LjM3LjE0Iixub25jZT0iNnBMNGsxZUl0ekJvcGpKZnB0N0d4REhpRTl5SnBXSEFIMFJLU09qZiIsY25vbmNlPSI0VTdwdEIxR0p0anMwaSIsbmM9IjAwMDAwMDAxIixxb3A9YXV0aCxkaWdlc3QtdXJpPSJ4bXBwLzY2LjIyOC4zNy4xNCIscmVzcG9uc2U9Ijg0N2M5OTQyZmE3ODg0ZjY1MjBjY2RiNjVlYTg3NzA1IixjaGFyc2V0PSJ1dGYtOCI=

RESPONSE:

POST:

RESPONSE:

from jsjac.

siteroller avatar siteroller commented on September 6, 2024

Hmm, looks like the markdown ate the code. If you can hit edit, you can see it.
Otherwise, I will post again in a minute, after trying to work out the view.

Thank you very much, both for the awesome work in the project, and for being so responsive.

from jsjac.

siteroller avatar siteroller commented on September 6, 2024
registered handler for event 'message'
registered handler for event 'presence'
registered handler for event 'iq'
registered handler for event 'onconnect'
registered handler for event 'onerror'
registered handler for event 'status_changed'
registered handler for event 'ondisconnect'
registered handler for event 'iq'
2
incoming event 'onstatuschanged'
incoming event 'status_changed'
handling event 'status_changed'
status changed: connecting
1: f2f8a7b2d07f20928fe346eb466ab682f625ec5d
2: c3ffb65cde44c669f72fbf961591d4ce96d697a9
3: c7928ffbecd225289538b3323f64696ccf1a8f19
4: 30ac3140186901d2eb0a8fa82317ba3a7e1193df
5: 29a2bd1b467cce88bb1cce61012d5e97229d361e
6: 4a8cd6ff46efe55a9fe35aeef2f223e330f32347
7: bde321333e1cd35aea0ab9fb53da92088b0f8c6f
8: b2c0dc6ca8fcbcb78d98ff2b25392d46e9e768e4
9: cac1c5e1212a761419bca25c4efad50185c09a17
10: e8f66fc160d1bcf4b7cb9fe0a3788005f97278aa
11: 334d3766db54564c32fca4ff06cb6244c9c403ba
12: 54aaa5e57e9afa16dbf3b27819ff0a7103f06b55
13: 63afe2eaad54bee1bfd0159a123d37f6aa0f5ecb
14: 9031b70c44ba9ae6b1a6fd5b497f66da64ecfa4f
15: 8e202d0bf3f82da438b2df20c16c3b4529aa1fc9
<body content='text/xml; charset=utf-8' hold='1' xmlns='http://jabber.org/protocol/httpbind' to='66.228.37.14' wait='300' rid='249948' newkey='8e202d0bf3f82da438b2df20c16c3b4529aa1fc9' xml:lang='en' ver='1.10' xmlns:xmpp='urn:xmpp:xbosh' xmpp:version='1.0'/>
POST http://66.228.37.14/http-bind/

200 OK
        330ms   
async recv: <body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" authid="8b025400" sid="8b025400" secure="true" requests="2" inactivity="30" polling="5" wait="300" hold="1" ack="249948" maxpause="300" ver="1.6"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features></body>

Date: Mon, 21 Oct 2013 20:46:42 GMT
Server: Jetty(7.x.y-SNAPSHOT)
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: PROPFIND, PROPPATCH, COPY, MOVE, DELETE, MKCOL, LOCK, UNLOCK, PUT, GETLIB, VERSION-CONTROL, CHECKIN, CHECKOUT, UNCHECKOUT, REPORT, UPDATE, CANCELUPLOAD, HEAD, OPTIONS, GET, POST
Access-Control-Allow-Headers: Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control
Access-Control-Max-Age: 86400
Content-Type: text/xml;charset=UTF-8
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 341
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" authid="8b025400" sid="8b025400" secure="true" requests="2" inactivity="30" polling="5" wait="300" hold="1" ack="249948" maxpause="300" ver="1.6"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features></body>
got sid: 8b025400
set hold to 1
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" authid="8b025400" sid="8b025400" secure="true" requests="2" inactivity="30" polling="5" wait="300" hold="1" ack="249948" maxpause="300" ver="1.6"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features></body>
got streamid: 8b025400
SASL detected
SASL using mechanism 'DIGEST-MD5'
Found working slot at 0
sending: <body rid='249949' sid='8b025400' xmlns='http://jabber.org/protocol/httpbind' key='9031b70c44ba9ae6b1a6fd5b497f66da64ecfa4f' ><auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/></body>
POST http://66.228.37.14/http-bind/

200 OK
        168ms   
HeadersPostResponseXMLCookies

<body xmlns='http://jabber.org/protocol/httpbind'><challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09ImtyYW1lciIsbm9uY2U9IjZwTDRrMWVJdHpCb3BqSmZwdDdHeERIaUU5eUpwV0hBSDBSS1NPamYiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge></body>

async recv: <body xmlns='http://jabber.org/protocol/httpbind'><challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09ImtyYW1lciIsbm9uY2U9IjZwTDRrMWVJdHpCb3BqSmZwdDdHeERIaUU5eUpwV0hBSDBSS1NPamYiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge></body>
got challenge: realm="kramer",nonce="6pL4k1eItzBopjJfpt7GxDHiE9yJpWHAH0RKSOjf",qop="auth",charset=utf-8,algorithm=md5-sess
nonce: 6pL4k1eItzBopjJfpt7GxDHiE9yJpWHAH0RKSOjf
response: username="[email protected]",realm="66.228.37.14",nonce="6pL4k1eItzBopjJfpt7GxDHiE9yJpWHAH0RKSOjf",cnonce="4U7ptB1GJtjs0i",nc="00000001",qop=auth,digest-uri="xmpp/66.228.37.14",response="847c9942fa7884f6520ccdb65ea87705",charset="utf-8"
Found working slot at 0
sending: <body rid='249950' sid='8b025400' xmlns='http://jabber.org/protocol/httpbind' key='63afe2eaad54bee1bfd0159a123d37f6aa0f5ecb' ><response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9InNhbWdvb2R5QHRoZXJhcGlzdGV4cHJlc3MuY29tIixyZWFsbT0iNjYuMjI4LjM3LjE0Iixub25jZT0iNnBMNGsxZUl0ekJvcGpKZnB0N0d4REhpRTl5SnBXSEFIMFJLU09qZiIsY25vbmNlPSI0VTdwdEIxR0p0anMwaSIsbmM9IjAwMDAwMDAxIixxb3A9YXV0aCxkaWdlc3QtdXJpPSJ4bXBwLzY2LjIyOC4zNy4xNCIscmVzcG9uc2U9Ijg0N2M5OTQyZmE3ODg0ZjY1MjBjY2RiNjVlYTg3NzA1IixjaGFyc2V0PSJ1dGYtOCI=</response></body>
POST http://66.228.37.14/http-bind/

200 OK
        171ms   
incoming event 'onstatuschanged'
incoming event 'status_changed'
handling event 'status_changed'
status changed: processing
scheduling next poll in 100 msec
all slots busy, standby ...
async recv: <body xmlns='http://jabber.org/protocol/httpbind'><failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure></body>
auth error: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>


console.error(msg);

incoming event 'onerror'
handling event 'onerror'
incoming event 'onstatuschanged'
incoming event 'status_changed'
handling event 'status_changed'
status changed: disconnecting
Disconnecting: <body rid='249951' sid='8b025400' xmlns='http://jabber.org/protocol/httpbind' key='54aaa5e57e9afa16dbf3b27819ff0a7103f06b55' type='terminate'> </body>
POST http://66.228.37.14/http-bind/

200 OK
        165ms   
disconnected
incoming event 'ondisconnect'
handling event 'ondisconnect'
incoming event 'onstatuschanged'
incoming event 'status_changed'
handling event 'status_changed'
status changed: processing
scheduling next poll in 100 msec
Connection lost ...

from jsjac.

rraptorr avatar rraptorr commented on September 6, 2024

XMPP authentication works in a way that requires you to send proper domain name, that is configured on your server, even if your server is at different IP. So to connect properly, you must configure both the domain (used during the authentication) and the IP (used when connecting).

So in order for authentication to work you must still provide a valid domain to JSJaC connect method (using 'domain' parameter). JSJaC will use 'domain' parameter for authentication but obviously will still connect to whatever you provide in 'httpbase', which can be completely different.

from jsjac.

siteroller avatar siteroller commented on September 6, 2024

In this case, the user is samgoody, the domain is therapistexpress.com [which I maintain, but is not on the same server], and the Jabber Server is at 66.228.37.14/

I tried setting this in simpleclient, first by using the form, then by hard-coding it into the page. The results were the same. I could repost the response, or could you suggest how I can be sure that I am sending everything correctly?

Also, you can IM me or email using the gmail (my username at gmail)

from jsjac.

rraptorr avatar rraptorr commented on September 6, 2024

Sorry, but I don't see how using private communication would help anybody, and it won't be visible for others.

Given above information, you should set HTTP base in example client as http://66.228.37.14/http-bind/ (you can also use relative URL), Jabber server as 'therapistexpress.com' and username as 'samgoody' (without the domain here).

from jsjac.

siteroller avatar siteroller commented on September 6, 2024

That's the settings I used. Am getting the same 401.
And agreed, public is better, but you should have the option of chatting if you felt it more productive [I recognize that helping noobs like myself does take time.]

The first post is:

<body content='text/xml; charset=utf-8' hold='1' xmlns='http://jabber.org/protocol/httpbind' to='therapistexpress.com' wait='300' rid='587979' newkey='ef28465e0947819f30eff27ee2a91e2ec0db22ee' xml:lang='en' ver='1.10' xmlns:xmpp='urn:xmpp:xbosh' xmpp:version='1.0'/>

I don't know what the "to" field is [the domain or the real server], but is it correct? Should I post the whole output again?

from jsjac.

siteroller avatar siteroller commented on September 6, 2024

Or even better - here's the URL, you already have the settings. [The password, for testing, is 1234]:
http://66.228.37.14/jsjac/examples/simpleclient.html

from jsjac.

rraptorr avatar rraptorr commented on September 6, 2024

Sorry, one more time I've considered 'Close' as a 'Cancel' button;) Will try to connect to your server to see what is happenning.

from jsjac.

rraptorr avatar rraptorr commented on September 6, 2024

I am sorry, but it seems that there is some problem with your server configuration. Your server advertises several authentication methods, including DIGEST-MD5 which is being chosen by JSJaC. It seems that while it works with normal XMPP connections (on port 5222, this is used by Adium) it does not work with BOSH. There is nothing that should prevent DIGEST-MD5 to work with BOSH (I've just verified that DIGEST-MD5 works properly on JSJaC with an ejabberd server). Also, I've used Pidgin to test your server (Pidgin also support BOSH). It connects successfully on port 5222, but it also fails when using BOSH (it is able to connect because Pidgin will try different authentication methods from the list while JSJaC will just stop).

I believe you have following options:

  • fix your server configuration so that DIGEST-MD5 works on BOSH
  • disable DIGEST-MD5 completely and let JSJaC use PLAIN authentication method (that one works properly); please remember that PLAIN is insecure unless used with SSL

from jsjac.

siteroller avatar siteroller commented on September 6, 2024

Thanks for responding, but can you be a bit more descriptive?

fix your server configuration so that DIGEST-MD5 works on BOSH
Is that a OpenFire issue, or something that I am likely to have misconfigured (I installed Openfire by unzipping, opening in a browser, and clicking next....)

I opened OpenFire and started looking for wherever DIGEST-MD5 is configured.
Along the way, I found in Server Settings -> HTTP Bind Settings -> Script Syntax -> "Allows BOSH clients with limited access to connect to the server". Changed that to enabled and tested - got a 500 internal err instead of an auth error. Does that help?
I put it back, but it still is throwing 500 errs, so things are far worse now.

disable DIGEST-MD5
I'll do this if when I figure out how.

Thanks for your help

from jsjac.

rraptorr avatar rraptorr commented on September 6, 2024

I have really no idea, I've never used OpenFire. The fact is that DIGEST-MD5 works on 5222 port and does not work on BOSH. This was tested on JSJaC and Pidgin, so it hardly seems like a JSJaC problem.

from jsjac.

siteroller avatar siteroller commented on September 6, 2024

Not sure if that is what solved it, since I (1) used makefile instead of just linking to src/JSJaC.js and (2) have also been playing with the settings in OpenFire, but I pulled your last changes, and now JSJaC connects beautifully.

Thank you for the amazing project, and extraordinary support and attention to detail.

from jsjac.

rraptorr avatar rraptorr commented on September 6, 2024

The changes have nothing to do with this issue, I've made them when investigating your issue, but they did not help. I've pushed them only to align JSJaC with RFC;)

from jsjac.

ebuildy avatar ebuildy commented on September 6, 2024

Check your OpenFire setup, the domain name you enter for OpenFire must match the machine domain name.

from jsjac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.