com.neovisionaries.ws.client.WebSocketException: Failed to connect to 'wsfeeds.angelbroking.com:443': Connection timed out: connect


  • com.neovisionaries.ws.client.WebSocketException: Failed to connect to 'wsfeeds.angelbroking.com:443': Connection timed out: connect
    at com.neovisionaries.ws.client.SocketConnector.connectSocket(SocketConnector.java:126)
    at com.neovisionaries.ws.client.SocketConnector.doConnect(SocketConnector.java:238)
    at com.neovisionaries.ws.client.SocketConnector.connect(SocketConnector.java:189)
    at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2351)
    at com.angelbroking.smartapi.ticker.SmartAPITicker.connect(SmartAPITicker.java:288)
    at octops.TOTP.tickerUsage(TOTP.java:75)
    at octops.TOTP.main(TOTP.java:45)
    Caused by: java.net.ConnectException: Connection timed out: connect
    at java.base/sun.nio.ch.Net.connect0(Native Method)
    at java.base/sun.nio.ch.Net.connect(Net.java:579)
    at java.base/sun.nio.ch.Net.connect(Net.java:568)
    at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:576)
    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
    at java.base/java.net.Socket.connect(Socket.java:666)
    at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
    at com.neovisionaries.ws.client.SocketInitiator$SocketRacer.run(SocketInitiator.java:126)
    false


  • Hello @Moderator_2 @Rajen @Rishab @pavi-jun2

    I just started using Websocket using Java SDK and got the same error.
    I'm using a 2.2.1 jar, could you please let me know, how to resolve it.
    Thanks in advance.


  • hi Team,

    Getting the same error.

    com.neovisionaries.ws.client.WebSocketException: Failed to connect to 'wsfeeds.angelbroking.com:443': Connection timed out: connect

    Does it work only during Market hours?

    I am using Java 21.

    Regards,
    Pavithra


  • @Moderator_2 Hello sir, I am using smartapi-java-2.2.1.jar from the github repository.

    I am able to login, to get profile details and the rms details.

    When I am calling the tickerUsage() function as shown in Examples.java, I am getting this timeout error.


  • Hi @Rajen

    We have fixed Connection Timeout issue on Java SDK. Please let us which jar version is being consumed from your end.

    Regards,
    SmartAPI team


  • Hello Sir,

    Is there any solution to the issue ? I started to integrate the Java sdk and receiving the same error.


  • Hi @Rishab

    Apologies for inconvenience caused.
    We are checking on this issue. Will update as soon as possible.

    Thanks & Regards,
    SmartAPI team