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

Nifi 1.0.0 failed to create socket to coordinator due to ProtocolException

Explorer

Encountering the following error when attempting to create a NiFi unsecured cluster.

2016-09-06 21:17:48,002 INFO [Leader Election Notification Thread-1] o.apache.nifi.controller.FlowController This node elected Active Cluster Coordinator 2016-09-06 21:17:48,479 INFO [main] o.a.n.c.c.n.LeaderElectionNodeProtocolSender Determined that Cluster Coordinator is located at server2.hdp :9999; will use this address for sending heartbeat messages 2016-09-06 21:17:48,481 WARN [main] o.a.nifi.controller.StandardFlowService Failed to connect to cluster due to: org.apache.nifi.cluster.protocol.ProtocolException: Failed to create socket to server2.hdp :9999 due to: java.net.UnknownHostException: server2.hdp

Confirmed the following:

- On Server2 there is a java process listening to port 9999.

- Conducting a telnet server2.hdp 9999 from the other two nodes in the shows that the connection should be possible

Some configuration background:

- Attempting to create a 3 node unsecured NiFi cluster using NiFi-1.0.0

- clusterProtocolPort: 9999 # nifi.cluster.node.protocol.port

- RemoteInputPort: 9998 # nifi.remote.input.socket.port

- httpWebPort: 9090

- Embedded zookeeper with 3 nodes all on port 2181

Any idea what could cause such a message?

5 REPLIES 5

Is server2 able to telnet itself on port 9999? Did you correctly set 'nifi.cluster.node.address' and 'nifi.web.http.host' properties for each node with the correct fqdn?

Explorer

@Pierre Villard

It is possible to execute "telnet server2.hdp 9999" on all 3 nodes. the nifi.cluster.node.address={each servers FQDN}, and nifi.web.http.host={each servers FQDN}. So for example on server1.hdp, the FQDN for the two properties would be 'server1.hdp'. On server2.hdp, the fqdn is server2.hdp and on server2.hdp the fqdn is set to server3.hdp.

I'm a bit puzzled... Given your error 'java.net.UnknownHostException', it seems to be a network issue but not sure what else you could check.

Explorer

Attaching the nifi.properties for all 3 servers in case that helps with an answer.nifi-properties-3-servers.zip

Rising Star

@mjohnson can you verify in your nifi.properties file that the property for "nifi.cluster.node.protocol.port" and "nifi.cluster.node.protocol.address" do not have any spaces in them? From the error message above, "server2.hdp :9999" shows a space between "server2.hdp" and ":9999" so I'm guessing that your "nifi.cluster.node.protocol.address" is set to "server2.hdp " instead of "server2.hdp". This certainly is something that we will need to address if this is indeed the issue (we should ensure that we trim any leading or trailing white space), but for the time being, I'd recommend making sure that there are no spaces there.