cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7487
Views
9
Helpful
10
Replies

Jabber UI Demo - Bind Error

mustafasapcili
Level 1
Level 1

Hello,

I cannot login from this demo page which can be downloaded from:

https://developer.cisco.com/site/collaboration/jabber/websdk/learn/im-and-presence-how-to/use-jabber-im-ui-components/

I have already installed and configured my own Cisco Unified Communication Manager and Cisco IM&Presense Server, not using Shared Lab. I developed and integrated voice features with Jabber SDK and now want to provide presence features from my web application.

So I downloaded the demo to my localhost and configured nginx for proxy to be able to use xmpp over bosh.

When I tried to login with wrong credentials, it says "Unable to login. Check username and password.". That's what I expected. But when I entered exact credentials, it waits for a while and then says "Operation failed".

I investigated the issue a lot but could not find the solution yet. I also read the XMPP protocol notes to find out what's going on but still could not fixed. Maybe you can help me to fix the issue or show some ways to debug it.

Here is the doc:

XEP-0206: XMPP Over BOSH


Here are the XMPP requests and responses that I logged from the demo page:

First Request

<body xmlns="http://jabber.org/protocol/httpbind" xmlns:xmpp="urn:xmpp:xbosh" hold="1" ver="1.9" from="mustafa@192.168.56.101" to="192.168.56.101" secure="true" wait="30" xmpp:version="1.0" rid="4294805355"/>

First Response

<body authid='5B3AF75983' inactivity='60' polling='5' requests='2' secure='true' sid='5B3AF75983' ver='1.8' wait='30' xmlns='http://jabber.org/protocol/httpbind' xmlns:stream='http://etherx.jabber.org/streams'><stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism>CISCO-VTG-TOKEN</mechanism><hostname xmlns='urn:xmpp:domain-based-name:0'>192.168.2.156</hostname></mechanisms></stream:features></body>

Second Request

<body xmlns="http://jabber.org/protocol/httpbind" sid="5B3AF75983" rid="4294805356"><auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AG11c3RhZmEAMTIzNDU2</auth></body>

Second Response

<body xmlns='http://jabber.org/protocol/httpbind' xmlns:stream='http://etherx.jabber.org/streams'><success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/></body>

Third Request

<body xmlns="http://jabber.org/protocol/httpbind" sid="5B3AF75983" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true" to="192.168.56.101" rid="4294805357"/>

Third Response

<body xmlns='http://jabber.org/protocol/httpbind' xmlns:stream='http://etherx.jabber.org/streams'/>

Last Request

<body xmlns="http://jabber.org/protocol/httpbind" sid="5B3AF75983" rid="4294805358"><iq xmlns="jabber:client" type="set" id="resource-bind"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>sampleclient</resource></bind></iq></body>

Last Response

<body condition='remote-stream-error' type='terminate' xmlns='http://jabber.org/protocol/httpbind' xmlns:stream='http://etherx.jabber.org/streams'><failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><bind-error/></failure></body>

Thanks,

1 Accepted Solution

Accepted Solutions

I see, the problem is on your domain name.

Please try using the "domain name" instead of "IP address" for the "domain" config in your CAXL setting.

The domain name is the domain name that your CUPS server belongs to.

CUPS->System->Cluster Topology->Settings->Domain Name

Thanks,

Howard

View solution in original post

10 Replies 10

tinghche
Level 5
Level 5

Hi Mustafa,

Firs thing first, could you please paste the BOSH url to your browser to see if it returns back below

This URI is for XMPP communication via the BOSH protocol.

Please reference the following protocols:

  • RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core
  • RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence
  • XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)
  • XEP-0206: XMPP Over BOSH

You can try from both nginx proxy, and directly from IM&Presense Server.

If the IM&Presense Server not response, then check to make sure the Cisco UP XCP Web Connection Manager service is running. Also, check if the System->Security->Setting->Enable Web Client to CUP Secure Mode is checked or not. If it's checked, then the BOSH url will be https, otherwise it will be http

