cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Please note that Remote Expert Mobile announced end-of-life and support will end on February 28, 2022.
2123
Views
5
Helpful
20
Replies
Highlighted
Beginner

Can't authorize using devsandbox and sampleclient.html

Hello

Can anyone guide me with how to solve an error

[Console] Stream opened with psdtemea.cisco.com <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>CISCO-VTG-TOKEN</mechanism></mechanisms></stream:features>

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

AGRhbmlsLmJvZ29tb2xvdi5kYgBib1VJRUx2Vg==

</auth>

<failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>

<not-authorized/>

</failure>

SASL failure from server: {urn:ietf:params:xml:ns:xmpp-sasl}not-authorized

Exception during connection: <error><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/></error>

[Console] Stream closed.


Login and pass are right according to instructions given here:

Shared Jabber Sandbox - Cisco Developer Community


Also here are my settings. Hope someone will help.


Thanks for requesting Shared lab access. Your access information is as follows:

To download VPN client access URL:

URL: https://64.103.37.6

Username: danil.bogomolov.db

Password: boUIELvV

NOTE: If you already have the Anyconnect Clinet installed on your device, please enter the URL into the client directly and connect.

Once VPN is established, you can connect to your device with the following:

Username:

Password: cisco1234

Device:

Directory Number:

To access shared resources:

Cisco Unified Communications Manager

Name:           pub-local.psdtemea.cisco.com

Address:        10.10.20.1

Domain:         psdtemea.cisco.com

Cisco Unified Presence Server

Name:           cup.psdtemea.cisco.com

Address:        10.10.20.20

Domain: psdtemea.cisco.com

TFTP server:    10.10.20.1


Basic config was used as in example:

var demo_config = {

domain: "psdtemea.cisco.com",

maxGraphAge: 5,

unsecureAllowed: true,

atSymbolAllowed: false,

logPersistence: false,

serviceDiscoveryEnabled: false,

httpBindingURL: "http://cup02:7335/httpbinding",

httpBindingURL_secondary: "/httpbinding"

}

Please help me with this error.

Cheers

Everyone's tags (4)
20 REPLIES 20
Highlighted
Cisco Employee

Re: Can't authorize using devsandbox and sampleclient.html

I think it's the cup02 that's the problem.  I recommend trying cup.psdtemea.cisco.com instead.  And I'm not sure why you have an httpBindingURL and an httpBindingURL_secondary.  You already have "/httpbinding" in the httpBindingURL.  This is all you need.

httpBindingURL: "http://cup.psdtemea.cisco.com:7335/httpbinding"

Here's what works for me (from a multi-user chat demo).  Obviously, your code isn't putting the username and password in the demo_config, but that isn't what's causing the problem.

var demo_config = {               

  httpBindingURL: "http://cup.psdtemea.cisco.com:7335/httpbinding",               

  domain: "psdtemea.cisco.com",               

  username: "",               

  password: "",               

  chatroom: "testroom@muc.psdtemea.cisco.com",

  nickname: "nickname",               

  unsecureAllowed: true

};

jabberwerx._config.unsecureAllowed = demo_config.unsecureAllowed;


Ignore the fact that the forum software is turning my URLs into live links.

Highlighted
Beginner

Re: Can't authorize using devsandbox and sampleclient.html

Hi, Nicholas

Thank you for your reply.

I tried to change demo_config to such:

var demo_config = {

domain: "psdtemea.cisco.com",

maxGraphAge: 5,

  username: "",              

  password: "",       

unsecureAllowed: true,

atSymbolAllowed: false,

logPersistence: false,

serviceDiscoveryEnabled: false,

  httpBindingURL: "http://cup.psdtemea.cisco.com:7335/httpbinding",

}

But I'm getting the same error when login. SUDDENLY when I'm trying to log in(using my username and pass) with "Create new account" checkbox checked it sais:   Conflicting names were encountered.   So it knows me but I still can't authorize.

