You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Domenico Francesco Bruscino (Jira)" <ji...@apache.org> on 2020/11/30 09:00:25 UTC

[jira] [Commented] (ARTEMIS-3015) Netty NPE during initial connection

    [ https://issues.apache.org/jira/browse/ARTEMIS-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17240574#comment-17240574 ] 

Domenico Francesco Bruscino commented on ARTEMIS-3015:
------------------------------------------------------

I can't reproduce the issue using the following steps:

1) Create and start the master
{code:java}
./bin/artemis create master --user admin --password admin --allow-anonymous --clustered --cluster-password artemis --cluster-user artemis --data ../shared-store-data --shared-store --jdbc --host localhost --http-port 8161 --port-offset 0
./master/bin/artemis run
{code}

2) Create and start the slave
{code:java}
./bin/artemis create slave --user admin --password admin --allow-anonymous --clustered --cluster-password artemis --cluster-user artemis --data ../shared-store-data --shared-store --jdbc --host localhost --http-port 8162 --port-offset 1 --slave
./slave/bin/artemis run
{code}

3) Connect the core client
{code:java}
./bin/artemis producer --verbose --destination queue://TEST.QUEUE --user admin --password admin --protocol core --message-count 1 \
--url '(tcp://127.0.0.1:61616,tcp://127.0.0.1:61617)?ha=true&reconnectAttempts=-1&initialConnectAttempts=-1&consumerWindowSize=0'
{code}

> Netty NPE during initial connection
> -----------------------------------
>
>                 Key: ARTEMIS-3015
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3015
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 2.16.0
>            Reporter: Apache Dev
>            Priority: Major
>
> The following NPE was thrown by Netty during initial connection attempt, and connection was not retryed.
> Protocol used: Core.
>  URL: (tcp://10.6.6.80:61616,tcp://10.6.6.81:61616)?ha=true&reconnectAttempts=-1&initialConnectAttempts=-1&consumerWindowSize=0
>  Brokers: 2 (1 live + 1 backup with DB shared storage)
> 4 connections were created (approximately in parallel): 2 successful, 2 NPE
>  
> {code:java}
> Caused by: javax.jms.JMSException: Failed to create session factory
> 	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:886)
> 	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:299)
> 	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:294)
> 	at [ ...skipped... ]
> 	... 56 more
> Caused by: java.lang.NullPointerException
> 	at io.netty.util.internal.ObjectPool$RecyclerObjectPool$1.newObject(ObjectPool.java:77)
> 	at io.netty.util.Recycler.get(Recycler.java:177)
> 	at io.netty.util.internal.ObjectPool$RecyclerObjectPool.get(ObjectPool.java:84)
> 	at io.netty.channel.AbstractChannelHandlerContext$WriteTask.newInstance(AbstractChannelHandlerContext.java:1024)
> 	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:795)
> 	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758)
> 	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020)
> 	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:299)
> 	at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnection.write(NettyConnection.java:393)
> 	at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnection.write(NettyConnection.java:297)
> 	at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnection.write(NettyConnection.java:281)
> 	at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.sendHandshake(ActiveMQClientProtocolManager.java:440)
> 	at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.connect(ActiveMQClientProtocolManager.java:430)
> 	at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1380)
> 	at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:945)
> 	at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:834)
> 	at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:252)
> 	at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:268)
> 	at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:688)
> 	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:884)
> 	... 59 more
> {code}
> Live Broker logs:
> {code:java}
> org.apache.activemq.artemis.core.server  E AMQ224088: Timeout (10 seconds) on acceptor "artemis" during protocol handshake with /10.6.6.81:61164 has occurred.
> org.apache.activemq.artemis.core.server  E AMQ224088: Timeout (10 seconds) on acceptor "artemis" during protocol handshake with /10.6.6.81:61166 has occurred.
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)