Istvan Toth created OMID-247:
--------------------------------
Summary: Change TSO default port to be outside the ephemeral range
Key: OMID-247
URL: https://issues.apache.org/jira/browse/OMID-247
Project: Phoenix Omid
Issue Type: Bug
Reporter: Istvan Toth
The default TSO port, 54758 is in the epehemarl port range of every OS.
This can cause TSO server to randomly error out on startup with an error
similar to the following:
{noformat}
Exception in thread "Thread-5" java.lang.IllegalStateException: Expected the
service TSOServer [FAILED] to be TERMINATED, but the service has FAILED
at
org.apache.phoenix.thirdparty.com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:366)
at
org.apache.phoenix.thirdparty.com.google.common.util.concurrent.AbstractService.awaitTerminated(AbstractService.java:329)
at
org.apache.phoenix.thirdparty.com.google.common.util.concurrent.AbstractIdleService.awaitTerminated(AbstractIdleService.java:175)
at org.apache.omid.tso.TSOServer$2.run(TSOServer.java:137)
Caused by: org.apache.omid.tso.LeaseManagement$LeaseManagementException: Error
initializing Lease Manager
at
org.apache.omid.tso.VoidLeaseManager.startService(VoidLeaseManager.java:38)
at org.apache.omid.tso.TSOServer.startUp(TSOServer.java:102)
at
org.apache.phoenix.thirdparty.com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:60)
at
org.apache.phoenix.thirdparty.com.google.common.util.concurrent.Callables$4.run(Callables.java:119)
at java.lang.Thread.run(Thread.java:748)
Caused by: 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:134)
at
io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:550)
at
io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
at
io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
at
io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
at
io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:248)
at
io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
at
io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
... 1 more{noformat}
The only way to fix this is to change the default port number to be outside the
ephemeral range.
Anything under 32K seems to be safe.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)