Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node-xmpp-bosh - Do I need any other XMPP for user auth #47

Open
hzzg6y opened this issue Aug 25, 2012 · 7 comments
Open

Node-xmpp-bosh - Do I need any other XMPP for user auth #47

hzzg6y opened this issue Aug 25, 2012 · 7 comments

Comments

@hzzg6y
Copy link

hzzg6y commented Aug 25, 2012

I was able to successfully compile node-xmpp-bosh

npm version is 1.1.21
node version is 0.6.18
node-xmpp-bosh is 0.6.1 with package.json "log4js": "= 0.4.2"

Do I need Prosody or openfire when I have node-xmpp-bosh up & running. As I need to have user authentication who will access the Jappix Mini.

If your answer is yes for above question, I am using prosody which uses 5280... how should I configure both so that jappix mini <---> node-xmpp-bosh <----> prosody / Openfire. Please provide some more details here. I have both node-xmpp-bosh & prosody or openfire on same server. Here Jappix mini code is on my websites otherservers.

Node-xmpp-bosh works fine on IE9, Firefox & chrome [ shows message text as Bidirectional-streams Over Synchronous HTTP ] however on IE7 it gives message as getting file information when I type http://url:5280/http-bind

Thanks

@dhruvbird
Copy link
Collaborator

You don't need to setup prosody on the same (5280) port. In fact, you should disable any inbuilt bosh support in any of the xmpp servers you are using. NXB will let users connect to any xmpp server through it (it is a essentially an http proxy that allows xmpp access via http).

You do however need to have prosody/openfire/ejebberd (any one of them) running if you want to authenticate users on your own domain.

Can you post the exact error you get on IE7?

@hzzg6y
Copy link
Author

hzzg6y commented Aug 27, 2012

Now I getting below message as below on Centos unix console..
[root@www init.d]# [2012-08-27 13:04:17.726] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" content="text/xml; charset=utf-8" hold="1" xmlns="http://jabber.org/protocol/httpbind" to="example.com" wait="20" rid="110863" secure="true" newkey="6f631cd5fbfda04d4deb6725d196afba4ee885fe" ver="1.6" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0"/>
[2012-08-27 13:04:17.730] [DEBUG] [response.js] - 0236466b-8a78-494a-9d0d-8ac6cc6f69ea SENT(110863): <body xmlns="http://jabber.org/protocol/httpbind" stream="eb82d07f-23cd-494a-8cea-5d693bc5d88f" sid="0236466b-8a78-494a-9d0d-8ac6cc6f69ea" wait="20" ver="1.6" polling="35" inactivity="70" requests="2" hold="1" from="example.com" content="text/xml; charset=utf-8" xmpp:restartlogic="true" xmlns:xmpp="urn:xmpp:xbosh" window="2"/>
[2012-08-27 13:04:18.444] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="110864" sid="0236466b-8a78-494a-9d0d-8ac6cc6f69ea" xmlns="http://jabber.org/protocol/httpbind" key="63d12bb1635d9eb46dd199fe57149ab1995199b6"/>
[2012-08-27 13:04:38.446] [DEBUG] [response.js] - 0236466b-8a78-494a-9d0d-8ac6cc6f69ea SENT(110864): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-08-27 13:04:39.367] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="110865" sid="0236466b-8a78-494a-9d0d-8ac6cc6f69ea" xmlns="http://jabber.org/protocol/httpbind" key="0d25eb49c205c1560afbc894fdee2488c7b0fcbf"/>
[2012-08-27 13:04:59.370] [DEBUG] [response.js] - 0236466b-8a78-494a-9d0d-8ac6cc6f69ea SENT(110865): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-08-27 13:05:00.020] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="110866" sid="0236466b-8a78-494a-9d0d-8ac6cc6f69ea" xmlns="http://jabber.org/protocol/httpbind" key="68dccda5f8ded34c4dd30a0032a886f7cef375b9"/>ex
[2012-08-27 13:05:20.023] [DEBUG] [response.js] - 0236466b-8a78-494a-9d0d-8ac6cc6f69ea SENT(110866): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-08-27 13:05:20.699] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="110867" sid="0236466b-8a78-494a-9d0d-8ac6cc6f69ea" xmlns="http://jabber.org/protocol/httpbind" key="e8383c35a318fd363e72ee4d0327d43122cc5242"/>
[2012-08-27 13:05:40.700] [DEBUG] [response.js] - 0236466b-8a78-494a-9d0d-8ac6cc6f69ea SENT(110867): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-08-27 13:05:41.356] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="110868" sid="0236466b-8a78-494a-9d0d-8ac6cc6f69ea" xmlns="http://jabber.org/protocol/httpbind" key="577abf687f42c9af1cc70303d168d41fc0c5bf94"/>

