not able to connect to wsfeeds.angelbroking.com:443
-
@admin
while connecting to wsfeeds.angelbroking.com:443 I am getting below error at this line tickerProvider.connect();com.neovisionaries.ws.client.WebSocketException: F`ailed to connect to 'wsfeeds.angelbroking.com:443': Connection timed out: connect
at com.neovisionaries.ws.client.SocketConnector.connectSocket(SocketConnector.java:127)
at com.neovisionaries.ws.client.SocketConnector.doConnect(SocketConnector.java:239)
at com.neovisionaries.ws.client.SocketConnector.connect(SocketConnector.java:190)
at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2351)
at com.angelbroking.smartapi.ticker.SmartAPITicker.connect(SmartAPITicker.java:288)
at com.tradewithpivots.algotrade.services.StreamingService.tickerUsage(StreamingService.java:70)
at com.tradewithpivots.algotrade.services.StreamingService.getStream(StreamingService.java:34)
at com.tradewithpivots.algotrade.startup.Onload.loadSymbols(Onload.java:23)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMethod.invoke(InitDestroyAnnotationBeanPostProcessor.java:457)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:401)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:219)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1762)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:436)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
at com.tradewithpivots.algotrade.AlgoTradingApplication.main(AlgoTradingApplication.java:10)
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:588)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
at com.neovisionaries.ws.client.SocketInitiator$SocketRacer.run(SocketInitiator.java:126) -
I am also facing this issue
Failed to connect to 'wsfeeds.angelbroking.com:443': Operation timed out -
hi @dipeshbodas
Kindly reverifying the issue with below function and let us know if connection timeout still occurs.
public void smartStreamTicker(String clientId, String feedtoken, SmartStreamListener smartStreamListener,Integer delay,Integer period) throws WebSocketException {
SmartStreamTicker smartStreamTicker = new SmartStreamTicker(clientId,feedtoken,smartStreamListener,delay,period);
smartStreamTicker.connect();
}
smartStreamTicker(clientId, feedToken, smartStreamListener,10,10);Regards,
SmartAPI team -
Hi @dipeshbodas
We are reverifying on the issue. Will update you for the same.
Regards,
SmartAPI team -
@Moderator_2
@Moderator_1
@admin
I have already said I am using latest SDK
<dependency>
<groupId>com.angelbroking.smartapi</groupId>
<artifactId>smartapi-java</artifactId>
<version>2.2.3</version>
</dependency>Is there any other version availabale ?
-
Hi @dipeshbodas
We have fixed the timeout issue on our SDK. Kindly update from the recent version and let us know if the issue still occurs
Regards,
SmartAPI team -
@Moderator_2
@Moderator_1
@admin
can someone please look into this issue ? It has been too long -
@Moderator_2
com.neovisionaries.ws.client.WebSocketException: Failed to connect to 'wsfeeds.angelbroking.com:443': Connection timed out: connectstill the same error. I am using latest SDK
<dependency>
<groupId>com.angelbroking.smartapi</groupId>
<artifactId>smartapi-java</artifactId>
<version>2.2.3</version>
</dependency> -
Hello Sir, I'm working on the same java api, I downloaded latest jar from github dist.
I am getting similar kind of error now. I am integrating it for the first time. Can you please help it? I am able to generate totp, get client profile, but on tickerusage() it shows the error.
com.neovisionaries.ws.client.WebSocketException: Failed to connect to 'wsfeeds.angelbroking.com:443': Operation timed out
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 Examples.tickerUsage(Examples.java:366)
at Examples.main(Examples.java:577)
Caused by: java.net.ConnectException: Operation timed out
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:588)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
at com.neovisionaries.ws.client.SocketInitiator$SocketRacer.run(SocketInitiator.java:126)
Feb 14, 2024 6:08:22 PM Examples tickerUsage -
Hi @dipeshbodas
Apologies for the delayed response.
We have resolved the connection timeout on the JAVA SDK. Kindly reverify if the issue still occurs.Regards,
SmartAPI team