Support Questions
Find answers, ask questions, and share your expertise

Nifi Cluster Mode with SSL getting "javax.ws.rs.ProcessingException: java.net.SocketException: Broken pipe (Write failed)"

Nifi Cluster Mode with SSL getting "javax.ws.rs.ProcessingException: java.net.SocketException: Broken pipe (Write failed)"

New Contributor

I am getting the following error when enabling cluster mode. When cluster mode is not enabled I am able to log in and work on the instance correctly.

For context, this `host01.mydomain.com` is localhost
and this port 12099 is nifi main port. But when I jump into this full URL on the browser it works.

2018-07-06 09:35:55,679 WARN [Replicate Request Thread-4] o.a.n.c.c.h.r.ThreadPoolRequestReplicator Failed to replicate request GET /nifi-api/flow/current-user to host01.mydomain.com:12099 due to javax.ws.rs.ProcessingException: java.net.SocketException: Broken pipe (Write failed)
2018-07-06 09:35:55,679 WARN [Replicate Request Thread-4] o.a.n.c.c.h.r.ThreadPoolRequestReplicator 
javax.ws.rs.ProcessingException: java.net.SocketException: Broken pipe (Write failed)
        at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:284)
        at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:278)
        at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$0(JerseyInvocation.java:753)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:229)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:414)
        at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:752)
        at org.apache.nifi.cluster.coordination.http.replication.ThreadPoolRequestReplicator.replicateRequest(ThreadPoolRequestReplicator.java:661)
        at org.apache.nifi.cluster.coordination.http.replication.ThreadPoolRequestReplicator$NodeHttpRequest.run(ThreadPoolRequestReplicator.java:875)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Broken pipe (Write failed)
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
        at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431)
        at sun.security.ssl.OutputRecord.write(OutputRecord.java:417)
        at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:886)
        at sun.security.ssl.SSLSocketImpl.writeRecord

@Matt Clarke

2 REPLIES 2

Re: Nifi Cluster Mode with SSL getting "javax.ws.rs.ProcessingException: java.net.SocketException: Broken pipe (Write failed)"

The NiFi UI/API port is different from the cluster coordination port, which is specified in your nifi.properties file with the key nifi.cluster.node.protocol.port.

See Pierre Villard's article about configuring clustering and securing a cluster for more details.

Re: Nifi Cluster Mode with SSL getting "javax.ws.rs.ProcessingException: java.net.SocketException: Broken pipe (Write failed)"

New Contributor

That is nifi's main port

nifi.web.https.port=12099

The cluster protocol port is different (and is not shown in the error):

nifi.cluster.node.protocol.port=12098

The thing is if I disable cluster mode ("nifi.cluster.is.node" to false) I am able to login to https://host01.mydomain.com:12099/nifi normally (so SSL works ok without cluster).
If I enable cluster mode I get the login screen but once I enter my credentials I get the error posted above.