You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/10/04 02:05:09 UTC

[GitHub] [helix] pkuwm opened a new issue #503: Null returned for instance stoppable check when connection refused

pkuwm opened a new issue #503: Null returned for instance stoppable check when connection refused
URL: https://github.com/apache/helix/issues/503
 
 
   ```
   $ curl -H "Content-Type: application/json"  -X POST http://server:port/admin/v2/namespaces/myNamespace/clusters/myCluster/instances/myInstance/stoppable -d '{"selection_base": "zone_based", "max_instance": "2", "customized_values": "{}"}'
   null
   ```
   
   Troubleshooting and getting exception stack:
   ```
   Caused by: org.apache.http.conn.HttpHostConnectException: Connect to <hosts> failed: Connection refused (Connection refused)
       at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156)
       at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374)
       at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
       at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
       at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
       at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
       at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
       at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
       at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
       at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
       at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
       at org.apache.helix.rest.client.CustomRestClientImpl.post(CustomRestClientImpl.java:133)
       at org.apache.helix.rest.client.CustomRestClientImpl.getInstanceStoppableCheck(CustomRestClientImpl.java:76)
       at org.apache.helix.rest.server.service.InstanceServiceImpl.performCustomInstanceCheck(InstanceServiceImpl.java:227)
       at org.apache.helix.rest.server.service.InstanceServiceImpl.lambda$null$2(InstanceServiceImpl.java:168)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       ... 1 more
   Caused by: java.net.ConnectException: Connection refused (Connection refused)
       at java.net.PlainSocketImpl.socketConnect(Native Method)
       at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
       at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
       at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
       at java.net.Socket.connect(Socket.java:589)
       at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
       at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
       ... 18 more
   ```
   
   Solution: we need to return a `StoppableCheck` object when connection refused.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org