If it's the proxy that's not responding, then it must be the proxy setting that went wrong. Actually, you don't need a proxy to redirect the BOSH URL since the browser are pretty much support it now.

If above are all setting correctly, you might want to check if the users are setup correctly.

Let us know if you are still facing the problem.

Thanks,

Howard

Can you clarify your comment on proxies below...? AFAIK cross-origin

security mechanisms in modern browsers will not allow CAXL to work

direct to CUP..?

Regards,

- David Staudt

Please refer to the compatibility table below.

https://developer.cisco.com/site/collaboration/call-control/unified-presence/overview/caxl-sdk/compatibility/

Most of the browser do support cross-origin, there are still some cases you will need a proxy to get through.

Howrad

Ah...groovy, thanks for that

Regards,

- David Staudt

Hello Ting-Hao,

Yes, directly or via proxy, I can get the page you gave as an example.  I also can send request and get response from IM&Presence Server. When BOSH URL is not setup correctly, it returns http error code or browser does not allow this request. So I think there is no problem with BOSH URL.

Also I read your some replies in the forum about Secure Mode. In my default conf, it was https. I set it up but I was getting same error message. Then, I turned it into non-secure mode according to your replies, BOSH URL responses again but the situation is still same...

So then, I think my user's configuration may be problematic but I tried Cisco Jabber for Mac to check my conf. It is working. I can chat or set presence with this software.

Do you have any other idea to fix or debug the issue or is there any settings that can be affect here?

Here are some additional information about my conf below. It may help you to investigate responses that I gave in the first post.


Localhost: 192.168.56.101

Call Manager: 192.168.2.155

IM&Presence Server: 192.168.2.156

Jabber UI Demo locates at: http://192.168.56.101/cisco/jabberUIDemo/jabberUIDemo.html

(I gave this address because domain compatibility is important to connect via XMPP over BOSH)

Nginx Proxy Conf:

    location /httpbinding {

        access_log off;

        proxy_pass http://192.168.2.156:7335/httpbinding;

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header Host $host;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    }


Thanks,

From the xmpp, looks like the authentication has passed. Then, something wrong when actually requesting the resource from server.

Could you try directly connect to CUPS, instead of using proxy?

And post the CAXL configuration, xmpp console logs, and JavaScript logs here.

Thanks,

Howard

Hello Howard,

Thanks for your quick reply. Yes, authentication has successfully passed. Also when I enter wrong credentials, it also returns error message. But something goes wrong in other requests.

I've also tried to connect directly to CUPS but the problem still exists.

Here are the details that you've requested:

I've sent setup information in the previous post.

CAXL configuration:

I'm sending the conf which is edited for direct connection instead proxy

var demo_config = {

        domain: "192.168.56.101", //the domain specified for your CUP server

        httpBindingURL: "http://192.168.2.156:7335/httpbinding", //the BOSH url for your server

        unsecureAllowed: true, //unsecureAllowed should be true if plaintext authentication is allowed over unencrypted or unsecured HTTP channels

    }

Console Log:

GET http://192.168.56.101/cisco/jabberUIDemo/caxl/resources/translations/TranslationData.en_US.js jabberwerx.ui.js (line 5254)

Loaded translation for en-US jabberwerx.ui.js (line 9677)