Maybe there could be some other problem?

Highlighted
Cisco Employee

Re: Can't authorize using devsandbox and sampleclient.html

Hi Danil,

I think I'd have to see more of the code to diagnose the problem.  I did notice that you copied the username: "", password: "" from my example.  These aren't supposed to be blank.  They're just placeholders where you'd insert your username and password (if you want to hard code them into your test page).

Also, I don't know why you're getting that error, considering the fact that you're using http, not https.  I see some XML <auth> with a base64 encoded authorization in there, but I can't tell if that's part of your error message or part of your application.  Is your web application authenticating to some other server for something other than Jabber? 

Highlighted
Beginner

Re: Can't authorize using devsandbox and sampleclient.html

Hi Nicholas,

I've tried both ways but the same result with null username and password or without it at all.

Here's code of simpleclient.html. It's basic and provided by CISCO. I've downloaded it from site and only changed demo_config.

Dropbox - sampleclient.html

Looking forward for your help.

Thanks

Highlighted
Cisco Employee

Re: Can't authorize using devsandbox and sampleclient.html

Ah, okay -- I didn't realize you were using jabberwerx UI.  I was referring to the sample MUC code with plain CAXL, which works fine.  Yes, I get the same error with the jabberwerx UI sample code.

It may not be Base64 encoding the username:password properly, which would explain why it's failing authentication. I'm going to confer with the jabber team about this, because I may be misinterpreting the results.  But it's not encoding my username:password correctly, as far as I can tell. 

More important, I don't see your username listed anywhere as a user on the pub-local or cup servers, so it wouldn't matter if it encodes your username:password correctly or not.  You may have to re-reserve a slot on the shared lab to get your username:password registered. 

Highlighted
Beginner

Re: Can't authorize using devsandbox and sampleclient.html

Well I reserved a slot on dev sandbox and connected to VPN provided by email (also listed in console on dev sandbox slot)

Username and pass is not listed in code, because I input them into form for connection.

Maybe you can give me some working sample code to test messaging opportunity so i could log in using my credentials while slot is reserved and I'm connected to VPN?

Anyway looking forward for any result from you.

Many thanks.

Highlighted
Cisco Employee

Re: Can't authorize using devsandbox and sampleclient.html

Hi Danil,

I've attached a multi-user chat example that doesn't use jabberwerx-ui.  It uses jQueryUI instead, so it doesn't try to do basic authentication (which is where I think the other example is getting hung up).

This sample works fine for me against the sandbox.  The example is unfinished, but contains enough to show you how to do several things like grab the groups, contacts, etc.

Highlighted
Beginner

Re: Can't authorize using devsandbox and sampleclient.html

Hi Nicholas,

Now I'm getting another errors.

Maybe I should use different  httpBindingURL ?

From what environment this sample code should be opened?

Could it be localhost?

According to your setup you have httpBindingURL running on HTTPS. But mine uses HTTP and sample code is running under http://localhost:8080.

var demo_config = {

  //httpBindingURL: "https://im3.ciscowebex.com/http-bind",                                                                    - 1 case

  httpBindingURL: "http://cup.psdtemea.cisco.com:7335/httpbinding",                                                      -  2 case

  username: "danil.bogomolov.db",              

  password: "boUIELvV"

  };

1. When I try to use your httpBindingURL: "https://im3.ciscowebex.com/http-bind". I also tried to set jabberwerx._config.unsecureAllowed = true but that didn't help and for this case debug always says secure: true

BOSH URL has different protocol than webserver: https: != http: jabberwerx.js:13169

jabberwerx.Stream.open request made with httpBindingURL: https://im3.ciscowebex.com/http-bind, crosssite: true, secure: true jabberwerx.js:13169

[clientStatus] client status: Attempting to connect jabberwerx.js:13169

closed: <stream:error xmlns:stream="http://etherx.jabber.org/streams"><system-shutdown xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error> jabberwerx.js:13169

