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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to