2019-04-07 10:25:25 UTC - Jochen Rau: @Jochen Rau has joined the channel
----
2019-04-08 02:41:47 UTC - young: I had set up a new pulsar cluster, and pass 
the test with pulsar-client command line tool, but when I tried to connect the 
pulsar cluster with java client, it didn't work.source code is simple:public 
class Client {

    private PulsarClient client;

    public Client() throws PulsarClientException {
        client = PulsarClient.builder()
                        .serviceUrl("<http://132.98.23.9:8080/>")
                .build();
    }
    public void Close() throws PulsarClientException {
        client.close();
    }
    public PulsarClient getPulsarClient(){
        return client;
    }
}
----
2019-04-08 02:48:56 UTC - Sanjeev Kulkarni: @young can you check if telnet 
132.98.23.9 8080 works?
----
2019-04-08 02:55:11 UTC - young: @Sanjeev Kulkarni telnet 132.98.23.9 8080 is 
OK, It was failed even though  run the test  on the local of  132.98.23.9.
----
2019-04-08 02:57:11 UTC - Sanjeev Kulkarni: try <pulsar://132.98.23.9:6650> 
instead of http
----
2019-04-08 03:41:56 UTC - young: I try <pulsar://132.98.23.9:650> instead of 
http , but it did not work too. Output messages: Apr 08, 2019 11:37:11 AM 
org.apache.pulsar.shade.io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider
 &lt;clinit&gt;
WARNING: Default DNS servers: [/2001:4860:4860:0:0:0:0:8888:53, 
/2001:4860:4860:0:0:0:0:8844:53] (Google Public DNS as a fallback)
----
2019-04-08 03:44:20 UTC - Sijie Guo: @young :

&gt; pass the test with pulsar-client command line tool,

where are you running the pulsar-client command?

second question, is “132.98.23.9” an ip address of a load balancer?
----
2019-04-08 03:52:42 UTC - young: @Sijie Guo "132.98.23.9" is one of the 
brokers, I try to run the pulsar-client command on the machine "132.98.23.9", 
and the other machine that not deploy broker, all is well.
----
2019-04-08 03:56:09 UTC - Sijie Guo: where are you running your java code?
----
2019-04-08 04:00:29 UTC - young: I package the java code to a jar file and try 
to running on the same machine, but it didn't work yet.
----
2019-04-08 04:06:24 UTC - Sijie Guo: @young what kind of exceptions were thrown 
when you run the java code? a detailed exception will help us identifying the 
problem.
----
2019-04-08 06:11:29 UTC - young: @Sijie Guo output message is this and hang:Apr 
08, 2019 1:00:22 PM 
org.apache.pulsar.shade.io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider
 &lt;clinit&gt;
WARNING: Default DNS servers: [/2001:4860:4860:0:0:0:0:8888:53, 
/2001:4860:4860:0:0:0:0:8844:53] (Google Public DNS as a fallback)
----
2019-04-08 06:18:31 UTC - young: And if running on the other machine  where is 
not deploy broker , the exception messages output and the program  go to  end 
:Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NumberFormatException: null
        at java.lang.Integer.parseInt(Integer.java:542)
        at java.lang.Integer.parseInt(Integer.java:615)
        at 
org.apache.pulsar.shade.org.asynchttpclient.config.AsyncHttpClientConfigHelper$Config.getInt(AsyncHttpClientConfigHelper.java:85)
        at 
org.apache.pulsar.shade.org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultMaxRedirects(AsyncHttpClientConfigDefaults.java:134)
        at 
org.apache.pulsar.shade.org.asynchttpclient.DefaultAsyncHttpClientConfig$Builder.&lt;init&gt;(DefaultAsyncHttpClientConfig.java:670)
        at 
org.apache.pulsar.client.impl.HttpClient.&lt;init&gt;(HttpClient.java:79)
        at 
org.apache.pulsar.client.impl.HttpClient.&lt;init&gt;(HttpClient.java:68)
        at 
org.apache.pulsar.client.impl.HttpLookupService.&lt;init&gt;(HttpLookupService.java:59)
        at 
org.apache.pulsar.client.impl.PulsarClientImpl.&lt;init&gt;(PulsarClientImpl.java:119)
        at 
org.apache.pulsar.client.impl.PulsarClientImpl.&lt;init&gt;(PulsarClientImpl.java:105)
        at 
org.apache.pulsar.client.impl.PulsarClientImpl.&lt;init&gt;(PulsarClientImpl.java:101)
        at 
org.apache.pulsar.client.impl.ClientBuilderImpl.build(ClientBuilderImpl.java:61)
        at gisdemo.Client.&lt;init&gt;(Client.java:16)
        at gisdemo.MessageConsumer.&lt;init&gt;(MessageConsumer.java:18)
        at gisdemo.MessageConsumer.main(MessageConsumer.java:62)
        ... 5 more
----
2019-04-08 08:54:08 UTC - Martin Ashby: Cool thanks, I guess I should be 
looking at the bookkeeper documentation for backups :+1:
----

Reply via email to