[2012-08-27 13:32:52.557] [DEBUG] [response.js] - d5413499-1f26-44fb-bce6-8fec2e896096 SENT(706434): <body xmlns="http://jabber.org/protocol/httpbind" stream="4fe3c0ce-6be0-4ea7-b075-664fac088054" sid="d5413499-1f26-44fb-bce6-8fec2e896096" wait="20" ver="1.6" polling="35" inactivity="70" requests="2" hold="1" from="example.com" content="text/xml; charset=utf-8" xmpp:restartlogic="true" xmlns:xmpp="urn:xmpp:xbosh" window="2"/>
[2012-08-27 13:32:52.878] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="706435" sid="d5413499-1f26-44fb-bce6-8fec2e896096" xmlns="http://jabber.org/protocol/httpbind" key="41ec05c1a143b4f33e4101f8be94ffdce5e11845"/>
[2012-08-27 13:33:12.879] [DEBUG] [response.js] - d5413499-1f26-44fb-bce6-8fec2e896096 SENT(706435): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-08-27 13:33:13.647] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="706436" sid="d5413499-1f26-44fb-bce6-8fec2e896096" xmlns="http://jabber.org/protocol/httpbind" key="eb08699257944631c2c35388106eee41af236c42"/>
[2012-08-27 13:33:33.649] [DEBUG] [response.js] - d5413499-1f26-44fb-bce6-8fec2e896096 SENT(706436): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-08-27 13:33:34.788] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="706437" sid="d5413499-1f26-44fb-bce6-8fec2e896096" xmlns="http://jabber.org/protocol/httpbind" key="b2019418bf2c84a4381a2b03cfd09e07205e51ea"/>
[2012-08-27 13:33:54.790] [DEBUG] [response.js] - d5413499-1f26-44fb-bce6-8fec2e896096 SENT(706437): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-08-27 13:33:55.417] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="706438" sid="d5413499-1f26-44fb-bce6-8fec2e896096" xmlns="http://jabber.org/protocol/httpbind" key="a7666b128b16da6e5bc01486e00958dd2a701647"/>
[2012-08-27 13:34:15.418] [DEBUG] [response.js] - d5413499-1f26-44fb-bce6-8fec2e896096 SENT(706438): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-08-27 13:34:16.114] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="706439" sid="d5413499-1f26-44fb-bce6-8fec2e896096" xmlns="http://jabber.org/protocol/httpbind" key="d992ab953ae66bfbfd96d57dfb38e27ac127cc04"/>
[2012-08-27 13:34:36.115] [DEBUG] [response.js] - d5413499-1f26-44fb-bce6-8fec2e896096 SENT(706439): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-08-27 13:34:36.800] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="706440" sid="d5413499-1f26-44fb-bce6-8fec2e896096" xmlns="http://jabber.org/protocol/httpbind" key="58c2f8ffff49f084682fdeb08066aebc45d51b0c"/>

@dhruvbird
Copy link
Collaborator

Yes, this means that the BOSH connectivity with the client & the xmpp server seems to be working. I have no idea what the "key" and "newkey" parameters are - they are probably some custom attributes that the client is sending the xmpp server. They will most likely remain uninterpreted.

@hzzg6y
Copy link
Author

hzzg6y commented Sep 3, 2012

Hello Dhruv,

Thanks a lot for your quick response & hard work you are doing for node-xmpp-bosh. Keep it up.

  1. How to catch the error message from node-xmpp-bosh. via Log4js - I am not sure on path ?
  2. I have install node-xmpp-bosh on Linux CentOS6.2 VPS & want to use Jappix Mini. It is not connecting no matter what I do on any browsers.

node -v0.6.18
npm -v1.1.59
npm-xmpp-bosh -v0.6.1

How to I update my npm-xmpp-bosh to latest version. Current npm-xmpp-bosh is update via NPM tool. You could see I have latest NPM version.

  1. Please review both the below threads..

jappix/jappix#142 - Here Vanorayon told that YOu have fixed JSON GET fix. ( 3 days ago )

jappix/jappix#136 - Please review this thread where Vanorayon has mentioned that there is bug in JSON GET fix. ( 6 days ago )

  1. On Jappix Mini, it is just coming to "Please wait" state & then do not move forward.
  2. I am fine to share with you the URL & root access if you can spare some time on this.

Rgds

@dhruvbird
Copy link
Collaborator

All errors will be sent to standard output and standard error on the terminal on which you are running. You can redirect them to files if you wish.

You will probably need to setup Jappix Mini and point it (the host) to the correct BOSH server. First try with the default Jappix BOSH server at jappix.org and then try using your own.

