cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6890
Views
4
Helpful
51
Replies

Jabber + Sandbox - where to begin

mark.kilby
Level 1
Level 1

Hi

 

Am trying to get the Jabber demo going using a sandbox environment for CUPS.

 

E.g. as explained here: Video: Use the Jabber IM Core APIs - Cisco Developer Community

 

I've successfully got connected to a sandbox environment "Collaboration 10.5 Lab" over the VPN per supplied in the email.

 

Scenario as follows:

  • Local web server running on my machine
  • Demo jabber application is deployed to this local web server
  • Proxy configured to relay Jabber requests from my web server to sandbox
  • VPN sandbox connection established with CUPS in the environment

 

In the 'sandbox server view' I can see a server that suggests it looks like the CUPS host (hq-cups.abc.inc).

 

When I run the web application up and try to login I get an exception.

 

First issue is I don't have any user IDs for Jabber - documented suggests a set would be emailed to me but obviously not.

 

Secondly I'm unsure the configuration for the host is configured correctly:

 

Inside "basic-chat.html" I have:

var demoConfig = {

domain: "hq-cups.abc.inc", //the domain specified for your CUP server

httpBindingURL: "http://localhost:8080/httpbinding", //the BOSH url for your server

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

};

 

On my proxy I'm forwarding anything mathing 'httpbinding' to this endpoint:

http://hq-cups.abc.inc:7335/httpbinding

 

Am pretty certain the proxy is working because I can issue REST requests to a separate server we have on our site.

 

Appreciate any help here. As I've run out of things to try.

 

Regards,

Mark.

51 Replies 51

mark.kilby
Level 1
Level 1

OK - I found the user info...

1. Click instructions (top right)

2. Click "Pre-Provisioned User and Device Info" on the popup

Regards,

Mark.

OK - I may have found the route in to CUPS.

On the "DevNet Sandbox VPN Portal" page (where you land after logging in via the VPN) there is a list of servers, one of which is "Unified Presence". When clicking this you get a page "Installed Applications" with a link to "Cisco Unified Communications Manager IM and Presence". Looks promising, unfortunately my environment expired before I could investigate, something to pursue the next time I have access to the sandbox.

Hi Mark,

Looking at the system here, you still have a running 10.5 lab that is active. Can you login to the cloudshell and check on this?

Joe

Thanks Joe

Yes that is correct - but I just tried my VPN and the connection details seem not to work as they did when I first got them (perhaps they expire after a period). In which case I will request shorter timed environments.

Once I've reconnected I will try again.

I just spent some time proving my local proxy was working OK for HTTP POST - and it is. Therefore all requests should be capable of routing to CUPS.

The main thing I'm unsure about is whether I've put all the correct details in all the correct places for the demo.

Once i get connected again I will re-try, and post the details up on this thread.

Regards,

Mark.


Mark,

I will send you out new credentials to your email.

Joe

Actually, I just see you have booked a new lab so the credentials will be sent out to you directly. please ensure you have the lab booked long enough for your testing. you can extend through the portal.

Joe

Thanks Joe

I'm connected up to the VPN with with the collaboration sandbox.

The demo application still fails to login, can you help?

Here are my connection details:

Local proxy:

It matches URL /httpbinding and forwards it to http://10.10.20.17:7335/httpbinding

The IP address I got from the 'portal' for the CUPS service.

Am pretty confident my proxy is working OK, I can use it to proxy to some other REST APIs we have here sitting on servers on the internet.

Jabber JavaScript settings:

The domain I got from the CUPS icon (the spider diagram view):

            var demoConfig = {

                domain: "hq-cups.abc.inc", //the domain specified for your CUP server

                httpBindingURL: "http://localhost:8080/httpbinding", //the BOSH url for your server

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

            };

My web proxy is running on localhost:8080. As I said I think this is working fine.

Login Credentials

I got these from the spider diagram view (inside the instructions tab):

user01

cisco1234

Login Response

When I make the login request I get an exception in my proxy as per below. As you can see it says socket exception / permission denied.

Any help would be appreciated. Maybe I have got some configuration wrong somewhere.

Regards,

Mark.

Oct 08, 2014 6:23:37 PM org.apache.catalina.core.ApplicationContext log

