atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemanth Yamijala (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ATLAS-705) atlas_admin.py can print a friendlier user message if it cannot reach the service it is connecting
Date Mon, 25 Apr 2016 14:05:12 GMT
Hemanth Yamijala created ATLAS-705:
--------------------------------------

             Summary: atlas_admin.py can print a friendlier user message if it cannot reach
the service it is connecting
                 Key: ATLAS-705
                 URL: https://issues.apache.org/jira/browse/ATLAS-705
             Project: Atlas
          Issue Type: Bug
            Reporter: Hemanth Yamijala


On a server instance that is down, run atlas_admin.py -status.

It prints a stack trace like this:
{code}
Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: java.io.IOException:
java.net.ConnectException: Connection refused
	at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)
	at com.sun.jersey.api.client.Client.handle(Client.java:652)
	at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
	at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
	at com.sun.jersey.api.client.WebResource$Builder.method(WebResource.java:634)
	at org.apache.atlas.AtlasClient.callAPIWithResource(AtlasClient.java:973)
	at org.apache.atlas.AtlasClient.getAdminStatus(AtlasClient.java:341)
	at org.apache.atlas.AtlasClient.getAdminStatus(AtlasClient.java:317)
	at org.apache.atlas.AtlasAdminClient.handleCommand(AtlasAdminClient.java:71)
	at org.apache.atlas.AtlasAdminClient.run(AtlasAdminClient.java:64)
	at org.apache.atlas.AtlasAdminClient.main(AtlasAdminClient.java:54)
Caused by: java.io.IOException: java.net.ConnectException: Connection refused
	at org.apache.atlas.security.SecureClientUtils$1$1.run(SecureClientUtils.java:106)
	at org.apache.atlas.security.SecureClientUtils$1$1.run(SecureClientUtils.java:98)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
	at org.apache.atlas.security.SecureClientUtils$1.getHttpURLConnection(SecureClientUtils.java:98)
	at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:165)
	at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)
	... 10 more
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:579)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
	at sun.net.www.http.HttpClient.New(HttpClient.java:308)
	at sun.net.www.http.HttpClient.New(HttpClient.java:326)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
	at org.apache.hadoop.security.authentication.client.PseudoAuthenticator.authenticate(PseudoAuthenticator.java:76)
	at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticator.authenticate(DelegationTokenAuthenticator.java:128)
	at org.apache.hadoop.security.authentication.client.AuthenticatedURL.openConnection(AuthenticatedURL.java:215)
	at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticatedURL.openConnection(DelegationTokenAuthenticatedURL.java:322)
	at org.apache.atlas.security.SecureClientUtils$1$1.run(SecureClientUtils.java:102)
	... 17 more
{code}

It would be nice to handle a ConnectionRefused and print a better error message.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message