Intermittently Getting HostnameUnverifiedException in the Websocket program
-
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 -
Hi @shekharchauhan , Thank you for highlighting the issue. We have updated the SDK. Please install and try again.
-
@admin
updated the SDK but still issue is there. Though the exception is not there but it stays disconnected. Following is console outputonDisconnected
onConnected
onDisconnected -
Hi @shekharchauhan , we have resolved this issue. Please update Java SDK.