Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Intermittently Getting HostnameUnverifiedException in the Websocket program

    NodeJS SDK
    2
    4
    50
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tomatoailis last edited by

      Websocket connection works fine for some times, get ticks successfully for sometime but it gets disconnected after a while with below exception. it don't reconnect again . Can you please help to get it fixed ,


      com.neovisionaries.ws.client.HostnameUnverifiedException: The certificate of the peer does not match the expected hostname (omnefeeds.angelbroking.com)
      onError: The certificate of the peer does not match the expected hostname (omnefeeds.angelbroking.com)
      at com.neovisionaries.ws.client.SocketConnector.verifyHostname(SocketConnector.java:171)
      at com.neovisionaries.ws.client.SocketConnector.doConnect(SocketConnector.java:126)
      at com.neovisionaries.ws.client.SocketConnector.connect(SocketConnector.java:83)
      at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2152)
      at com.angelbroking.smartapi.ticker.SmartAPITicker.connect(SmartAPITicker.java:222)
      at com.angelbroking.smartapi.ticker.SmartAPITicker.reconnect(SmartAPITicker.java:379)
      at com.angelbroking.smartapi.ticker.SmartAPITicker.doReconnect(SmartAPITicker.java:124)
      at com.angelbroking.smartapi.ticker.SmartAPITicker$1.run(SmartAPITicker.java:97)
      at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
      at java.base/java.util.TimerThread.run(Timer.java:506)
      com.neovisionaries.ws.client.HostnameUnverifiedException: The certificate of the peer does not match the expected hostname (omnefeeds.angelbroking.com)
      at com.neovisionaries.ws.client.SocketConnector.verifyHostname(SocketConnector.java:171)
      at com.neovisionaries.ws.client.SocketConnector.doConnect(SocketConnector.java:126)
      at com.neovisionaries.ws.client.SocketConnector.connect(SocketConnector.java:83)
      at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2152)
      at com.angelbroking.smartapi.ticker.SmartAPITicker.connect(SmartAPITicker.java:222)
      at com.angelbroking.smartapi.ticker.SmartAPITicker.reconnect(SmartAPITicker.java:379)
      at com.angelbroking.smartapi.ticker.SmartAPITicker.doReconnect(SmartAPITicker.java:124)
      at com.angelbroking.smartapi.ticker.SmartAPITicker$1.run(SmartAPITicker.java:97)
      at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
      at java.base/java.util.TimerThread.run(Timer.java:506)
      onE

      A 1 Reply Last reply Reply Quote 0
      • A
        admin @tomatoailis last edited by

        Hi @shekharchauhan , we have resolved this issue. Please update Java SDK.

        T 1 Reply Last reply Reply Quote 0
        • T
          tomatoailis @admin last edited by

          @admin
          updated the SDK but still issue is there. Though the exception is not there but it stays disconnected. Following is console output

          onDisconnected
          onConnected
          onDisconnected

          A 1 Reply Last reply Reply Quote 0
          • A
            admin @tomatoailis last edited by admin

            Hi @shekharchauhan , Thank you for highlighting the issue. We have updated the SDK. Please install and try again.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post