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 2020/05/27 03:46:54 UTC

[GitHub] [pulsar] abhilashmandaliya opened a new issue #7043: Pulsar Admin fails on creating a new topic if you have multiple hosts in a URL

abhilashmandaliya opened a new issue #7043:
URL: https://github.com/apache/pulsar/issues/7043


   **Describe the bug**
   When you have multiple pulsar brokers and try to create a topic via Java client using multi-host URL, it fails. My admin URL is as follow: `http://192.168.254.1:34099,192.168.254.1:34102`
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Run a pulsar cluster with at least 2 nodes
   2. Use a java client with multi-host admin URL to connect
   3. Invoke this code:
   `pulsarAdmin.topics().createPartitionedTopic("persistent://public/default/myTopic", 2);`
   You will get the following exception:
   `java.lang.NumberFormatException: For input string: "34065,192.168.254.1:34063"
   org.apache.pulsar.client.admin.PulsarAdminException: java.lang.NumberFormatException: For input string: "34065,192.168.254.1:34063"
   	at org.apache.pulsar.client.admin.internal.BaseResource.getApiException(BaseResource.java:228)
   	at org.apache.pulsar.client.admin.internal.BaseResource$1.failed(BaseResource.java:130)
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.JerseyInvocation$4.failed(JerseyInvocation.java:1030)
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.ClientRuntime.processFailure(ClientRuntime.java:231)
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.ClientRuntime.lambda$null$3(ClientRuntime.java:189)
   	at org.apache.pulsar.shade.org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
   	at org.apache.pulsar.shade.org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
   	at org.apache.pulsar.shade.org.glassfish.jersey.internal.Errors.process(Errors.java:316)
   	at org.apache.pulsar.shade.org.glassfish.jersey.internal.Errors.process(Errors.java:298)
   	at org.apache.pulsar.shade.org.glassfish.jersey.internal.Errors.process(Errors.java:268)
   	at org.apache.pulsar.shade.org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:312)
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.ClientRuntime.lambda$createRunnableForAsyncProcessing$4(ClientRuntime.java:163)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: java.lang.NumberFormatException: For input string: "34065,192.168.254.1:34063"
   	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
   	at java.lang.Integer.parseInt(Integer.java:580)
   	at java.lang.Integer.parseInt(Integer.java:615)
   	at org.apache.pulsar.shade.org.asynchttpclient.uri.UriParser.computeRegularHostPort(UriParser.java:216)
   	at org.apache.pulsar.shade.org.asynchttpclient.uri.UriParser.parseAuthority(UriParser.java:299)
   	at org.apache.pulsar.shade.org.asynchttpclient.uri.UriParser.parse(UriParser.java:358)
   	at org.apache.pulsar.shade.org.asynchttpclient.uri.Uri.create(Uri.java:67)
   	at org.apache.pulsar.shade.org.asynchttpclient.uri.Uri.create(Uri.java:62)
   	at org.apache.pulsar.shade.org.asynchttpclient.RequestBuilderBase.setUrl(RequestBuilderBase.java:147)
   	at org.apache.pulsar.shade.org.asynchttpclient.DefaultAsyncHttpClient.requestBuilder(DefaultAsyncHttpClient.java:294)
   	at org.apache.pulsar.shade.org.asynchttpclient.DefaultAsyncHttpClient.prepare(DefaultAsyncHttpClient.java:133)
   	at org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector.apply(AsyncHttpConnector.java:240)
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.ClientRuntime.lambda$null$3(ClientRuntime.java:187)
   	... 12 more`
   
   **Expected behaviour**
   Should not throw an exception and create a topic
   
   **System Information**
    - Docker version: 2.3.0.2 (45183)
    - Ubuntu image: Ubuntu 16.04.6 LTS (Xenial Xerus)
    - Pulsar version: 2.5.0
    - Pulsar Java Client version: 2.5.2


----------------------------------------------------------------
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.

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



[GitHub] [pulsar] abhilashmandaliya commented on issue #7043: Pulsar Admin fails on creating a new topic if you have multiple hosts in a URL

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


   > I can't reproduce it on 2.5.2 Java Client and master branch. Are there any other special configurations?
   
   nothing special. I will try again with the master branch 


----------------------------------------------------------------
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.

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



[GitHub] [pulsar] codelipenghui commented on issue #7043: Pulsar Admin fails on creating a new topic if you have multiple hosts in a URL

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


   I can't reproduce it on 2.5.2 Java Client and master branch. Are there any other special configurations?


----------------------------------------------------------------
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.

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