gpt4 book ai didi

java - Azure 通知中心 java.net.ConnectException : Connection timed out: no further information

转载 作者:行者123 更新时间:2023-11-30 06:35:13 27 4
gpt4 key购买 nike

我正在尝试通过 Java 使用 Azure 通知中心。当尝试创建注册时,我收到 java.net.ConnectException: 连接超时:没有更多信息。有人可以帮助我理解为什么会出现这个问题吗?如果您需要更多信息,请告诉我。谢谢。

我使用从 https://github.com/Azure/azure-notificationhubs-java-backend/blob/master/NotificationHubs 找到的代码。

Jar文件版本如下:

httpclient - 4.3.1
httpcore - 4.3.1
httpcore-nio - 4.3.1

SyncCallback 类、方法中发生错误 - “失败”。异常跟踪如下。

java.lang.RuntimeException: java.net.ConnectException: Connection timed out: no further information
at com.org.utils.notifications.SyncCallback.failed(SyncCallback.java:41)
at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:130)
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.connectionRequestFailed(DefaultClientExchangeHandlerImpl.java:318)
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.access$100(DefaultClientExchangeHandlerImpl.java:63)
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl$1.failed(DefaultClientExchangeHandlerImpl.java:364)
at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:130)
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager$InternalPoolEntryCallback.failed(PoolingNHttpClientConnectionManager.java:474)
at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:130)
at org.apache.http.nio.pool.RouteSpecificPool.failed(RouteSpecificPool.java:165)
at org.apache.http.nio.pool.AbstractNIOConnPool.requestFailed(AbstractNIOConnPool.java:530)
at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.failed(AbstractNIOConnPool.java:778)
at org.apache.http.impl.nio.reactor.SessionRequestImpl.failed(SessionRequestImpl.java:154)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:175)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:147)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:349)
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:189)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.doExecute(CloseableHttpAsyncClientBase.java:67)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.access$000(CloseableHttpAsyncClientBase.java:38)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:57)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:173)
... 7 more

最佳答案

您可以找到此java.net.ConnectException:连接超时异常的一些原因。

  1. 您在项目中使用的系统端口的防火墙响了。检查您的 filewale 设置并取消阻止端口。

  2. IP/域或端口不正确。尝试使用 pingtelnet 命令检查连接。

  3. 可能是由于网速较慢或服务器未及时处理请求,或者可能是连接问题。

关于java - Azure 通知中心 java.net.ConnectException : Connection timed out: no further information,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45309012/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com