You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/28 17:40:32 UTC

[GitHub] [pulsar] eolivelli opened a new issue, #15375: [Transactions] NullPointerException during Java Client bootstrap

eolivelli opened a new issue, #15375:
URL: https://github.com/apache/pulsar/issues/15375

   **Describe the bug**
   I have seen this error, using 2.10.0 Java client, and the Java Client fails to create
   
   ```
   2022-04-28T16:52:57.1236246Z [javatest.batch] Caused by: org.apache.pulsar.client.api.PulsarClientException: org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException: org.apache.pulsar.clien
   t.api.PulsarClientException: java.util.concurrent.CompletionException: java.lang.NullPointerException
   2022-04-28T16:52:57.1237108Z [javatest.batch]   at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:208)
   2022-04-28T16:52:57.1237597Z [javatest.batch]   at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:141)
   2022-04-28T16:52:57.1238075Z [javatest.batch]   at org.apache.pulsar.client.impl.ClientBuilderImpl.build(ClientBuilderImpl.java:67)
   2022-04-28T16:52:57.1238655Z [javatest.batch]   at com.datastax.oss.pulsar.jms.PulsarConnectionFactory.ensureInitialized(PulsarConnectionFactory.java:360)
   2022-04-28T16:52:57.1239075Z [javatest.batch]   ... 17 more
   2022-04-28T16:52:57.1239709Z [javatest.batch] Caused by: org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.Co
   mpletionException: java.lang.NullPointerException
   2022-04-28T16:52:57.1240649Z [javatest.batch]   at org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException.unwrap(TransactionCoordinatorClientException.java:131)
   2022-04-28T16:52:57.1241483Z [javatest.batch]   at org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException.unwrap(TransactionCoordinatorClientException.java:129)
   2022-04-28T16:52:57.1242286Z [javatest.batch]   at org.apache.pulsar.client.impl.transaction.TransactionCoordinatorClientImpl.start(TransactionCoordinatorClientImpl.java:70)
   2022-04-28T16:52:57.1242913Z [javatest.batch]   at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:205)
   2022-04-28T16:52:57.1243238Z [javatest.batch]   ... 20 more
   2022-04-28T16:52:57.1243686Z [javatest.batch] Caused by: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: java.lang.NullPointerException
   2022-04-28T16:52:57.1244326Z [javatest.batch]   at org.apache.pulsar.client.impl.ConnectionHandler.handleConnectionError(ConnectionHandler.java:89)
   2022-04-28T16:52:57.1244919Z [javatest.batch]   at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:884)
   2022-04-28T16:52:57.1245444Z [javatest.batch]   at java.util.concurrent.CompletableFuture.uniExceptionallyStage(CompletableFuture.java:898)
   2022-04-28T16:52:57.1245976Z [javatest.batch]   at java.util.concurrent.CompletableFuture.exceptionally(CompletableFuture.java:2209)
   2022-04-28T16:52:57.1246490Z [javatest.batch]   at org.apache.pulsar.client.impl.ConnectionHandler.grabCnx(ConnectionHandler.java:74)
   2022-04-28T16:52:57.1247091Z [javatest.batch]   at org.apache.pulsar.client.impl.TransactionMetaStoreHandler.<init>(TransactionMetaStoreHandler.java:105)
   2022-04-28T16:52:57.1247794Z [javatest.batch]   at org.apache.pulsar.client.impl.transaction.TransactionCoordinatorClientImpl.lambda$startAsync$0(TransactionCoordinatorClientImpl.java:89)
   2022-04-28T16:52:57.1248456Z [javatest.batch]   at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995)
   2022-04-28T16:52:57.1248959Z [javatest.batch]   at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137)
   2022-04-28T16:52:57.1249595Z [javatest.batch]   at org.apache.pulsar.client.impl.transaction.TransactionCoordinatorClientImpl.startAsync(TransactionCoordinatorClientImpl.java:78)
   2022-04-28T16:52:57.1250441Z [javatest.batch]   at org.apache.pulsar.client.impl.transaction.TransactionCoordinatorClientImpl.start(TransactionCoordinatorClientImpl.java:68)
   2022-04-28T16:52:57.1250917Z [javatest.batch]   ... 21 more
   2022-04-28T16:52:57.1251269Z [javatest.batch] Caused by: java.util.concurrent.CompletionException: java.lang.NullPointerException
   2022-04-28T16:52:57.1251779Z [javatest.batch]   at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
   2022-04-28T16:52:57.1252302Z [javatest.batch]   at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
   2022-04-28T16:52:57.1252795Z [javatest.batch]   at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:673)
   2022-04-28T16:52:57.1253287Z [javatest.batch]   at java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:683)
   2022-04-28T16:52:57.1253768Z [javatest.batch]   at java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2010)
   2022-04-28T16:52:57.1254270Z [javatest.batch]   at org.apache.pulsar.client.impl.ConnectionHandler.grabCnx(ConnectionHandler.java:73)
   2022-04-28T16:52:57.1254624Z [javatest.batch]   ... 27 more
   2022-04-28T16:52:57.1254894Z [javatest.batch] Caused by: java.lang.NullPointerException
   2022-04-28T16:52:57.1255399Z [javatest.batch]   at org.apache.pulsar.client.impl.TransactionMetaStoreHandler.connectionOpened(TransactionMetaStoreHandler.java:121)
   2022-04-28T16:52:57.1256010Z [javatest.batch]   at org.apache.pulsar.client.impl.ConnectionHandler.lambda$grabCnx$0(ConnectionHandler.java:73)
   2022-04-28T16:52:57.1256510Z [javatest.batch]   at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:670)
   2022-04-28T16:52:57.1256835Z [javatest.batch]   ... 30 more
   ```
   
   **To Reproduce**
   I am not able to reproduce it consistently
   
   **Expected behavior**
   No error
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] congbobo184 commented on issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
congbobo184 commented on issue #15375:
URL: https://github.com/apache/pulsar/issues/15375#issuecomment-1148264898

   @eolivelli, what version of brokers?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] congbobo184 closed issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