Password fields present on an insecure (http://) page. This is a security risk that allows user login

credentials to be stolen. 0


Note: Service discovery is disabled on the client. jabberwerx.ui.js (line 9677)

Cross site is true. jabberwerx.ui.js (line 9677)

Update _connectToNode = 192.168.2.156 jabberwerx.ui.js (line 9677)

Bosh URL is: http://192.168.2.156:7335/httpbinding jabberwerx.ui.js (line 9677)

POST http://192.168.2.156:7335/httpbinding 200 OK 7ms jabberwerx.ui.js (line 5254)

POST http://192.168.2.156:7335/httpbinding 200 OK 24ms jabberwerx.ui.js (line 5254)


POST http://192.168.2.156:7335/httpbinding 200 OK 2.01s jabberwerx.ui.js (line 5254)

POST http://192.168.2.156:7335/httpbinding 200 OK 2ms jabberwerx.ui.js (line 5254)

closed: <stream:error xmlns:stream="http://etherx.jabber.org/streams"><undefined-condition xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>

XMPP Request and Responses

First Request:

<body xmlns="http://jabber.org/protocol/httpbind" xmlns:xmpp="urn:xmpp:xbosh" hold="1" ver="1.9" from="mustafa@192.168.56.101" to="192.168.56.101" secure="true" wait="30" xmpp:version="1.0" rid="4062769493">

</body>

First Response:

<body authid='7126BEDE5D' inactivity='60' polling='5' requests='2' secure='true' sid='7126BEDE5D' ver='1.8' wait='30' xmlns='http://jabber.org/protocol/httpbind' xmlns:stream='http://etherx.jabber.org/streams'><stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism>CISCO-VTG-TOKEN</mechanism><hostname xmlns='urn:xmpp:domain-based-name:0'>192.168.2.156</hostname></mechanisms></stream:features></body>

Second Request:

<body xmlns="http://jabber.org/protocol/httpbind" sid="7126BEDE5D" rid="4062769494">

<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AG11c3RhZmEAMTIzNDU2</auth>

</body>

Second Response:

<body xmlns='http://jabber.org/protocol/httpbind' xmlns:stream='http://etherx.jabber.org/streams'><success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/></body>

Third Request:

<body xmlns="http://jabber.org/protocol/httpbind" sid="7126BEDE5D" xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true" to="192.168.56.101" rid="4062769495">

</body>

Third Response:

<body xmlns='http://jabber.org/protocol/httpbind' xmlns:stream='http://etherx.jabber.org/streams'/>

Last Request:

<body xmlns="http://jabber.org/protocol/httpbind" sid="7126BEDE5D" rid="4062769496">

<iq id="resource-bind" xmlns="jabber:client" type="set">

<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">

<resource>sampleclient</resource>

</bind>

</iq>

</body>

Last Response:

<body condition='remote-stream-error' type='terminate' xmlns='http://jabber.org/protocol/httpbind' xmlns:stream='http://etherx.jabber.org/streams'><failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><bind-error/></failure></body>

Client Operating System: OS X 10.9.1

Client Browser: Firefox 27.0.1

Also the problem is reproduced in Chrome Version 33.0.1750.146, Safari Version 7.0.1 (9537.73.11)

Also there is a strange thing that I've noticed, it may helps. Third request is taking too much than the other request and when it is completed, fourth request is also completed. To debug this, I've did some changes in caxl/jabberwerx.ui.js. I changed async value true to false to understand what's going on. When I did this, third request is taking too much again but when it is finished there were no other requests...

Best,

I see, the problem is on your domain name.

Please try using the "domain name" instead of "IP address" for the "domain" config in your CAXL setting.

The domain name is the domain name that your CUPS server belongs to.

CUPS->System->Cluster Topology->Settings->Domain Name

Thanks,

Howard

Howard,

Thank you so much. With the change you said, I passed the login stage.

Best regards,

Mustafa ŞAPÇILI

hiteshp011
Level 1
Level 1

Hello,

I am integration this demo for web chat in my website. i am configure with my server like

var demo_config = {

       // domain: "psdtemea.cisco.com", //the domain specified for your CUP server

        domain: "192.168.1.161",

        httpBindingURL: "http://192.168.1.161:5280/http-bind/", //the BOSH url for your server

        unsecureAllowed: true

    }

Than i have got login screen than after i have already user created on my server with openfire. so i am using my user name and password in this provided login screen.

my username is : hitesh

my password is : 123456

i am push the login button than i have got response in console log like same as above post like Mustufa.

In the third response i am getting failure like this:

<body xmlns='http://jabber.org/protocol/httpbind' ack='3560616839'><failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure></body>

So, What can i do for login and go ahead for chetting proccess. please help me...

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: