pulsar-manager
pulsar-manager copied to clipboard
Manager can't load the metric message from cluster
After I setup a manager to operate the cluster , I found that I only can get the metadata but no metrics.
Exception is found as below:
java.lang.IllegalArgumentException: Illegal character in scheme name at index 0: 10.2.51.154:8080/admin/v2/clusters/pulsar-cluster-1/failureDomains
at java.net.URI.create(URI.java:852) ~[na:1.8.0_111]
at org.apache.http.client.methods.HttpGet.<init>(HttpGet.java:66) ~[httpclient-4.5.5.jar!/:4.5.5]
at io.streamnative.pulsar.manager.utils.HttpUtil.doGet(HttpUtil.java:58) ~[classes!/:na]
at io.streamnative.pulsar.manager.service.impl.BrokersServiceImpl.getBrokersList(BrokersServiceImpl.java:42) ~[classes!/:na]
at io.streamnative.pulsar.manager.service.impl.BrokerStatsServiceImpl.collectStatsToDB(BrokerStatsServiceImpl.java:137) ~[classes!/:na]
at io.streamnative.pulsar.manager.service.impl.BrokerStatsServiceImpl.lambda$scheduleCollectStats$2(BrokerStatsServiceImpl.java:129) ~[classes!/:na]
at java.util.HashMap.forEach(HashMap.java:1288) ~[na:1.8.0_111]
at io.streamnative.pulsar.manager.service.impl.BrokerStatsServiceImpl.scheduleCollectStats(BrokerStatsServiceImpl.java:126) ~[classes!/:na]
at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) ~[spring-context-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
should i config some where ?
The reason for this problem is that the service URL is not prefixed with HTTP, and a judgment should be added. if the service URL provided by the user does not have an http prefix, the http prefix should be added automatically.
Temporary solution:
./bin/pulsar-admin clusters get cluster-name
./bin/pulsar-admin clusters update --url http://broker-ip:8080 cluster-name
Add http prefix to service url
as the temp idea, the system can be running OK , thanks
Move to 0.2.0
Move to 0.3.0