GitHub user merlimat opened a pull request:
https://github.com/apache/incubator-pulsar/pull/521
Fixed problem in starting ZK server for standalone mode
### Motivation
In 1.18 release there is a problem in starting the standalone broker.
```
$ bin/pulsar standalone
2017-06-22 17:15:11,865 - INFO - [main:LocalBookkeeperEnsemble@100] -
Running 1 bookie(s).
2017-06-22 17:15:11,893 - INFO - [main:LocalBookkeeperEnsemble@124] -
Starting ZK server
2017-06-22 17:15:11,960 - ERROR - [main:LocalBookkeeperEnsemble@142] -
Exception while instantiating ZooKeeper
java.lang.IllegalArgumentException: Collector already registered that
provides name: zookeeper_server_znode_count
at
io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:54)
at io.prometheus.client.Collector.register(Collector.java:128)
at io.prometheus.client.Collector.register(Collector.java:121)
at
com.yahoo.pulsar.zookeeper.ZooKeeperServerAspect.timedProcessRequest(ZooKeeperServerAspect.java:46)
at
org.apache.zookeeper.server.ZooKeeperServer.<init>(ZooKeeperServer.java:191)
at
org.apache.zookeeper.server.ZooKeeperServer.<init>(ZooKeeperServer.java:224)
at
com.yahoo.pulsar.zookeeper.LocalBookkeeperEnsemble.runZookeeper(LocalBookkeeperEnsemble.java:136)
at
com.yahoo.pulsar.zookeeper.LocalBookkeeperEnsemble.start(LocalBookkeeperEnsemble.java:228)
at
com.yahoo.pulsar.PulsarStandaloneStarter.start(PulsarStandaloneStarter.java:149)
at
com.yahoo.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:197)
2017-06-22 17:15:11,969 - INFO - [main:LocalBookkeeperEnsemble@300] -
server 127.0.0.1:2181 not up java.net.ConnectException: Connection refused
(Connection refused)
2017-06-22 17:15:12,220 - INFO - [main:LocalBookkeeperEnsemble@300] -
server 127.0.0.1:2181 not up java.net.ConnectException: Connection refused
(Connection refused)
2017-06-22 17:15:12,471 - INFO - [main:LocalBookkeeperEnsemble@300] -
server 127.0.0.1:2181 not up java.net.ConnectException: Connection refused
(Connection refused)
2017-06-22 17:15:12,727 - INFO - [main:LocalBookkeeperEnsemble@300] -
server 127.0.0.1:2181 not up java.net.ConnectException: Connection refused
(Connection refused)
```
For some reason this problem doesn't happen when compiling from source, but
just on the binary distribution.
### Modifications
Ensure metrics are registered only once in the process.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/merlimat/pulsar master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-pulsar/pull/521.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #521
----
commit db61ba35d371d42d5a351d84146aeae32104ced9
Author: Matteo Merli <[email protected]>
Date: 2017-06-23T00:12:46Z
Fixed problem in starting ZK server for standalone mode
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---