Skip to Content
0

Publishing Data to Streaming Projects using Websockets 503 Error

Oct 25, 2016 at 02:53 AM

127

avatar image
Former Member

how do i solve this?

javax.websocket.DeploymentException: Handshake error. at org.glassfish.tyrus.client.ClientManager$3$1.run(ClientManager.java:636) at org.glassfish.tyrus.client.ClientManager$3.run(ClientManager.java:673) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:826) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:496) at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:366) at com.abeam.iot.WebSocketClientMain.main(WebSocketClientMain.java:57) Caused by: org.glassfish.tyrus.client.RetryAfterException: HTTP Status code 503 - Service Unavailable. at org.glassfish.tyrus.client.TyrusClientEngine.processResponse(TyrusClientEngine.java:415) at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleHandshake(GrizzlyClientFilter.java:343)

10 |10000 characters needed characters left characters exceeded

Can you share the initial code which did not work?

It helps SAP Community members to learn from you.

Regards,

Masa / SAP Technology RIG

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Oct 26, 2016 at 03:37 AM
0

we resolved.

var WebSocket = require('ws');


    var url = "ws://vhcalhdbdb.wdf.sap.corp:9092/publish/default/adp?basic-authorization=XXXXXXXXXXXXXXXX";
    var client = new WebSocket(url);
    
    client.on('open', function() {


        s = 'msg';
       
        client.send(s);
        client.close();
    });
}


Show 1 Share
10 |10000 characters needed characters left characters exceeded

Good to hear that you have this working.

Are you intentionally using the Web Service Provider ("WSP") instead of the Streaming Web Service ("SWS")? While the WSP does support websocket connections, it does not provide the same scalability that the newer SWS provides.

0
avatar image
Former Member Oct 26, 2016 at 03:36 AM
0
,

we resolved.

var WebSocket = require('ws');

var url = "ws://vhcalhdbdb.wdf.sap.corp:9092/publish/default/adp?basic-authorization=XXXXXXXXXXXXXXXX";

var client = new WebSocket(url);

client.on('open', function() {

s = 'msg'; client.send(s); client.close();

}); }

Share
10 |10000 characters needed characters left characters exceeded