ActiveMQ Artemis 创建 Netty 连接失败
ActiveMQ Artemis failure to create Netty connection
我在 ActiveMQ Artemis 尝试建立 Netty 连接时失败。我正在显示下面的日志。我已经检查过主机是可解析的,它是。我的主机是一个 Kubernetes Pod,我是 运行 一组有状态的 4 pods
2022-04-11 09:46:30,441 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
2022-04-11 09:46:30,485 INFO [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=true,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2022-04-11 09:46:30,791 ERROR [org.apache.activemq.artemis.core.client] AMQ214016: Failed to create netty connection: java.net.UnknownHostException: eric-oss-jms-svc-amq-primary-1.eric-oss-jms-svc-amq-primary.liamtest.svc.cluster.local
at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:797) [java.base:]
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1505) [java.base:]
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1364) [java.base:]
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1298) [java.base:]
at java.base/java.net.InetAddress.getByName(InetAddress.java:1248) [java.base:]
at io.netty.util.internal.SocketUtils.run(SocketUtils.java:156) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.internal.SocketUtils.run(SocketUtils.java:153) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at java.base/java.security.AccessController.doPrivileged(Native Method) [java.base:]
at io.netty.util.internal.SocketUtils.addressByName(SocketUtils.java:153) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.DefaultNameResolver.doResolve(DefaultNameResolver.java:41) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:61) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:53) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:55) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:31) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.AbstractAddressResolver.resolve(AbstractAddressResolver.java:106) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:206) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.bootstrap.Bootstrap.access[=10=]0(Bootstrap.java:46) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.bootstrap.Bootstrap.operationComplete(Bootstrap.java:180) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.bootstrap.Bootstrap.operationComplete(Bootstrap.java:166) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetSuccess(AbstractChannel.java:1008) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:516) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.access0(AbstractChannel.java:429) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.run(AbstractChannel.java:486) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.run(SingleThreadEventExecutor.java:986) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.internal.ThreadExecutorMap.run(ThreadExecutorMap.java:74) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at org.apache.activemq.artemis.utils.ActiveMQThreadFactory.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.20.0.jar:]
这里的java.net.UnknownHostException
来自JVM本身:
java.base/java.net.InetAddress$CachedAddresses.get
Netty 或 ActiveMQ Artemis 对此无能为力。根据the JavaDoc,这个异常是:
Thrown to indicate that the IP address of a host could not be determined.
这个问题几乎可以肯定是环境问题,尽管从技术上讲它也可能是 JVM 中的错误。
我在 ActiveMQ Artemis 尝试建立 Netty 连接时失败。我正在显示下面的日志。我已经检查过主机是可解析的,它是。我的主机是一个 Kubernetes Pod,我是 运行 一组有状态的 4 pods
2022-04-11 09:46:30,441 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
2022-04-11 09:46:30,485 INFO [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=true,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2022-04-11 09:46:30,791 ERROR [org.apache.activemq.artemis.core.client] AMQ214016: Failed to create netty connection: java.net.UnknownHostException: eric-oss-jms-svc-amq-primary-1.eric-oss-jms-svc-amq-primary.liamtest.svc.cluster.local
at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:797) [java.base:]
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1505) [java.base:]
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1364) [java.base:]
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1298) [java.base:]
at java.base/java.net.InetAddress.getByName(InetAddress.java:1248) [java.base:]
at io.netty.util.internal.SocketUtils.run(SocketUtils.java:156) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.internal.SocketUtils.run(SocketUtils.java:153) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at java.base/java.security.AccessController.doPrivileged(Native Method) [java.base:]
at io.netty.util.internal.SocketUtils.addressByName(SocketUtils.java:153) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.DefaultNameResolver.doResolve(DefaultNameResolver.java:41) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:61) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:53) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:55) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:31) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.resolver.AbstractAddressResolver.resolve(AbstractAddressResolver.java:106) [netty-resolver-4.1.72.Final.jar:4.1.72.Final]
at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:206) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.bootstrap.Bootstrap.access[=10=]0(Bootstrap.java:46) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.bootstrap.Bootstrap.operationComplete(Bootstrap.java:180) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.bootstrap.Bootstrap.operationComplete(Bootstrap.java:166) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetSuccess(AbstractChannel.java:1008) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:516) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.access0(AbstractChannel.java:429) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.run(AbstractChannel.java:486) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) [netty-transport-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.run(SingleThreadEventExecutor.java:986) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at io.netty.util.internal.ThreadExecutorMap.run(ThreadExecutorMap.java:74) [netty-common-4.1.72.Final.jar:4.1.72.Final]
at org.apache.activemq.artemis.utils.ActiveMQThreadFactory.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.20.0.jar:]
这里的java.net.UnknownHostException
来自JVM本身:
java.base/java.net.InetAddress$CachedAddresses.get
Netty 或 ActiveMQ Artemis 对此无能为力。根据the JavaDoc,这个异常是:
Thrown to indicate that the IP address of a host could not be determined.
这个问题几乎可以肯定是环境问题,尽管从技术上讲它也可能是 JVM 中的错误。