nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conrad Crampton <>
Subject Spark & NiFi question
Date Thu, 19 May 2016 15:54:35 GMT
Tried following a couple of blog posts about this [1], [2], but neither of these refer to
using NiFi in clustered environment with SSL and I suspect this is where I am hitting problems
(but don’t know where).

The blogs state that using an output port (in the root process group I.e. on main canvas)
which I have done and tried to connect thus..

System.setProperty("", "/spark-processor.jks");
System.setProperty("", “*****");
System.setProperty("", “/cacerts.jks");

SiteToSiteClientConfig config = new SiteToSiteClient.Builder()
        .portName("Spark test out")

SparkConf sparkConf = new SparkConf().setMaster("local[2]").setAppName("NiFi Spark Log Processor");
JavaStreamingContext jssc = new JavaStreamingContext(sparkConf, new Duration(5000));
JavaReceiverInputDStream<NiFiDataPacket> packetStream = jssc.receiverStream(new NiFiReceiver(config,

JavaDStream text = -> new String(dataPacket.getContent(), StandardCharsets.UTF_8));

The error I am getting is

16/05/19 16:39:03 WARN ReceiverSupervisorImpl: Restarting receiver with delay 2000 ms: Failed
to receive data from NiFi Server returned HTTP response code: 401 for URL: https://yarn-cm1.mis-cds.local:9090/nifi-api/controller
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at Method)
at org.apache.nifi.remote.util.NiFiRestApiUtil.getController(
at org.apache.nifi.remote.client.socket.EndpointConnectionPool.refreshRemoteInfo(
at org.apache.nifi.remote.client.socket.EndpointConnectionPool.getPortIdentifier(
at org.apache.nifi.remote.client.socket.EndpointConnectionPool.getOutputPortIdentifier(
at org.apache.nifi.remote.client.socket.SocketClient.getPortIdentifier(
at org.apache.nifi.remote.client.socket.SocketClient.createTransaction(
at org.apache.nifi.spark.NiFiReceiver$
Caused by: Server returned HTTP response code: 401 for URL: https://yarn-cm1.mis-cds.local:9090/nifi-api/controller
at org.apache.nifi.remote.util.NiFiRestApiUtil.getController(
... 7 more

Any pointers would be helpful in getting this working. I don’t know if I have to set up
a remote process group with the output port (not sure how this works), or what. When I go
to https://yarn-cm1.mis-cds.local:9090/nifi-api/controller in the browser, I get an access
denied error.
I have created keystore and signed by the RootCA used to sign all the self signed certs for
the cluster.

Running 0.6.1, 6 node cluster.


[1[ -
[2] -

SecureData, combating cyber threats
The information contained in this message or any of its attachments may be privileged and
confidential and intended for the exclusive use of the intended recipient. If you are not
the intended recipient any disclosure, reproduction, distribution or other dissemination or
use of this communications is strictly prohibited. The views expressed in this email are those
of the individual and not necessarily of SecureData Europe Ltd. Any prices quoted are only
valid if followed up by a formal written quote.

SecureData Europe Limited. Registered in England & Wales 04365896. Registered Address:
SecureData House, Hermitage Court, Hermitage Lane, Maidstone, Kent, ME16 9NT
View raw message