[ 
https://issues.apache.org/jira/browse/HBASE-14171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16269248#comment-16269248
 ] 

Bar Rotstein commented on HBASE-14171:
--------------------------------------

i will add tests but currently it seems like the thrift server shutsdown on 
both thrift and http mode if the port is already used.


{code:java}
2017-11-28 20:43:39,484 FATAL [ThriftServer-httpServer] 
thrift.ThriftServerRunner$1(384): Cannot run ThriftServer
org.apache.thrift.transport.TTransportException: Could not create ServerSocket 
on address /0.0.0.0:49689.
        at 
org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:109)
        at 
org.apache.hadoop.hbase.thrift.ThriftServerRunner.setupServer(ThriftServerRunner.java:640)
        at 
org.apache.hadoop.hbase.thrift.ThriftServerRunner.access$500(ThriftServerRunner.java:147)
        at 
org.apache.hadoop.hbase.thrift.ThriftServerRunner$1.run(ThriftServerRunner.java:380)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1726)
        at 
org.apache.hadoop.hbase.thrift.ThriftServerRunner.run(ThriftServerRunner.java:370)
        at 
org.apache.hadoop.hbase.thrift.ThriftServer.doMain(ThriftServer.java:106)
        at 
org.apache.hadoop.hbase.thrift.TestThriftUsedPortShutdown$2.run(TestThriftUsedPortShutdown.java:114)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at 
java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
        at java.net.ServerSocket.bind(ServerSocket.java:375)
        at 
org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:106)
        ... 10 more
{code}


> [HBase Thrift] ThriftServer is not shutting down if 
> "hbase.regionserver.thrift.port" Address already in use.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-14171
>                 URL: https://issues.apache.org/jira/browse/HBASE-14171
>             Project: HBase
>          Issue Type: Bug
>          Components: Thrift
>            Reporter: Y. SREENIVASULU REDDY
>            Assignee: Bar Rotstein
>             Fix For: 2.0.0
>
>
> If "hbase.regionserver.thrift.port" Address already in use, ThriftServer 
> should shutdown,
> with out this "hbase.regionserver.thrift.port"  we cant perform any 
> operations on ThriftServer . Then there is no use of running ThriftServer 
> process.
> If port is already used then exception or message also not throwing like 
> address already in use.
> Only info port information is showing.
> {code}
> 2015-07-30 12:20:56,186 INFO  [main] http.HttpServer: Jetty bound to port 9095
> 2015-07-30 12:20:56,186 INFO  [main] mortbay.log: jetty-6.1.26
> 2015-07-30 12:20:56,227 WARN  [main] mortbay.log: Can't reuse 
> /tmp/Jetty_0_0_0_0_9095_thrift____.vqpz9l, using 
> /tmp/Jetty_0_0_0_0_9095_thrift____.vqpz9l_4913486964252131199
> 2015-07-30 12:20:56,553 INFO  [main] mortbay.log: Started 
> [email protected]:9095 {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to