BOSH URL has different protocol than webserver: https: != http: jabberwerx.js:13169

jabberwerx.Stream.open request made with httpBindingURL: https://im3.ciscowebex.com/http-bind, crosssite: true, secure: true jabberwerx.js:13169

Module was requested but is missing. commentMacroApps debug.js:82

Module was requested but is missing. forumMacroDiscussionApp debug.js:82

2. When I try to use mine  httpBindingURL: "http://cup.psdtemea.cisco.com:7335/httpbinding"

jabberwerx.Stream.open request made with httpBindingURL: http://cup.psdtemea.cisco.com:7335/httpbinding, crosssite: true, secure: false jabberwerx.js:13169

[clientStatus] client status: Attempting to connect jabberwerx.js:13169

closed: <stream:error xmlns:stream="http://etherx.jabber.org/streams"><system-shutdown xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error> jabberwerx.js:13169

jabberwerx.Stream.open request made with httpBindingURL: http://cup.psdtemea.cisco.com:7335/httpbinding, crosssite: true, secure: false jabberwerx.js:13169

SASL failed to initialize: [object Object] jabberwerx.js:13169

Exception during connection: <error><mechanism-too-weak xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/></error> jabberwerx.js:13169

[clientStatus] client status: Disconnected

Highlighted
Cisco Employee

Re: Can't authorize using devsandbox and sampleclient.html

My bad - I attached the wrong demo.  That one was for connecting via webex.  I've attached the right demo this time.  Deepest apologies!

Word of warning, though:  This demo used to work 100% for me.  When I tested it today to make sure I had the right one, it was off and on for me.  Sometimes it worked, sometimes it didn't.  When it didn't work, it simply didn't let me enter (setup) a room.  And sometimes when it looked like I entered a room and listed me as an occupant, it didn't really create the room properly, so I couldn't broadcast anything.

Maybe it has something to do with making sure you're officially disconnected before trying to connect again.  I used to be able to just reload the page and re-connect, though. 

Unless it's a sandbox issue, I don't know how to account for what changed (except I have upgraded the plugin -- don't know if that's it), but hopefully this will help you get going, anyway.

Highlighted
Beginner

Re: Can't authorize using devsandbox and sampleclient.html

I'm still getting error

jabberwerx.Stream.open request made with httpBindingURL: http://cup.psdtemea.cisco.com:7335/httpbinding, crosssite: true, secure: true jabberwerx.js:13169

[clientStatus] client status: Attempting to connect jabberwerx.js:13169

  1. XHR finished loading: POST "http://cup.psdtemea.cisco.com:7335/httpbinding". jabberwerx.js:8775

  1. XHR finished loading: POST "http://cup.psdtemea.cisco.com:7335/httpbinding". jabberwerx.js:8775

SASL failure from server: {urn:ietf:params:xml:ns:xmpp-sasl}not-authorized jabberwerx.js:13169

Exception during connection: <error><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/></error> jabberwerx.js:13169

[clientStatus] client status: Disconnected jabberwerx.js:13169

  1. POST http://cup.psdtemea.cisco.com:7335/httpbinding 404 (Not Found) jabberwerx.js:8775

  1. XHR finished loading: POST "http://cup.psdtemea.cisco.com:7335/httpbinding".

Maybe my actions sequence is not right?

1. I login into https://devnetsandbox.cisco.com/

2. Go to Availble Now>Shared Endpoint Lab  and make reservation for 2 hours

3. Click on Add_Jabber_SDK_for_Web

4. Wait for action to perform and email with setup info

5. Connect with Cisco AnyConnect Secure Mobility Client to VPN specified in email setup info

6. Try to connect using your code example

Here are my demo_config:

all commented code lines were also tested in all combinations but i came up with no working result

