Skip to Content
avatar image
Former Member

Publishing Data to Streaming Projects using Websockets 503 Error

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)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    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();
        });
    }
    
    
    
    Add comment
    10|10000 characters needed 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.

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

    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();

    }); }

    Add comment
    10|10000 characters needed characters exceeded