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 2019/03/18 09:34:41 UTC

[GitHub] [pulsar] murong00 opened a new issue #3851: java.net.BindException when starting broker via the config initialized in cluster metadata

murong00 opened a new issue #3851: java.net.BindException when starting broker via the config initialized in cluster metadata
URL: https://github.com/apache/pulsar/issues/3851
 
 
   **Describe the bug**
   Someone may change the port of service urls via `initialize-cluster-metadata` following the [Deploying a Pulsar instance](https://pulsar.apache.org/docs/en/deploy-bare-metal/) guide when the default ports (e.g. `8080`) have been already used:
   ```
   $ bin/pulsar initialize-cluster-metadata \
     --cluster pulsar-cluster-test \
     --zookeeper localhost:2181 \
     --configuration-store localhost:2181 \
     --web-service-url http://localhost:8181 \
     --web-service-url-tls https://localhost:8443 \
     --broker-service-url pulsar://localhost:6656 \
     --broker-service-url-tls pulsar+ssl://localhost:6651
   ```
   However, when trying to start a broker after initializing the above cluster metadata, it results in the following Exception:
   ```
   13:50:37.308 [main] ERROR org.apache.pulsar.PulsarBrokerStarter - Failed to start pulsar service.
   org.apache.pulsar.broker.PulsarServerException: org.apache.pulsar.broker.PulsarServerException: java.net.BindException: Address already in use
           at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:448) ~[org.apache.pulsar-pulsar-broker-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
           at org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.start(PulsarBrokerStarter.java:239) ~[org.apache.pulsar-pulsar-broker-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
           at org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:293) [org.apache.pulsar-pulsar-broker-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
   Caused by: org.apache.pulsar.broker.PulsarServerException: java.net.BindException: Address already in use
           at org.apache.pulsar.broker.web.WebService.start(WebService.java:192) ~[org.apache.pulsar-pulsar-broker-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
           at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:427) ~[org.apache.pulsar-pulsar-broker-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
           ... 2 more
   Caused by: java.net.BindException: Address already in use
           at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_112]
           at sun.nio.ch.Net.bind(Net.java:433) ~[?:1.8.0_112]
           at sun.nio.ch.Net.bind(Net.java:425) ~[?:1.8.0_112]
           at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[?:1.8.0_112]
           at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[?:1.8.0_112]
           at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339) ~[org.eclipse.jetty-jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830]
           at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307) ~[org.eclipse.jetty-jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830]
           at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~[org.eclipse.jetty-jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830]
           at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235) ~[org.eclipse.jetty-jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830]
           at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[org.eclipse.jetty-jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830]
           at org.eclipse.jetty.server.Server.doStart(Server.java:395) ~[org.eclipse.jetty-jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830]
           at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[org.eclipse.jetty-jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830]
   ```

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


With regards,
Apache Git Services