librelist archives

« back to archive

prebind error when connect to openfire

prebind error when connect to openfire

From:
Huxisuz Hu
Date:
2014-04-26 @ 04:05
Hello JC Brand,

sorry, I previously sent a mail without a theme... if you've read it,
please ignore this mail,


I posted a quetion of "prebind authorization failed on openfire" days ago,
firstly sorry for putting that post on github.. could you  give a look at
the below problem description and give some suggestion?

my setting for converse:
require(['converse'], function (converse) {
converse.initialize({
debug: true,
auto_list_rooms: false,
auto_subscribe: false,
bosh_service_url: 'http://chat.ufutx.net:7070/http-bind'(using punjab),
prebind: true,
jid: '<?php echo $sessionInfo['jid'] ?>',
sid: '<?php echo $sessionInfo['sid'] ?>',
rid: '<?php echo $sessionInfo['rid'] ?>',
hide_muc_server: false,
i18n: locales['en'], /
show_controlbox_by_default: false,
xhr_user_search: false
});
});

and the php prebind code is using cany-chat php-prebind as you mentioned on
your website:
$xmppPrebind = new XmppPrebind('chat.ufutx.net', '
http://chat.ufutx.net:7070/http-bind/', 'myresource', false, false);
please note that 'myresource' could be different from 'resource' generated
by converse.js, may this cause issue?

and when I checked the console output, it shows the session is attached,
and did sent a get roster iq to openfire, but it then get
an error iq:
<iq type="error" from="chat.ufutx.net">
<query xmlns="http://jabber.org/protool/disco#info"/>
<error code="400" type="modify"/>
</iq>

and the user is actually not logged into openfire, punjab is working ok.
How  can I resolve this error ? your help is greatly appreciated! thanks .


Best Regards

lancelothuxi

Re: [conversejs] prebind error when connect to openfire

From:
Jc Brand
Date:
2014-04-28 @ 15:30
Hi Hu

On Sat, Apr 26, 2014 at 12:05:28PM +0800, HUXISUZ HU wrote:

<snip>

>    my setting for converse:
>
>    require(['converse'], function (converse) {
>       converse.initialize({
>          debug: true,
>          auto_list_rooms: false,
>          auto_subscribe: false,
>          bosh_service_url: 'http://chat.ufutx.net:7070/http-bind', 
>          prebind: true,
>          jid: '<?php echo $sessionInfo['jid'] ?>',
>          sid: '<?php echo $sessionInfo['sid'] ?>',
>          rid: '<?php echo $sessionInfo['rid'] ?>',
>          hide_muc_server: false,
>          i18n: locales['en'], /
>          show_controlbox_by_default: false,
>          xhr_user_search: false
>       });
>    });
>
>    and the php prebind code is using candy-chat php-prebind as you mentioned
>    on your website:
>    $xmppPrebind = new XmppPrebind('chat.ufutx.net', 
'http://chat.ufutx.net:7070/http-bind/', 'myresource', false, false); 
>
>    please note that 'myresource' could be different from 'resource' generated
>    by converse.js, may this cause issue? 

AFAIK converse.js will use the resource specified in $sessionInfo['jid']

>    and when I checked the console output, it shows the session is attached,
>    and did sent a get roster iq to openfire, but it then get
>    an error iq:
>    <iq type="error" from="[4]chat.ufutx.net"> 
>    <query xmlns="[5]http://jabber.org/protool/disco#info"/>
>    <error code="400" type="modify"/>
>    </iq>

Please post the IQ stanza that was sent out before this one. It must also have the
same xmlns attribute, but it must be sent from you to the server.

>    and the user is actually not logged into openfire, punjab is working ok.
>    How  can I resolve this error ? your help is greatly appreciated! thanks .

Check the logs of your openfire server and see what it says there.
You can post the log messages here if you're unsure.

Regards
JC

Re: [conversejs] prebind error when connect to openfire

From:
Huxisuz Hu
Date:
2014-04-29 @ 06:43
Hello, JC Brand

Thank you very much for your detailed reply,
the first IQ sent to openfire is as:

<iq xmlns='jabber:client' to='10.0.2.15' from='121@10.0.2.15/xxx'
id='8276:sendIQ' type='get'><query xmlns='
http://jabber.org/protocol/disco#info'/></iq>
<iq xmlns='jabber:client' to='10.0.2.15' from='121@10.0.2.15/xxx'
id='8277:sendIQ' type='get'><query xmlns='
http://jabber.org/protocol/disco#items'/></iq><iq xmlns='jabber:client'
type='get' id='8278:sendIQ'><vCard xmlns='vcard-temp'/></iq><iq
xmlns='jabber:client' type='get' id='8279:roster'><query
xmlns='jabber:iq:roster'/></iq>

And here is the output of openfire:


C2S - SENT (1697810755): <iq type="error" id="8276:sendIQ" from="10.0.2.15"
to="10.0.2.15/9689f6dd"><query
xmlns="http://jabber.org/protocol/disco#info"/><error
code="401" type="auth"><not-authorized
xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
C2S - SENT (1697810755): <iq type="error" id="8277:sendIQ" from="10.0.2.15"
to="10.0.2.15/9689f6dd"><query
xmlns="http://jabber.org/protocol/disco#items"/><error
code="401" type="auth"><not-authorized
xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

C2S - SENT (1697810755): <iq type="error" id="8278:sendIQ" to="
10.0.2.15/9689f6dd"><vCard xmlns="vcard-temp"/><error code="401"
type="auth"><not-authorized
xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
C2S - SENT (1697810755): <iq type="error" id="8279:roster" to="
10.0.2.15/9689f6dd"><query xmlns="jabber:iq:roster"/><error code="401"
type="auth"><not-authorized
xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>


The resource I assigned is 'xxx' for prebind, but the server points to
'9689f6dd'...
I understand it's not good to ask for step to step  instruction...but just
this problem has been around for days..your help would be greatly
appreciated..thanks

By the way, I've studied strophejs prebind example, it post an ajax request
to prebind url, if ajax status is success, will not prompt user to login
again,using attach() to bind session, otherwise to call normal login
function which request
username and password...I'm also  looking into conversejs to find clue...
at last, thanks for your wonderful work!
  Regards
Lancelot Huxi



2014-04-28 23:30 GMT+08:00 JC Brand <lists@opkode.com>:

> Hi Hu
>
> On Sat, Apr 26, 2014 at 12:05:28PM +0800, HUXISUZ HU wrote:
>
> <snip>
>
> >    my setting for converse:
> >
> >    require(['converse'], function (converse) {
> >       converse.initialize({
> >          debug: true,
> >          auto_list_rooms: false,
> >          auto_subscribe: false,
> >          bosh_service_url: 'http://chat.ufutx.net:7070/http-bind',
> >          prebind: true,
> >          jid: '<?php echo $sessionInfo['jid'] ?>',
> >          sid: '<?php echo $sessionInfo['sid'] ?>',
> >          rid: '<?php echo $sessionInfo['rid'] ?>',
> >          hide_muc_server: false,
> >          i18n: locales['en'], /
> >          show_controlbox_by_default: false,
> >          xhr_user_search: false
> >       });
> >    });
> >
> >    and the php prebind code is using candy-chat php-prebind as you
> mentioned
> >    on your website:
> >    $xmppPrebind = new XmppPrebind('chat.ufutx.net', '
> http://chat.ufutx.net:7070/http-bind/', 'myresource', false, false);
> >
> >    please note that 'myresource' could be different from 'resource'
> generated
> >    by converse.js, may this cause issue?
>
> AFAIK converse.js will use the resource specified in $sessionInfo['jid']
>
> >    and when I checked the console output, it shows the session is
> attached,
> >    and did sent a get roster iq to openfire, but it then get
> >    an error iq:
> >    <iq type="error" from="[4]chat.ufutx.net">
> >    <query xmlns="[5]http://jabber.org/protool/disco#info"/>
> >    <error code="400" type="modify"/>
> >    </iq>
>
> Please post the IQ stanza that was sent out before this one. It must also
> have the
> same xmlns attribute, but it must be sent from you to the server.
>
> >    and the user is actually not logged into openfire, punjab is working
> ok.
> >    How  can I resolve this error ? your help is greatly appreciated!
> thanks .
>
> Check the logs of your openfire server and see what it says there.
> You can post the log messages here if you're unsure.
>
> Regards
> JC
>

Re: [conversejs] prebind error when connect to openfire

From:
Huxisuz Hu
Date:
2014-04-29 @ 07:37
Hello JC Brand and Ankit ,
I've solved my problem! and I found it's a xmpp-php-prebind problem... and
here is the related post is:
https://groups.google.com/forum/#!topic/candy-chat/kkWWTOiIcOE, this issued
is caused by using plain password rather than encrypted...
thank you all!

Best Regards
Lancelot HuXi



2014-04-29 14:43 GMT+08:00 Huxisuz Hu <huxisuz@gmail.com>:

> Hello, JC Brand
>
> Thank you very much for your detailed reply,
> the first IQ sent to openfire is as:
>
> <iq xmlns='jabber:client' to='10.0.2.15' from='121@10.0.2.15/xxx'
> id='8276:sendIQ' type='get'><query xmlns='
> http://jabber.org/protocol/disco#info'/></iq>
> <iq xmlns='jabber:client' to='10.0.2.15' from='121@10.0.2.15/xxx'
> id='8277:sendIQ' type='get'><query xmlns='
> http://jabber.org/protocol/disco#items'/></iq><iq xmlns='jabber:client'
> type='get' id='8278:sendIQ'><vCard xmlns='vcard-temp'/></iq><iq
> xmlns='jabber:client' type='get' id='8279:roster'><query
> xmlns='jabber:iq:roster'/></iq>
>
> And here is the output of openfire:
>
>
> C2S - SENT (1697810755): <iq type="error" id="8276:sendIQ"
> from="10.0.2.15" to="10.0.2.15/9689f6dd"><query xmlns="
> http://jabber.org/protocol/disco#info"/><error code="401"
> type="auth"><not-authorized
> xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
> C2S - SENT (1697810755): <iq type="error" id="8277:sendIQ"
> from="10.0.2.15" to="10.0.2.15/9689f6dd"><query xmlns="
> http://jabber.org/protocol/disco#items"/><error code="401"
> type="auth"><not-authorized
> xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
>
> C2S - SENT (1697810755): <iq type="error" id="8278:sendIQ" to="
> 10.0.2.15/9689f6dd"><vCard xmlns="vcard-temp"/><error code="401"
> type="auth"><not-authorized
> xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
> C2S - SENT (1697810755): <iq type="error" id="8279:roster" to="
> 10.0.2.15/9689f6dd"><query xmlns="jabber:iq:roster"/><error code="401"
> type="auth"><not-authorized
> xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
>
>
> The resource I assigned is 'xxx' for prebind, but the server points to
> '9689f6dd'...
> I understand it's not good to ask for step to step  instruction...but just
> this problem has been around for days..your help would be greatly
> appreciated..thanks
>
> By the way, I've studied strophejs prebind example, it post an ajax
> request to prebind url, if ajax status is success, will not prompt user to
> login again,using attach() to bind session, otherwise to call normal login
> function which request
> username and password...I'm also  looking into conversejs to find clue...
> at last, thanks for your wonderful work!
>   Regards
> Lancelot Huxi
>
>
>
> 2014-04-28 23:30 GMT+08:00 JC Brand <lists@opkode.com>:
>
> Hi Hu
>>
>> On Sat, Apr 26, 2014 at 12:05:28PM +0800, HUXISUZ HU wrote:
>>
>> <snip>
>>
>> >    my setting for converse:
>> >
>> >    require(['converse'], function (converse) {
>> >       converse.initialize({
>> >          debug: true,
>> >          auto_list_rooms: false,
>> >          auto_subscribe: false,
>> >          bosh_service_url: 'http://chat.ufutx.net:7070/http-bind',
>> >          prebind: true,
>> >          jid: '<?php echo $sessionInfo['jid'] ?>',
>> >          sid: '<?php echo $sessionInfo['sid'] ?>',
>> >          rid: '<?php echo $sessionInfo['rid'] ?>',
>> >          hide_muc_server: false,
>> >          i18n: locales['en'], /
>> >          show_controlbox_by_default: false,
>> >          xhr_user_search: false
>> >       });
>> >    });
>> >
>> >    and the php prebind code is using candy-chat php-prebind as you
>> mentioned
>> >    on your website:
>> >    $xmppPrebind = new XmppPrebind('chat.ufutx.net', '
>> http://chat.ufutx.net:7070/http-bind/', 'myresource', false, false);
>> >
>> >    please note that 'myresource' could be different from 'resource'
>> generated
>> >    by converse.js, may this cause issue?
>>
>> AFAIK converse.js will use the resource specified in $sessionInfo['jid']
>>
>> >    and when I checked the console output, it shows the session is
>> attached,
>> >    and did sent a get roster iq to openfire, but it then get
>> >    an error iq:
>> >    <iq type="error" from="[4]chat.ufutx.net">
>> >    <query xmlns="[5]http://jabber.org/protool/disco#info"/>
>> >    <error code="400" type="modify"/>
>> >    </iq>
>>
>> Please post the IQ stanza that was sent out before this one. It must also
>> have the
>> same xmlns attribute, but it must be sent from you to the server.
>>
>> >    and the user is actually not logged into openfire, punjab is working
>> ok.
>> >    How  can I resolve this error ? your help is greatly appreciated!
>> thanks .
>>
>> Check the logs of your openfire server and see what it says there.
>> You can post the log messages here if you're unsure.
>>
>> Regards
>> JC
>>
>
>

Re: [conversejs] prebind error when connect to openfire

From:
Jc Brand
Date:
2014-04-29 @ 12:38
On Tue, Apr 29, 2014 at 03:37:23PM +0800, Huxisuz Hu wrote:
>    Hello JC Brand and Ankit ,
>    I've solved my problem! and I found it's a xmpp-php-prebind problem... and
>    here is the related post is:
>     [1]https://groups.google.com/forum/#!topic/candy-chat/kkWWTOiIcOE, this
>    issued is caused by using plain password rather than encrypted...
>    thank you all!

Good to hear and congratulations!

Re: [conversejs] prebind error when connect to openfire

From:
Ankit Bhootra
Date:
2014-04-26 @ 06:04
Hi lancelothuxi

 

Just remove single quotes in ‘<?php echo $sessionInfo[‘rid’] ?>’.. hope it
will work.

 

From: conversejs@librelist.com [mailto:conversejs@librelist.com] On Behalf
Of HUXISUZ HU
Sent: Saturday, April 26, 2014 9:35 AM
To: conversejs@librelist.com
Subject: [conversejs] prebind error when connect to openfire

 

Hello JC Brand,

 

sorry, I previously sent a mail without a theme... if you've read it, please
ignore this mail,

 

 

I posted a quetion of "prebind authorization failed on openfire" days ago,
firstly sorry for putting that post on github.. could you  give a look at
the below problem description and give some suggestion?

 

my setting for converse:

require(['converse'], function (converse) {

converse.initialize({

debug: true,

auto_list_rooms: false,

auto_subscribe: false,

bosh_service_url: 'http://chat.ufutx.net:7070/http-bind'(using punjab), 

prebind: true,

jid: '<?php echo $sessionInfo['jid'] ?>',

sid: '<?php echo $sessionInfo['sid'] ?>',

rid: '<?php echo $sessionInfo['rid'] ?>',

hide_muc_server: false,

i18n: locales['en'], /

show_controlbox_by_default: false,

xhr_user_search: false

});

});

 

and the php prebind code is using cany-chat php-prebind as you mentioned on
your website:

$xmppPrebind = new XmppPrebind('chat.ufutx.net',
'http://chat.ufutx.net:7070/http-bind/', 'myresource', false, false);Â 

please note that 'myresource' could be different from 'resource' generated
by converse.js, may this cause issue? 

 

and when I checked the console output, it shows the session is attached, and
did sent a get roster iq to openfire, but it then get

an error iq:

<iq type="error" from="chat.ufutx.net">Â 

<query xmlns="http://jabber.org/protool/disco#info"/>

<error code="400" type="modify"/>

</iq>

 

and the user is actually not logged into openfire, punjab is working ok.

How  can I resolve this error ? your help is greatly appreciated! thanks .

 

 

Best Regards

 

lancelothuxi

Re: [conversejs] prebind error when connect to openfire

From:
Huxisuz Hu
Date:
2014-04-26 @ 07:21
thanks for your answer, however  just remove the single quotation seems
don't work, if remove that, will cause syntax error, thanks anyway


2014-04-26 14:04 GMT+08:00 Ankit Bhootra <ankit@squarebits.in>:

>  Hi lancelothuxi
>
>
>
> Just remove single quotes in ‘<?php echo $sessionInfo[‘rid’] ?>’.. hope it
> will work.
>
>
>
> *From:* conversejs@librelist.com [mailto:conversejs@librelist.com] *On
> Behalf Of *HUXISUZ HU
> *Sent:* Saturday, April 26, 2014 9:35 AM
> *To:* conversejs@librelist.com
> *Subject:* [conversejs] prebind error when connect to openfire
>
>
>
> Hello JC Brand,
>
>
>
> sorry, I previously sent a mail without a theme... if you've read it,
> please ignore this mail,
>
>
>
>
>
> I posted a quetion of "prebind authorization failed on openfire" days ago,
> firstly sorry for putting that post on github.. could you  give a look at
> the below problem description and give some suggestion?
>
>
>
> my setting for converse:
>
> require(['converse'], function (converse) {
>
> converse.initialize({
>
> debug: true,
>
> auto_list_rooms: false,
>
> auto_subscribe: false,
>
> bosh_service_url: 'http://chat.ufutx.net:7070/http-bind'(using punjab),Â
>
> prebind: true,
>
> jid: '<?php echo $sessionInfo['jid'] ?>',
>
> sid: '<?php echo $sessionInfo['sid'] ?>',
>
> rid: '<?php echo $sessionInfo['rid'] ?>',
>
> hide_muc_server: false,
>
> i18n: locales['en'], /
>
> show_controlbox_by_default: false,
>
> xhr_user_search: false
>
> });
>
> });
>
>
>
> and the php prebind code is using cany-chat php-prebind as you mentioned
> on your website:
>
> $xmppPrebind = new XmppPrebind('chat.ufutx.net', '
> http://chat.ufutx.net:7070/http-bind/', 'myresource', false, false);Â
>
> please note that 'myresource' could be different from 'resource' generated
> by converse.js, may this cause issue?Â
>
>
>
> and when I checked the console output, it shows the session is attached,
> and did sent a get roster iq to openfire, but it then get
>
> an error iq:
>
> <iq type="error" from="chat.ufutx.net">Â
>
> <query xmlns="http://jabber.org/protool/disco#info"/>
>
> <error code="400" type="modify"/>
>
> </iq>
>
>
>
> and the user is actually not logged into openfire, punjab is working ok.
>
> How  can I resolve this error ? your help is greatly appreciated! thanks .
>
>
>
>
>
> Best Regards
>
>
>
> lancelothuxi
>