congbobo184 closed issue #15375: [Transactions] NullPointerException during Java Client bootstrap
URL: https://github.com/apache/pulsar/issues/15375


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] eolivelli commented on issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #15375:
URL: https://github.com/apache/pulsar/issues/15375#issuecomment-1148294003

   I am not able to reproduce this problem consistently, in happens only while running a very long suite of tests that takes 2 hours on CI (it is the JMS TCK) and the problem happens only once over 800 PulsarClient creations.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] eolivelli commented on issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #15375:
URL: https://github.com/apache/pulsar/issues/15375#issuecomment-1148227341

   new stacktrace, based on 2.10
   
   > 2022-06-06T20:05:07.6976550Z [javatest.batch] 06-06-2022 20:05:07:  ERROR: javax.jms.JMSException: org.apache.pulsar.client.api.PulsarClientException: org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: java.lang.NullPointerException
   > 2022-06-06T20:05:07.6977572Z [javatest.batch] 	at com.datastax.oss.pulsar.jms.Utils.handleException(Utils.java:63)
   > 2022-06-06T20:05:07.6978201Z [javatest.batch] 	at com.datastax.oss.pulsar.jms.PulsarConnectionFactory.ensureInitialized(PulsarConnectionFactory.java:395)
   > 2022-06-06T20:05:07.6978935Z [javatest.batch] 	at com.datastax.oss.pulsar.jms.PulsarConnectionFactory.createConnection(PulsarConnectionFactory.java:472)
   > 2022-06-06T20:05:07.6979736Z [javatest.batch] 	at com.datastax.oss.pulsar.jms.PulsarConnectionFactory.createConnection(PulsarConnectionFactory.java:58)
   > 2022-06-06T20:05:07.6980360Z [javatest.batch] 	at com.sun.ts.tests.jms.common.JmsTool.createCommonQSetup(JmsTool.java:754)
   > 2022-06-06T20:05:07.6980842Z [javatest.batch] 	at com.sun.ts.tests.jms.common.JmsTool.<init>(JmsTool.java:288)
   > 2022-06-06T20:05:07.6981392Z [javatest.batch] 	at com.sun.ts.tests.jms.core20.appclient.jmscontextqueuetests.Client.setup(Client.java:153)
   > 2022-06-06T20:05:07.6981952Z [javatest.batch] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   > 2022-06-06T20:05:07.6982473Z [javatest.batch] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   > 2022-06-06T20:05:07.6983059Z [javatest.batch] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   > 2022-06-06T20:05:07.6983555Z [javatest.batch] 	at java.lang.reflect.Method.invoke(Method.java:498)
   > 2022-06-06T20:05:07.6983955Z [javatest.batch] 	at com.sun.ts.lib.harness.EETest.run(EETest.java:569)
   > 2022-06-06T20:05:07.6984443Z [javatest.batch] 	at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:115)
   > 2022-06-06T20:05:07.6984974Z [javatest.batch] 	at com.sun.ts.tests.common.vehicle.EmptyVehicleRunner.run(EmptyVehicleRunner.java:40)
   > 2022-06-06T20:05:07.6985493Z [javatest.batch] 	at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:105)
   > 2022-06-06T20:05:07.6985953Z [javatest.batch] 	at com.sun.ts.lib.harness.EETest.getPropsReady(EETest.java:486)
   > 2022-06-06T20:05:07.6986400Z [javatest.batch] 	at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:209)
   > 2022-06-06T20:05:07.6986833Z [javatest.batch] 	at com.sun.ts.lib.harness.EETest.run(EETest.java:285)
   > 2022-06-06T20:05:07.6987298Z [javatest.batch] 	at com.sun.ts.tests.common.vehicle.VehicleClient.main(VehicleClient.java:38)
   > 2022-06-06T20:05:07.6988304Z [javatest.batch] Caused by: org.apache.pulsar.client.api.PulsarClientException: org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: java.lang.NullPointerException
   > 2022-06-06T20:05:07.6989304Z [javatest.batch] 	at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:212)
   > 2022-06-06T20:05:07.6989856Z [javatest.batch] 	at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:145)
   > 2022-06-06T20:05:07.6990425Z [javatest.batch] 	at org.apache.pulsar.client.impl.ClientBuilderImpl.build(ClientBuilderImpl.java:67)
   > 2022-06-06T20:05:07.6991107Z [javatest.batch] 	at com.datastax.oss.pulsar.jms.PulsarConnectionFactory.ensureInitialized(PulsarConnectionFactory.java:380)
   > 2022-06-06T20:05:07.6991572Z [javatest.batch] 	... 17 more
   > 2022-06-06T20:05:07.6992324Z [javatest.batch] Caused by: org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: java.lang.NullPointerException
   > 2022-06-06T20:05:07.6993420Z [javatest.batch] 	at org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException.unwrap(TransactionCoordinatorClientException.java:131)
   > 2022-06-06T20:05:07.6994384Z [javatest.batch] 	at org.apache.pulsar.client.api.transaction.TransactionCoordinatorClientException.unwrap(TransactionCoordinatorClientException.java:129)
   > 2022-06-06T20:05:07.6995299Z [javatest.batch] 	at org.apache.pulsar.client.impl.transaction.TransactionCoordinatorClientImpl.start(TransactionCoordinatorClientImpl.java:74)
   > 2022-06-06T20:05:07.6996013Z [javatest.batch] 	at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:209)
   > 2022-06-06T20:05:07.6996404Z [javatest.batch] 	... 20 more
   > 2022-06-06T20:05:07.6996925Z [javatest.batch] Caused by: org.apache.pulsar.client.api.PulsarClientException: java.util.concurrent.CompletionException: java.lang.NullPointerException
   > 2022-06-06T20:05:07.6997815Z [javatest.batch] 	at org.apache.pulsar.client.impl.ConnectionHandler.handleConnectionError(ConnectionHandler.java:89)
   > 2022-06-06T20:05:07.6998472Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:884)
   > 2022-06-06T20:05:07.6999098Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.uniExceptionallyStage(CompletableFuture.java:898)
   > 2022-06-06T20:05:07.6999711Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.exceptionally(CompletableFuture.java:2209)
   > 2022-06-06T20:05:07.7000300Z [javatest.batch] 	at org.apache.pulsar.client.impl.ConnectionHandler.grabCnx(ConnectionHandler.java:74)
   > 2022-06-06T20:05:07.7000946Z [javatest.batch] 	at org.apache.pulsar.client.impl.TransactionMetaStoreHandler.<init>(TransactionMetaStoreHandler.java:108)
   > 2022-06-06T20:05:07.7001755Z [javatest.batch] 	at org.apache.pulsar.client.impl.transaction.TransactionCoordinatorClientImpl.lambda$startAsync$0(TransactionCoordinatorClientImpl.java:93)
   > 2022-06-06T20:05:07.7012540Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995)
   > 2022-06-06T20:05:07.7013354Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137)
   > 2022-06-06T20:05:07.7014134Z [javatest.batch] 	at org.apache.pulsar.client.impl.transaction.TransactionCoordinatorClientImpl.startAsync(TransactionCoordinatorClientImpl.java:82)
   > 2022-06-06T20:05:07.7015046Z [javatest.batch] 	at org.apache.pulsar.client.impl.transaction.TransactionCoordinatorClientImpl.start(TransactionCoordinatorClientImpl.java:72)
   > 2022-06-06T20:05:07.7015588Z [javatest.batch] 	... 21 more
   > 2022-06-06T20:05:07.7016001Z [javatest.batch] Caused by: java.util.concurrent.CompletionException: java.lang.NullPointerException
   > 2022-06-06T20:05:07.7016580Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
   > 2022-06-06T20:05:07.7017182Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
   > 2022-06-06T20:05:07.7017775Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:673)
   > 2022-06-06T20:05:07.7018349Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:683)
   > 2022-06-06T20:05:07.7018926Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2010)
   > 2022-06-06T20:05:07.7019490Z [javatest.batch] 	at org.apache.pulsar.client.impl.ConnectionHandler.grabCnx(ConnectionHandler.java:73)
   > 2022-06-06T20:05:07.7019901Z [javatest.batch] 	... 27 more
   > 2022-06-06T20:05:07.7020215Z [javatest.batch] Caused by: java.lang.NullPointerException
   > 2022-06-06T20:05:07.7020807Z [javatest.batch] 	at org.apache.pulsar.client.impl.TransactionMetaStoreHandler.connectionOpened(TransactionMetaStoreHandler.java:124)
   > 2022-06-06T20:05:07.7021510Z [javatest.batch] 	at org.apache.pulsar.client.impl.ConnectionHandler.lambda$grabCnx$0(ConnectionHandler.java:73)
   > 2022-06-06T20:05:07.7022091Z [javatest.batch] 	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:670)
   > 2022-06-06T20:05:07.7022467Z [javatest.batch] 	... 30 more


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] codelipenghui commented on issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #15375:
URL: https://github.com/apache/pulsar/issues/15375#issuecomment-1112779815

   @eolivelli Thanks, we will take a look.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] eolivelli commented on issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #15375:
URL: https://github.com/apache/pulsar/issues/15375#issuecomment-1140499141

   @codelipenghui do you have news? 
   I see this very frequently, especially when the user configures a wrong address


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] eolivelli commented on issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #15375:
URL: https://github.com/apache/pulsar/issues/15375#issuecomment-1148292825

   I have branch-2.10 broker and 2.10.0 client (from our DataStax fork, but the code is the same).
   
   This is the client
   https://github.com/datastax/pulsar/tree/ls210_0.4
   
   This is the broker
   https://github.com/datastax/pulsar/tree/ls210_0.1
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #15375:
URL: https://github.com/apache/pulsar/issues/15375#issuecomment-1140361048

   The issue had no activity for 30 days, mark with Stale label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] eolivelli commented on issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #15375:
URL: https://github.com/apache/pulsar/issues/15375#issuecomment-1160410017

   @congbobo184 this is my fix
   https://github.com/apache/pulsar/pull/16147


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] eolivelli commented on issue #15375: [Transactions] NullPointerException during Java Client bootstrap

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #15375:
URL: https://github.com/apache/pulsar/issues/15375#issuecomment-1112492321

   @congbobo184 @zymap @codelipenghui  you may be interested in this error


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org