Skip to content

Conversation

@merlimat
Copy link
Contributor

@merlimat merlimat commented Oct 4, 2018

Motivation

There are several tests that occasionally are failing with bind error. Eg. from LoadBalancerTest:

io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
	at io.netty.channel.unix.Errors.newIOException(Errors.java:122)
	at io.netty.channel.unix.Socket.bind(Socket.java:287)
	at io.netty.channel.epoll.AbstractEpollChannel.doBind(AbstractEpollChannel.java:687)
	at io.netty.channel.epoll.EpollServerSocketChannel.doBind(EpollServerSocketChannel.java:70)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:558)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1338)
	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:999)
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254)
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)

Modifications

  • Make sure the bookies in the ensemble will get each a port from PortManager so that the port is locked and not reused.

@merlimat merlimat added this to the 2.3.0 milestone Oct 4, 2018
@merlimat merlimat self-assigned this Oct 4, 2018
@merlimat
Copy link
Contributor Author

merlimat commented Oct 4, 2018

run integration tests

@merlimat
Copy link
Contributor Author

merlimat commented Oct 4, 2018

run integration tests

@sijie
Copy link
Member

sijie commented Oct 5, 2018

run integration tests

@merlimat merlimat merged commit 79dd772 into apache:master Oct 5, 2018
}

int bookiePort = initialPort + i;
int bookiePort = portManager.get();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@merlimat

int bookiePort = 0;

OS will automatically assign a free port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants