Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8618B200BBD for ; Tue, 8 Nov 2016 10:32:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 84919160B0A; Tue, 8 Nov 2016 09:32:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7CD43160AFA for ; Tue, 8 Nov 2016 10:32:01 +0100 (CET) Received: (qmail 16213 invoked by uid 500); 8 Nov 2016 09:32:00 -0000 Mailing-List: contact dev-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list dev@nifi.apache.org Received: (qmail 16189 invoked by uid 99); 8 Nov 2016 09:32:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2016 09:32:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 381D9183994 for ; Tue, 8 Nov 2016 09:31:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.63 X-Spam-Level: ** X-Spam-Status: No, score=2.63 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=fucs.org Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id LgKwCsy3_2RO for ; Tue, 8 Nov 2016 09:31:55 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E6DC85F23C for ; Tue, 8 Nov 2016 09:31:54 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id c184so34990534wmd.0 for ; Tue, 08 Nov 2016 01:31:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fucs.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=xF7FPle0SGnCNkFYI15xwp/PYryTrLbob8zrs2kXvUw=; b=G6LAujq4Cd1UGSCu2v/HW6aBagJEzs0d4nlufAndnX7L5qoUXWQDyC8syMOKNhkzcs efZ5AzWgRj+GHzRHCI2ITicCxwSvxrjpNIOXfw3w03pbqu+1sBtc0oq44F85ecyftpss YD+FVnpEkPYWVi9WjzvXSJ6a6OHGea00LZud8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=xF7FPle0SGnCNkFYI15xwp/PYryTrLbob8zrs2kXvUw=; b=RNyM9yuWjWZ2VWwYJ84/tPrYX4MI+OzTs+Kmqu18kigwlUakC+Cx60yqxt3zZslGJJ V1kbepZ0PO7H96K87KR3dfJulXKgK4kEm/DqfIrkl2PVPKxS+jtIYZU7e9UQzjMgTuuA 2QYoDT1I62DTm2lBlvG//ghsICsyyXZKskI6jpfqfeiPd8sqyykQgbXNZHLOtX+iPPAE /BtxQNvRQRahDnGKmpsrFKYN9XCdMw2AsD8u2bpb5lcR21YW2G8o6UkwfEv3iLeBAfUe qmzq/pE3UVnIBSEcHBzO/HXg8P3SQwFjeRpOiNINIm5phE2wbJ1HvvFgblm/m0t8xw/r JSlA== X-Gm-Message-State: ABUngveHXNscRaE4Hps8PEuaabvuXa1ReTsS1VMRSfB2fTfmzwuKKHF7crdmiZXHmIRPtA== X-Received: by 10.28.63.3 with SMTP id m3mr7433153wma.113.1478597509384; Tue, 08 Nov 2016 01:31:49 -0800 (PST) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com. [74.125.82.52]) by smtp.gmail.com with ESMTPSA id g142sm18520469wmd.2.2016.11.08.01.31.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Nov 2016 01:31:49 -0800 (PST) Received: by mail-wm0-f52.google.com with SMTP id f82so168334446wmf.1 for ; Tue, 08 Nov 2016 01:31:48 -0800 (PST) X-Received: by 10.28.153.10 with SMTP id b10mr8916110wme.103.1478597508557; Tue, 08 Nov 2016 01:31:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.20.3 with HTTP; Tue, 8 Nov 2016 01:31:47 -0800 (PST) X-Originating-IP: [125.7.24.158] In-Reply-To: References: <3AE72AF8-88A1-4482-92A7-F5A21BDCAF0B@apache.org> <40755F80-2A7D-497F-BC73-46DA43084A0D@apache.org> From: Andre Date: Tue, 8 Nov 2016 20:31:47 +1100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Secure Cluster Mode Issues To: dev@nifi.apache.org Content-Type: multipart/alternative; boundary=001a114b9d30438d9c0540c6cf77 archived-at: Tue, 08 Nov 2016 09:32:02 -0000 --001a114b9d30438d9c0540c6cf77 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Rick, Can you confirm the certificate has a chain of trust with the default JDK trusted certs? (i.e. trusted by the JVM) Cheers On Mon, Nov 7, 2016 at 3:38 AM, Ricky Saltzer wrote: > Hey Andy - > > Thanks again for the help. > > The error message seems indicative that it doesn't seem to properly read > the keystore file. One thing to note, if I point the nifi properties to a > bogus keystore location, then it actually throws a FileNotFound exception= . > This is really odd behavior, because as I mentioned I'm able to start it = in > standalone mode using the correct keystore location, just as I try to do = in > clustered mode. > > I've attached both the clustered [1] nifi.properties, which doesn't work, > and the standalone [2] which does work. . I restored it to a more basic > configuration without the encrypted configuration, but with SSL still > enabled. I also added a diff [3] of both the standalone and clustered > properties file. Note that I I only have NiFi configured to use the > keystore and not a truststore. I've redacted a few of the values in the > property files, but be assured that the keystore is most definitely valid > and is readable / locatable, as starting in standalone works just fine. > > I ran the SSL command [4] you gave me, minus the three PEM file arguments > as I don't have any of those on hand. I hope that is fine. The output sti= ll > looks good. > > [1] https://gist.github.com/rickysaltzer/712aa6586592fe6628db2d57cec7a562 > [2] https://gist.github.com/rickysaltzer/fe11c8233e4434eacedd7fd0a083d950 > [3] https://gist.github.com/rickysaltzer/d715c7451eb554a54f14ec6e64da8558 > [4] https://gist.github.com/rickysaltzer/5d7cdeff8868bfc1f47010189735411a > > > > > On Fri, Nov 4, 2016 at 7:48 PM, Andy LoPresto > wrote: > > > Hi Ricky, > > > > Sorry, should have noted that the debug output goes to > nifi-bootstrap.log, > > so thanks Mark for jumping in to help there. > > > > If you look at the top of that log, you=E2=80=99ll note that there is n= o keystore > > file provided and the truststore loaded is the default JRE cacerts > > truststore. Can you please provide your nifi.properties file in a Gist, > **taking > > care to redact any sensitive values** like keystore/truststore password= s, > > although I think from looking at your log output, you are taking > advantage > > of the encrypted configuration feature, so even viewing the encrypted > > values should be ok. Could you also please provide the directory listin= g > > where the keystore and truststore are located including the permissions > and > > ownership information? > > > > There may be a bug in the logic between cluster and standalone mode, bu= t > I > > haven=E2=80=99t encountered this behavior before. If you can start NiFi= in > > standalone mode, could you please provide the output of the following > > command run from the terminal? It will simulate an HTTPS connection to > the > > server and verify the key and certificate presented by NiFi. > > > > * host =E2=80=94 the NiFi hostname > > * port =E2=80=94 the port NiFi is running on > > * path_to_your_cert.pem =E2=80=94 the public key certificate identifyin= g the > > client/user (i.e. what you load into your browser to authenticate) > > * path_to_your_key.key =E2=80=94 the private key identifying the client= /user > > * path_to_your_CA_cert.pem =E2=80=94 the public key certificate identif= ying the > CA > > which signed your NiFi server certificate (if self-signed, provide that > > certificate) > > > > $ openssl s_client -connect -debug -state -cert > > -key -CAfile > > > > > > Andy LoPresto > > alopresto@apache.org > > *alopresto.apache@gmail.com * > > PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > > > > On Nov 4, 2016, at 11:21 AM, Ricky Saltzer wrote: > > > > Hey guys - > > > > I went ahead and uploaded the boostrap log. I took a look at it and it > > seems to be the same error [1] > > > > [1]: > > https://gist.githubusercontent.com/rickysaltzer/ > > b156594f92066873f80928eddf84e7bb/raw/4d0e018038b332f4fdf14644910dfa > > 9e70c57e49/gistfile1.txt > > > > On Fri, Nov 4, 2016 at 2:14 PM, Mark Payne wrote= : > > > > Hey Ricky, > > > > When you enable debug logging for SSL, it writes to StdErr (or StdOut?) > so > > it will end up in your logs/nifi-bootstrap.log instead of nifi-app.log. > > Can you give that a look? > > > > Thanks > > -Mark > > > > On Nov 4, 2016, at 2:07 PM, Ricky Saltzer wrote: > > > > Hey Andy - > > > > Thanks for the response. I'm currently just trying to get one node in > > clustered mode before adding a second. The keystore is stored locally a= nd > > I've confirmed it's readable, as it was able to start once I took it ou= t > > > > of > > > > clustered mode. I added that line to the bootstrap.conf, but I don't > > believe any additional logging was produced in regards to troubleshooti= ng > > this problem. Just in case, I've attached the entire log [1]. > > > > [1]: > > https://gist.githubusercontent.com/rickysaltzer/ > > > > ed454d87d2207d5acab401a473d4be57/raw/425c42da762fc5cc997153d48b09f0 > > fedabc88bb/gistfile1.txt rickysaltzer/ > > ed454d87d2207d5acab401a473d4be57/raw/425c42da762fc5cc997153d48b09f0 > > fedabc88bb/gistfile1.txt> > > > > > > On Wed, Nov 2, 2016 at 7:08 PM, Andy LoPresto > > > > wrote: > > > > > > Hi Ricky, > > > > Sorry to hear you are having this issue. Is the keystore available on > > > > all > > > > nodes of the cluster? It appears from the log message that the keystore > > > > is > > > > not found during startup. To further debug, you can add the following > > > > line > > > > in bootstrap.conf to provide additional logging: > > > > java.arg.15=3D-Djavax.net.debug=3Dssl,handshake > > > > Andy LoPresto > > alopresto@apache.org > > *alopresto.apache@gmail.com < > > > > alopresto.apache@gmail.com >* > > > > PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > > > > On Nov 2, 2016, at 2:25 PM, Ricky Saltzer wrote: > > > > Hey all - > > > > I'm using NiFi 1.0 and I'm having an issue using secure mode with a > > > > local > > > > key store while in clustered mode. If I set the node in clustered mode, > > > > and > > > > also provide a valid keystore, I receive a KeyStoreException [1]. If I > > > > set > > > > the configuration to not use clustered mode, NiFi will start up fine > > > > with > > > > the provided key store. Am I supposed to be storing this key store in > > Zookeeper somewhere? > > > > > > [1] > > > > > > Caused by: java.security.KeyStoreException: not found > > > > > > at java.security.KeyStore.getInstance(KeyStore.java:839) > > ~[na:1.8.0_11] > > > > at > > org.apache.nifi.io.socket.SSLContextFactory.( > > SSLContextFactory.java:61) > > ~[nifi-socket-utils-1.0.0.jar:1.0.0] > > > > at > > org.apache.nifi.cluster.protocol.spring.ServerSocketConfigurationFacto > > ryBean.getObject(ServerSocketConfigurationFactoryBean.java:45) > > ~[nifi-framework-cluster-protocol-1.0.0.jar:1.0.0] > > > > at > > org.apache.nifi.cluster.protocol.spring.ServerSocketConfigurationFacto > > ryBean.getObject(ServerSocketConfigurationFactoryBean.java:30) > > ~[nifi-framework-cluster-protocol-1.0.0.jar:1.0.0] > > > > at > > org.springframework.beans.factory.support.FactoryBeanRegistrySupport. > > doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168) > > ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE] > > > > ... 69 common frames omitted > > > > Caused by: java.security.NoSuchAlgorithmException: KeyStore not > > > > available > > > > > > at sun.security.jca.GetInstance.getInstance(GetInstance.java:159) > > ~[na:1.8.0_11] > > > > at java.security.Security.getImpl(Security.java:695) > > > > ~[na:1.8.0_11] > > > > > > at java.security.KeyStore.getInstance(KeyStore.java:836) > > ~[na:1.8.0_11] > > > > ... 73 common frames omitted > > > > > > > > > > > > -- > > Ricky Saltzer > > http://www.cloudera.com > > > > > > > > > > > > -- > > Ricky Saltzer > > http://www.cloudera.com > > > > > > > > > -- > Ricky Saltzer > http://www.cloudera.com > --001a114b9d30438d9c0540c6cf77--