As far as we know, there is no issue with the GET handler on current master. Vanaryon reported a few bugs, which to the best of my knowledge were fixed, and there aren't any open issues in that department. If you are willing to wait for a couple of days, you can download v0.6.2, which is (the current master) being tested.

@hzzg6y
Copy link
Author

hzzg6y commented Sep 6, 2012

Jappix mini still not working node-xmpp-bosh.I have downloaded the latest ZIP file for node-xmpp-bosh & tried on all
IE7, Firefox & Chrome.

node - v0.6.18
npm - 1.1.59
node-xmpp-bosh 0.6.2

I have run node-xmpp-bosh as

#nohup node ./run-server.js &

You can check my website www.chandancollection.com having node-xmpp-bosh server. If required, I will share the root access.

+----------------------------------------------------------------------------------------------------------------+
| Starting BOSH server 'v0.6.2' on 'http://0.0.0.0:5280/http-bind/&#39; at 'Thu Sep 06 2012 16:57:35 GMT+0000 (UTC)' |
+----------------------------------------------------------------------------------------------------------------+
+-------------------------------------------------------------------------------------------------------+
| Starting WEBSOCKET server 'v0.6.2' on ws://0.0.0.0:5280' at 'Thu Sep 06 2012 16:57:35 GMT+0000 (UTC)' |
+-------------------------------------------------------------------------------------------------------+
[2012-09-06 16:58:05.471] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" content="text/xml; charset=utf-8" hold="1" xmlns="http://jabber.org/protocol/httpbind" to="chandancollection.com" wait="20" rid="232271" secure="true" newkey="c2bc54aa4fc27b4f875310198b612ed61a285847" ver="1.6" xmlns:xmpp="urn:xmpp:xbos... [23 more characters]
[2012-09-06 16:58:05.475] [DEBUG] [response.js] - 191de04e-a2b2-49df-8c3c-d00b336d482b SENT(232271): <body xmlns="http://jabber.org/protocol/httpbind" stream="b2f3a4f4-7040-4886-9edb-1345c2acf60f" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" wait="20" ver="1.6" polling="35" inactivity="70" requests="2" hold="1" from="chandancollection.com" content="text/xml... [82 more characters]
[2012-09-06 16:58:05.800] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="232272" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" xmlns="http://jabber.org/protocol/httpbind" key="3a2eaced66efc29b48f954823fecd933c08b8fea"/>
[2012-09-06 16:58:25.803] [DEBUG] [response.js] - 191de04e-a2b2-49df-8c3c-d00b336d482b SENT(232272): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 16:58:26.127] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="232273" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" xmlns="http://jabber.org/protocol/httpbind" key="48fda864f16a4e5a4125e61ef8f797c65b3b6880"/>
[2012-09-06 16:58:38.033] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" content="text/xml; charset=utf-8" hold="1" xmlns="http://jabber.org/protocol/httpbind" to="chandancollection.com" wait="20" rid="277194" secure="true" newkey="a4525a3a575d12e082b32efbf0b2d00d8c31fc92" ver="1.6" xmlns:xmpp="urn:xmpp:xbos... [23 more characters]
[2012-09-06 16:58:38.036] [DEBUG] [response.js] - e209a9ec-b399-4c2a-97b9-d8159fadd264 SENT(277194): <body xmlns="http://jabber.org/protocol/httpbind" stream="0d065c17-7adf-43b0-957c-33417845866c" sid="e209a9ec-b399-4c2a-97b9-d8159fadd264" wait="20" ver="1.6" polling="35" inactivity="70" requests="2" hold="1" from="chandancollection.com" content="text/xml... [82 more characters]
[2012-09-06 16:58:38.745] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="277195" sid="e209a9ec-b399-4c2a-97b9-d8159fadd264" xmlns="http://jabber.org/protocol/httpbind" key="29cda755b0ff736857fa046ade4a1da165f7d034"/>
[2012-09-06 16:58:46.132] [DEBUG] [response.js] - 191de04e-a2b2-49df-8c3c-d00b336d482b SENT(232273): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 16:58:46.767] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="232274" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" xmlns="http://jabber.org/protocol/httpbind" key="a721340c31c5435b5caf4804a433fd5763730c46"/>
[2012-09-06 16:58:58.749] [DEBUG] [response.js] - e209a9ec-b399-4c2a-97b9-d8159fadd264 SENT(277195): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 16:58:59.434] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="277196" sid="e209a9ec-b399-4c2a-97b9-d8159fadd264" xmlns="http://jabber.org/protocol/httpbind" key="36e7f94ff4512eb7c1085359678107357b463b44"/>
[2012-09-06 16:59:06.769] [DEBUG] [response.js] - 191de04e-a2b2-49df-8c3c-d00b336d482b SENT(232274): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 16:59:07.399] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="232275" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" xmlns="http://jabber.org/protocol/httpbind" key="2bd94811c7a0dd076b19c7122fef51347398d0b4"/>
[2012-09-06 16:59:19.438] [DEBUG] [response.js] - e209a9ec-b399-4c2a-97b9-d8159fadd264 SENT(277196): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 16:59:20.119] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="277197" sid="e209a9ec-b399-4c2a-97b9-d8159fadd264" xmlns="http://jabber.org/protocol/httpbind" key="584a028dd1d2b7258ee8128dc8fc8553c67ab875"/>
[2012-09-06 16:59:27.402] [DEBUG] [response.js] - 191de04e-a2b2-49df-8c3c-d00b336d482b SENT(232275): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 16:59:28.104] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="232276" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" xmlns="http://jabber.org/protocol/httpbind" key="c580b3468e5a8c45e74d8c64630fa36a84a98873"/>
[2012-09-06 16:59:40.122] [DEBUG] [response.js] - e209a9ec-b399-4c2a-97b9-d8159fadd264 SENT(277197): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 16:59:40.757] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="277198" sid="e209a9ec-b399-4c2a-97b9-d8159fadd264" xmlns="http://jabber.org/protocol/httpbind" key="9778b8c025dd822e89dd83e5f9d2f80cfe31c738"/>