INFO: cisco: proxy POST uri: /httpbinding -- http://10.10.20.17:7335/httpbinding

Oct 08, 2014 6:23:37 PM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet [cisco] in context with path [] threw exception

java.net.SocketException: Permission denied: connect

  at java.net.DualStackPlainSocketImpl.connect0(Native Method)

  at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)

  at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)

  at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)

  at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)

  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)

  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)

  at java.net.Socket.connect(Socket.java:579)

  at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)

  at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)

  at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)

  at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)

  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)

  at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)

  at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115)

  at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)

  at org.mitre.dsmiley.httpproxy.ProxyServlet.service(ProxyServlet.java:262)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)

  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)

  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)

  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)

  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)

  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)

  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)

  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)

  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

  at java.lang.Thread.run(Thread.java:722)

The exception above seems to be caused by:

sockets - Weird java.net.SocketException Permission Denied connect error when running Groovy in Intellij IDEA - Stack Ov…

Have applied the fix as above, but an exception still remains, is there some way to isolate what is at fault here?

Oct 08, 2014 8:26:05 PM org.apache.catalina.core.ApplicationContext log

INFO: cisco: proxy POST uri: /httpbinding -- http://10.10.20.17:7335/httpbinding

Oct 08, 2014 8:26:05 PM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet [cisco] in context with path [] threw exception

java.net.SocketException: Connection reset

  at java.net.SocketInputStream.read(SocketInputStream.java:189)

  at java.net.SocketInputStream.read(SocketInputStream.java:121)

  at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)

  at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)

  at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:273)

  at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)

  at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)

  at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)

  at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:283)

  at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:251)

  at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:197)

  at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)

  at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)

  at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:685)

  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:487)

  at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)

  at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115)

  at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)

Hi

I have established my local proxy is probably the issue here.

When I open http://10.10.20.17/httpbinding in a web browser I get this (which is good):

Cisco Systems, Inc.

HTTP Status 404 - /httpbinding

type: Status report

message: /httpbinding

description: The requested resource is not available.

But when I run it against my proxy I get an exception.

So I first must find a proxy solution that works and come back to this thread then (for some reason I cannot explain, the proxy that fails for Cisco Jabber works for another REST API we have here - a false positive it turns out).

Regards,

Mark.

Hi once again

OK I got another proxy set-up, using nginx on windows as per this document:

https://developer.cisco.com/site/collaboration/jabber/websdk/develop-and-test/im-and-presence/xmpp-deployment-guide/inde…

When I try to request http://localhost/httpbinding I get an error similar to my previous proxy. And this time the exception in the log is a little more descriptive:

2014/10/08 21:48:46 [error] 69904#64352: *5 WSARecv() failed (10054: An existing connection was forcibly closed by the remote host) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /httpbinding HTTP/1.1", upstream: "http://10.10.20.17:7335/httpbinding", host: "localhost"

It says the remote host (i.e. CUPS) closed the connection. So I would ask if anyone can spot what is wrong here as I seem to have set this up as per instructions. CUPS seems to give a correct response when a request goes direct, but when it goes via a proxy something goes wrong.

I have pretty much explored all avenues I can think of.

Any ideas?

Regards,

Mark.

Hi - still stuck with this and need to find a way around it. Any help would be appreciated. Seems we've set-up our environment as expected. Could something on the sandbox be blocking the proxy calls?

Regards,

Mark.

Mark,

Your reservation has run out. You will not be able to connect to any servers.

Can you book a new 10.5 lab and this time reserve it for 5 days or so?

Joe

Hi Joe

Will do this. Will be later today.

Regards, Mark.

Hi Joe

Sandbox has been requested again - five days duration.

Just connected via VPN.

Documentation says I should get an HTTP 200 OK response from the CUPS server but I do not, I get a 404 when requesting in the browser:

http://10.10.20.17/httpbinding

(response 404)

When go through nginx proxy the response indicates upstream server disconnected:

2014/10/11 02:52:04 [error] 85132#85992: *18 WSARecv() failed (10054: An existing connection was forcibly closed by the remote host) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /httpbinding HTTP/1.1", upstream: "http://10.10.20.17:7335/httpbinding", host: "localhost"

Do I have the wrong address for the CUPs server perhaps?

Any help is appreciated.

Regards,

Mark.