var demo_config = {

                httpBindingURL: "http://cup.psdtemea.cisco.com:7335/httpbinding",

                //httpBindingURL: "https://im3.ciscowebex.com/http-bind",

                //httpBindingURL: "http://cup02:7335/httpbinding",

                domain: "psdtemea.cisco.com",

                username: "danil.bogomolov.db",

                password: "boUIELvV",

                //chatroom: "testroom@muc.psdtemea.cisco.com",

                //nickname: "nick",

                unsecureAllowed: true

  };

  jabberwerx._config.unsecureAllowed = demo_config.unsecureAllowed;

  //jabberwerx._config.httpBindingURL = demo_config.httpBindingURL;

Highlighted
Cisco Employee

Re: Can't authorize using devsandbox and sampleclient.html

Hi Danil,

The steps you outlined look right to me.

Are you sure you're using the correct username and password, not the username/password you use to connect to the VPN?  Make sure you're using the username/password in this section of the sandbox confirmation email:

Once VPN is established, you can connect to your device with the following:

Username: <username>

Password: <password>

Device: <device>

Directory Number: <dn>

Obviously, you'll have real information in your email instead of <placeholders>.  I can see your username danil.bogomolov.db in the user list on the server, so I know you're there.  I can't see your password, of course, so I can't tell you if the one you're using is right or wrong.

I'm concerned about the 404 error for http://cup.psdtemea.cisco.com:7335/httpbinding -- I've never seen that, and I don't see it now when I run the demo I sent you.

However, the npDemo.html demo code works fine for me using my username/password, with no other changes.  In fact, today it's working 100% again.  I have no idea why I had problems before.

There are other important differences between the webex demo and the last demo I attached than just the demo_config changes, so you can't simply fix the demo_config in the webex code and have it work.  You need to start with the npDemo.html code.  Technically, you don't even have to edit it.  You can just enter your username/password when you connect.

Thanks,

Nick

Highlighted
Beginner

Re: Can't authorize using devsandbox and sampleclient.html

As I've mentioned before here's email content I'm getting.

According to it Username is blank and password is default "cisco1234".

Can you tell me what should I do with that? I've tried all cases:

1. using blank username and pass "cisco1234"

2. Using

          Username: danil.bogomolov.db

          Password: boUIELvV

3. Using

     Username: danil.bogomolov.db

     Password: cisco1234

In each result I'm still getting not-authorized error.

Thanks for requesting Shared lab access. Your access information is as follows:

To download VPN client access URL:

URL: https://64.103.37.6

Username: danil.bogomolov.db

Password: boUIELvV

NOTE: If you already have the Anyconnect Clinet installed on your device, please enter the URL into the client directly and connect.

Once VPN is established, you can connect to your device with the following:

Username:

Password: cisco1234

Device:

Directory Number:

To access shared resources:

Cisco Unified Communications Manager

Name:           pub-local.psdtemea.cisco.com

Address:        10.10.20.1

Domain:         psdtemea.cisco.com

Cisco Unified Presence Server

Name:           cup.psdtemea.cisco.com

Address:        10.10.20.20

Domain: psdtemea.cisco.com

TFTP server:    10.10.20.1

Highlighted
Cisco Employee

Re: Can't authorize using devsandbox and sampleclient.html

Hi Danil,

I checked the pub-local and cup servers, and I saw that the sandbox script didn't create your user account correctly.  I fixed the problems on both servers.  You should be able to log in now.  I used your username/password here, and it worked fine.

Let me know if you still have any problems. 

Nicholas

Highlighted
Beginner

Re: Can't authorize using devsandbox and sampleclient.html

Hi Nicholas,

Thank you. Now I'm able to login. But one more question. How can I create a chat room to go inside of it ? You used some test chat room in your example. This one

chatroom: "testroom@muc.psdtemea.cisco.com",

nickname: "nick"

I've tried it but I can't connect to it. Should I create my own somehow maybe using devsandbox GUI?

This widget could not be displayed.