You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Pawel (JIRA)" <ji...@apache.org> on 2018/10/16 12:17:00 UTC
[jira] [Commented] (ARTEMIS-2115) Artemis cluster connection throws
NPE inside Docker
[ https://issues.apache.org/jira/browse/ARTEMIS-2115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16651587#comment-16651587 ]
Pawel commented on ARTEMIS-2115:
--------------------------------
I've performed some addtitional tests. With internal Docker network everything works as expected. I suppose, that there is problem with NAT mechanism (when server announces anothere address, that visible outside container)
> Artemis cluster connection throws NPE inside Docker
> ---------------------------------------------------
>
> Key: ARTEMIS-2115
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2115
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.6.3
> Reporter: Pawel
> Priority: Minor
>
> If we run Artemis inside Docker container, cluster connection throws NPEs like:
> {noformat}
> 2018-10-09 13:07:42,846 WARN [org.apache.activemq.artemis.core.client] AMQ212007: connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.: java.lang.NullPointerException
> at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:800) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1046) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1086) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1297) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:901) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:797) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.reconnectSessions(ClientSessionFactoryImpl.java:746) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.failoverOrReconnect(ClientSessionFactoryImpl.java:616) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:506) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:499) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.access$100(ClientSessionFactoryImpl.java:72) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$1.run(ClientSessionFactoryImpl.java:362) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66) [artemis-commons-2.6.3.jar:2.6.3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_171]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_171]
> at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.6.3.jar:2.6.3]
> 2018-10-09 13:07:44,689 INFO [org.apache.activemq.artemis.core.server] AMQ221025: Replication: sending AIOSequentialFile:/var/lib/artemis/./data/journal/activemq-data-2.amq (size=10,485,760) to replica.
> 2018-10-09 13:07:44,871 WARN [org.apache.activemq.artemis.core.client] AMQ212007: connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.: java.lang.NullPointerException
> at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:800) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1046) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1086) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1297) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:901) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:797) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.reconnectSessions(ClientSessionFactoryImpl.java:746) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.failoverOrReconnect(ClientSessionFactoryImpl.java:616) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:506) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:499) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.access$100(ClientSessionFactoryImpl.java:72) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$1.run(ClientSessionFactoryImpl.java:362) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66) [artemis-commons-2.6.3.jar:2.6.3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_171]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_171]
> at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.6.3.jar:2.6.3]
> 2018-10-09 13:07:44,978 INFO [org.apache.activemq.artemis.core.server] AMQ221025: Replication: sending NIOSequentialFile /var/lib/artemis/./data/bindings/activemq-bindings-3.bindings (size=1,048,576) to replica.
> 2018-10-09 13:07:45,018 INFO [org.apache.activemq.artemis.core.server] AMQ221025: Replication: sending NIOSequentialFile /var/lib/artemis/./data/bindings/activemq-bindings-2.bindings (size=1,048,576) to replica.
> 2018-10-09 13:07:47,787 WARN [org.apache.activemq.artemis.core.client] AMQ212007: connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.: java.lang.NullPointerException
> at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:800) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1046) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1086) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1297) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:901) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:797) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.reconnectSessions(ClientSessionFactoryImpl.java:746) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.failoverOrReconnect(ClientSessionFactoryImpl.java:616) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:506) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:499) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connectionException(ClientSessionFactoryImpl.java:370) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector$Listener$2.run(NettyConnector.java:1073) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66) [artemis-commons-2.6.3.jar:2.6.3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_171]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_171]
> at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.6.3.jar:2.6.3]
> 2018-10-09 13:07:50,725 WARN [org.apache.activemq.artemis.core.client] AMQ212007: connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.: java.lang.NullPointerException
> at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:800) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1046) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1086) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1297) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:901) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:797) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.reconnectSessions(ClientSessionFactoryImpl.java:746) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.failoverOrReconnect(ClientSessionFactoryImpl.java:616) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:506) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:499) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connectionException(ClientSessionFactoryImpl.java:370) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector$Listener$2.run(NettyConnector.java:1073) [artemis-core-client-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.6.3.jar:2.6.3]
> at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66) [artemis-commons-2.6.3.jar:2.6.3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_171]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_171]
> at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.6.3.jar:2.6.3]
> 2018-10-09 13:07:56,385 WARN [org.apache.activemq.artemis.core.client] AMQ212007: connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.: java.lang.NullPointerException
> 2018-10-09 13:08:00,228 WARN [org.apache.activemq.artemis.core.client] AMQ212007: connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.: java.lang.NullPointerException
> {noformat}
> How to reproduce:
> 1) Dwonload [https://raw.githubusercontent.com/apache/activemq-artemis/master/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server0/broker.xml] to /tmp/broker1.xml
> 2) Change block:
> {code:java}
> <connectors>
> <connector name="netty-connector">tcp://localhost:61616</connector>
> <!-- connector to the server1 -->
> <connector name="server1-connector">tcp://localhost:61617</connector>
> </connectors>
> <!-- Acceptors -->
> <acceptors>
> <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
> </acceptors>
> {code}
> to
> {code:java}
> <connectors>
> <connector name="netty-connector">tcp://172.17.0.1:61616</connector>
> <!-- connector to the server1 -->
> <connector name="server1-connector">tcp://172.17.0.1:61617</connector>
> </connectors>
> <!-- Acceptors -->
> <acceptors>
> <acceptor name="netty-acceptor">tcp://0.0.0.0:61616</acceptor>
> </acceptors>
> {code}
> 3) Download
> [https://raw.githubusercontent.com/apache/activemq-artemis/master/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server1/broker.xml] to /tmp/broker2.xml
>
> 4) Replace block:
> {code:java}
> <!-- Connectors -->
> <connectors>
> <connector name="netty-connector">tcp://localhost:61617</connector>
> <!-- connector to the server0 -->
> <connector name="server2-connector">tcp://localhost:61618</connector>
> </connectors>
> <!-- Acceptors -->
> <acceptors>
> <acceptor name="netty-acceptor">tcp://localhost:61617</acceptor>
> </acceptors>
> {code}
> with:
> {code:java}
> <!-- Connectors -->
> <connectors>
> <connector name="netty-connector">tcp://172.17.0.1:61617</connector>
> <!-- connector to the server0 -->
> <connector name="server2-connector">tcp://172.17.0.1:61618</connector>
> </connectors>
> <!-- Acceptors -->
> <acceptors>
> <acceptor name="netty-acceptor">tcp://0.0.0.0:61617</acceptor>
> </acceptors>
> {code}
> 4) Run:
> {code:java}
> docker run -v /tmp/broker1.xml:/var/lib/artemis/etc/broker.xml --ti --rm --name artemis1 -p 61616:61616 -p 8161:8161 -e ARTEMIS_USERNAME=admin -e ARTEMIS_PASSWORD=admin mirror-hub.docker.tech.lastmile.com/vromero/activemq-artemis:2.6.3-alpine
> {code}
> 5) Run
> {code:java}
> docker run -v /tmp/broker2.xml:/var/lib/artemis/etc/broker.xml -ti --rm --name artemis2 -p 61617:61617 -p 8162:8161 -e ARTEMIS_USERNAME=admin -e ARTEMIS_PASSWORD=admin mirror-hub.docker.tech.lastmile.com/vromero/activemq-artemis:2.6.3-alpine{code}
> 6) artemis1 will throw mentioned exceptions
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)