Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1C10A18E9E for ; Thu, 30 Jul 2015 07:26:32 +0000 (UTC) Received: (qmail 83858 invoked by uid 500); 30 Jul 2015 07:26:32 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 83822 invoked by uid 500); 30 Jul 2015 07:26:32 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 83809 invoked by uid 99); 30 Jul 2015 07:26:32 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2015 07:26:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8F599C0721 for ; Thu, 30 Jul 2015 07:26:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id xsaIDFvH3gYW for ; Thu, 30 Jul 2015 07:26:30 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 1AF2A2DC23 for ; Thu, 30 Jul 2015 07:26:22 +0000 (UTC) Received: (qmail 83043 invoked by uid 99); 30 Jul 2015 07:26:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2015 07:26:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B5024E69F7; Thu, 30 Jul 2015 07:26:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sevdokimov@apache.org To: commits@ignite.incubator.apache.org Date: Thu, 30 Jul 2015 07:26:31 -0000 Message-Id: In-Reply-To: <19ba5b15e82c4db5b686924843ead455@git.apache.org> References: <19ba5b15e82c4db5b686924843ead455@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [11/44] incubator-ignite git commit: Added log WARN in discovery when ssl cfg isn't consistent. Added log WARN in discovery when ssl cfg isn't consistent. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f6b3b3d3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f6b3b3d3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f6b3b3d3 Branch: refs/heads/ignite-900 Commit: f6b3b3d37a31dc69d7d9db8fb30a7379f8f042c0 Parents: 2650845 Author: nikolay_tikhonov Authored: Wed Jul 22 13:05:21 2015 +0300 Committer: nikolay_tikhonov Committed: Wed Jul 22 13:05:21 2015 +0300 ---------------------------------------------------------------------- .../apache/ignite/spi/discovery/tcp/ServerImpl.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f6b3b3d3/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java index 97e910a..34f90f7 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java @@ -39,6 +39,7 @@ import org.apache.ignite.spi.discovery.tcp.messages.*; import org.jetbrains.annotations.*; import org.jsr166.*; +import javax.net.ssl.*; import java.io.*; import java.net.*; import java.util.*; @@ -4123,12 +4124,16 @@ class ServerImpl extends TcpDiscoveryImpl { if (!Arrays.equals(buf, U.IGNITE_HEADER)) { if (log.isDebugEnabled()) log.debug("Unknown connection detected (is some other software connecting to " + - "this Ignite port?) " + + "this Ignite port?" + + (!spi.isSslEnabled() ? " missed SSL configuration?" : "" ) + + ") " + "[rmtAddr=" + sock.getRemoteSocketAddress() + ", locAddr=" + sock.getLocalSocketAddress() + ']'); LT.warn(log, null, "Unknown connection detected (is some other software connecting to " + - "this Ignite port?) [rmtAddr=" + sock.getRemoteSocketAddress() + + "this Ignite port?" + + (!spi.isSslEnabled() ? " missed SSL configuration?" : "" ) + + ") [rmtAddr=" + sock.getRemoteSocketAddress() + ", locAddr=" + sock.getLocalSocketAddress() + ']'); return; @@ -4237,7 +4242,10 @@ class ServerImpl extends TcpDiscoveryImpl { if (log.isDebugEnabled()) U.error(log, "Caught exception on handshake [err=" + e +", sock=" + sock + ']', e); - if (X.hasCause(e, ObjectStreamException.class) || !sock.isClosed()) { + if (X.hasCause(e, SSLException.class) && spi.isSslEnabled()) + LT.warn(log, null, "Failed to initialize connection. Not encrypted data received. " + + "Missed SSL configuration on node? [sock=" + sock + ']'); + else if (X.hasCause(e, ObjectStreamException.class) || !sock.isClosed()) { if (U.isMacInvalidArgumentError(e)) LT.error(log, e, "Failed to initialize connection [sock=" + sock + "]\n\t" + U.MAC_INVALID_ARG_MSG);