IGNITE-8799 Web Agent: Added output to log of root cause if connection failed.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6cc633b7 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6cc633b7 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6cc633b7 Branch: refs/heads/ignite-8446 Commit: 6cc633b7dae8f7252ea30a75c4b2cacc8f3fe6fb Parents: 19f9196 Author: Mikhail Cherkasov <michael.cherka...@gmail.com> Authored: Wed Aug 1 12:35:02 2018 +0700 Committer: Alexey Kuznetsov <akuznet...@apache.org> Committed: Wed Aug 1 12:35:02 2018 +0700 ---------------------------------------------------------------------- .../java/org/apache/ignite/console/agent/AgentLauncher.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/6cc633b7/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/AgentLauncher.java ---------------------------------------------------------------------- diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/AgentLauncher.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/AgentLauncher.java index 9340417..579f236 100644 --- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/AgentLauncher.java +++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/AgentLauncher.java @@ -114,7 +114,7 @@ public class AgentLauncher { Exception ignore = X.cause(e, SSLHandshakeException.class); if (ignore != null) { - log.error("Failed to establish SSL connection to server, due to errors with SSL handshake."); + log.error("Failed to establish SSL connection to server, due to errors with SSL handshake:", e); log.error("Add to environment variable JVM_OPTS parameter \"-Dtrust.all=true\" to skip certificate validation in case of using self-signed certificate."); System.exit(1); @@ -123,7 +123,7 @@ public class AgentLauncher { ignore = X.cause(e, UnknownHostException.class); if (ignore != null) { - log.error("Failed to establish connection to server, due to errors with DNS or missing proxy settings."); + log.error("Failed to establish connection to server, due to errors with DNS or missing proxy settings.", e); log.error("Documentation for proxy configuration can be found here: http://apacheignite.readme.io/docs/web-agent#section-proxy-configuration"); System.exit(1); @@ -323,6 +323,8 @@ public class AgentLauncher { // Workaround for use self-signed certificate if (Boolean.getBoolean("trust.all")) { + log.info("Trust to all certificates mode is enabled."); + SSLContext ctx = SSLContext.getInstance("TLS"); // Create an SSLContext that uses our TrustManager