org/protocol/httpbind" key="82d7f47c94f033ffc18133249342cc1266b7d062"/>
[2012-09-06 17:10:21.660] [DEBUG] [response.js] - e209a9ec-b399-4c2a-97b9-d8159fadd264 SENT(277228): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 17:10:22.344] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="277229" sid="e209a9ec-b399-4c2a-97b9-d8159fadd264" xmlns="http://jabber.org/protocol/httpbind" key="b804be3e712153a194b27d8cb0425c9c44d93eb1"/>
[2012-09-06 17:10:30.668] [DEBUG] [response.js] - 191de04e-a2b2-49df-8c3c-d00b336d482b SENT(232307): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 17:10:31.297] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="232308" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" xmlns="http://jabber.org/protocol/httpbind" key="fba5848f015947d812630687057e2c97eb7513ea"/>
[2012-09-06 17:10:42.348] [DEBUG] [response.js] - e209a9ec-b399-4c2a-97b9-d8159fadd264 SENT(277229): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 17:10:43.020] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="277230" sid="e209a9ec-b399-4c2a-97b9-d8159fadd264" xmlns="http://jabber.org/protocol/httpbind" key="1faef86f913f083b88d1437801d3a0e607eab943"/>
[2012-09-06 17:10:51.300] [DEBUG] [response.js] - 191de04e-a2b2-49df-8c3c-d00b336d482b SENT(232308): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 17:10:51.927] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="232309" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" xmlns="http://jabber.org/protocol/httpbind" key="0e105d98d44adca73c1cff2564b8416e35122210"/>
[2012-09-06 17:11:03.025] [DEBUG] [response.js] - e209a9ec-b399-4c2a-97b9-d8159fadd264 SENT(277230): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 17:11:03.803] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="277231" sid="e209a9ec-b399-4c2a-97b9-d8159fadd264" xmlns="http://jabber.org/protocol/httpbind" key="b70e63e4c8eed6effe580de510e472e41dac69aa"/>
[2012-09-06 17:11:11.930] [DEBUG] [response.js] - 191de04e-a2b2-49df-8c3c-d00b336d482b SENT(232309): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 17:11:13.131] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="232310" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" xmlns="http://jabber.org/protocol/httpbind" key="fe4f7b6bf8a4cef89a3189c8b6cea20dbc753b40"/>
[2012-09-06 17:11:23.807] [DEBUG] [response.js] - e209a9ec-b399-4c2a-97b9-d8159fadd264 SENT(277231): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 17:11:24.495] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="277232" sid="e209a9ec-b399-4c2a-97b9-d8159fadd264" xmlns="http://jabber.org/protocol/httpbind" key="3fcaee059276edc6d4d8af6089146e6737786eed"/>
[2012-09-06 17:11:33.135] [DEBUG] [response.js] - 191de04e-a2b2-49df-8c3c-d00b336d482b SENT(232310): <body xmlns="http://jabber.org/protocol/httpbind&quot;/>
[2012-09-06 17:11:33.766] [DEBUG] [http-server.js] - RECD: <body xml:lang="en" rid="232311" sid="191de04e-a2b2-49df-8c3c-d00b336d482b" xmlns="http://jabber.org/protocol/httpbind" key="d24932016c33f56a8adbf3de4f7da34173458204"/>

@dhruvbird
Copy link
Collaborator

@hzzg6y Please could you explain what the "key" attribute is and why it is different for every request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants