You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2020/05/21 06:44:37 UTC

[GitHub] [bookkeeper] lamber-ken opened a new pull request #2338: [BUG] Fix bookie port conflict when using LocalBookKeeper

lamber-ken opened a new pull request #2338:
URL: https://github.com/apache/bookkeeper/pull/2338


   ### Motivation
   
   When using `bin/bookkeeper localbookie 10`, always output following exception, and run failed.
   
   ```
   java.net.BindException: Address already in use
     at sun.nio.ch.Net.bind0(Native Method)
     at sun.nio.ch.Net.bind(Net.java:433)
     at sun.nio.ch.Net.bind(Net.java:425)
     at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
     at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:130)
     at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562)
     at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1358)
     at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501)
     at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486)
     at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019)
     at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:258)
     at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366)
     at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
     at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
     at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
     at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
     at java.lang.Thread.run(Thread.java:748)
   ```
   
   
   ### Changes
   
   Use `PortManager` to obtain available ports based on initialPort.


----------------------------------------------------------------
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] [bookkeeper] eolivelli commented on a change in pull request #2338: [BUG] Fix bookie port conflict when using LocalBookKeeper

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #2338:
URL: https://github.com/apache/bookkeeper/pull/2338#discussion_r432982175



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/util/PortManager.java
##########
@@ -18,36 +18,57 @@
  * under the License.
  *
  */
-package org.apache.bookkeeper.test;
+package org.apache.bookkeeper.util;

Review comment:
       Here you have moved the class




----------------------------------------------------------------
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] [bookkeeper] sijie merged pull request #2338: [BUG] Fix bookie port conflict when using LocalBookKeeper

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #2338:
URL: https://github.com/apache/bookkeeper/pull/2338


   


----------------------------------------------------------------
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] [bookkeeper] lamber-ken commented on pull request #2338: [BUG] Fix bookie port conflict when using LocalBookKeeper

Posted by GitBox <gi...@apache.org>.
lamber-ken commented on pull request #2338:
URL: https://github.com/apache/bookkeeper/pull/2338#issuecomment-634234216


   hi @sijie @eolivelli, please take a look, thanks


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