{"action":"created","issue":{"url":"https://api.github.com/repos/OmniLayer/OmniJ/issues/74","labels_url":"https://api.github.com/repos/OmniLayer/OmniJ/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/OmniLayer/OmniJ/issues/74/comments","events_url":"https://api.github.com/repos/OmniLayer/OmniJ/issues/74/events","html_url":"https://github.com/OmniLayer/OmniJ/issues/74","id":70783158,"number":74,"title":"RPC connection failure handling","user":{"login":"dexX7","id":5836089,"avatar_url":"https://avatars.githubusercontent.com/u/5836089?v=3","gravatar_id":"","url":"https://api.github.com/users/dexX7","html_url":"https://github.com/dexX7","followers_url":"https://api.github.com/users/dexX7/followers","following_url":"https://api.github.com/users/dexX7/following{/other_user}","gists_url":"https://api.github.com/users/dexX7/gists{/gist_id}","starred_url":"https://api.github.com/users/dexX7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dexX7/subscriptions","organizations_url":"https://api.github.com/users/dexX7/orgs","repos_url":"https://api.github.com/users/dexX7/repos","events_url":"https://api.github.com/users/dexX7/events{/privacy}","received_events_url":"https://api.github.com/users/dexX7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-04-24T20:15:50Z","updated_at":"2015-06-29T02:02:50Z","closed_at":null,"body":"In [BitcoinClient.java#L61-L67](https://github.com/OmniLayer/OmniJ/blob/e227737a75e7bd6a3e165d0c1ef105d4a0642efb/bitcoin-rpc/src/main/java/com/msgilligan/bitcoin/rpc/BitcoinClient.java#L61-L67), when waiting for the server, and a `SocketException` is caught, then the stack trace should not be dumped, if certain certain expected exception messages are identified. This is pretty straight forward, to suppress errors while waiting. \r\n\r\nHowever, those messages are localized, even without `getLocalizedMessage()`, and this causes a lot of output.\r\n\r\n1) Could we replace those checks and suppress all `ConnectException`? Or is there an alternative to using the exception messages?\r\n\r\n2) From an user's point of view, there are probably three relevant outcomes in this context, which should be handled differently:\r\n- server is not running at all, or connection information are wrong *-> \"please start the server with the following options ...\"*\r\n- failed authorization *-> \"please use this or that rpc username and password\"*\r\n- the client really waits *-> error suppression*\r\n\r\nA failed authorization can be identified as `JsonRPCException` with `httpCode = 401`, but the other two are probably more tricky: a refused connection expresses itself as `ConnectException`, but I was unable to see \"waiting\" in action."},"comment":{"url":"https://api.github.com/repos/OmniLayer/OmniJ/issues/comments/116375102","html_url":"https://github.com/OmniLayer/OmniJ/issues/74#issuecomment-116375102","issue_url":"https://api.github.com/repos/OmniLayer/OmniJ/issues/74","id":116375102,"user":{"login":"msgilligan","id":61612,"avatar_url":"https://avatars.githubusercontent.com/u/61612?v=3","gravatar_id":"","url":"https://api.github.com/users/msgilligan","html_url":"https://github.com/msgilligan","followers_url":"https://api.github.com/users/msgilligan/followers","following_url":"https://api.github.com/users/msgilligan/following{/other_user}","gists_url":"https://api.github.com/users/msgilligan/gists{/gist_id}","starred_url":"https://api.github.com/users/msgilligan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msgilligan/subscriptions","organizations_url":"https://api.github.com/users/msgilligan/orgs","repos_url":"https://api.github.com/users/msgilligan/repos","events_url":"https://api.github.com/users/msgilligan/events{/privacy}","received_events_url":"https://api.github.com/users/msgilligan/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T02:02:50Z","updated_at":"2015-06-29T02:02:50Z","body":"> Thanks! There are still two lines, which are shown, when running ./gradlew :omnij-rpc:regTest. I left comments inline. :)\r\n\r\nI responded to those comments, but should probably copy those responses here:\r\n\r\n> I need to think about this a little. I think I prefer more logging than you do. The solution is to (hopefully) agree on the correct levels for the messages and then have each of us choose a different setting of the level when running tests. (And I may chose a different level for locally running and for Jenkins.)\r\n\r\n> So, since the \"RPC Status:\" message is the most verbose of them all and can happen hundreds of times while syncing, it should be a higher level of verbosity than the \"RPC Ready\" message. I'm just not sure if they should be info/debug or debug/trace. I think this depends upon the default debug level, what we configure in Gradle, in our IDEs, etc.\r\n\r\n"}}