Bryan Bende created NIFI-2088:
---------------------------------

             Summary: Improve error message when using http and https port in a 
cluster
                 Key: NIFI-2088
                 URL: https://issues.apache.org/jira/browse/NIFI-2088
             Project: Apache NiFi
          Issue Type: Improvement
            Reporter: Bryan Bende
            Priority: Minor
             Fix For: 1.0.0


I was setting up a local secure cluster for testing and had configured the 
first node and tried starting it, got this error:

{code}
2016-06-22 17:54:44,537 INFO [main] o.eclipse.jetty.server.AbstractConnector 
Started ServerConnector@43069adf{SSL,[ssl, http/1.1]}{0.0.0.0:8443}
2016-06-22 17:54:44,537 INFO [main] org.eclipse.jetty.server.Server Started 
@30444ms
2016-06-22 17:54:45,341 INFO [main] org.apache.nifi.web.server.JettyServer 
Loading Flow...
2016-06-22 17:54:45,345 INFO [main] org.apache.nifi.io.socket.SocketListener 
Now listening for connections from nodes on port 8088
2016-06-22 17:54:45,385 INFO [main] o.a.nifi.controller.StandardFlowService 
Connecting Node: localhost:8080
2016-06-22 17:54:45,386 INFO [main] o.a.c.f.imps.CuratorFrameworkImpl Starting
2016-06-22 17:54:45,389 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181] 
o.a.zookeeper.server.ZooKeeperServer Client attempting to establish new session 
at /127.0.0.1:50466
2016-06-22 17:54:45,389 INFO [SyncThread:0] 
o.a.zookeeper.server.ZooKeeperServer Established session 0x1557a1bb2f60003 with 
negotiated timeout 4000 for client /127.0.0.1:50466
2016-06-22 17:54:45,390 INFO [main-EventThread] 
o.a.c.f.state.ConnectionStateManager State change: CONNECTED
2016-06-22 17:54:45,395 INFO [main] o.a.n.c.c.node.CuratorNodeProtocolSender 
Determined that Cluster Coordinator is located at 192.168.1.8; will use this 
address for sending heartbeat messages
2016-06-22 17:54:45,396 ERROR [main] o.a.n.c.c.node.CuratorNodeProtocolSender 
Attempted to determine Cluster Coordinator address. Zookeeper indicates that 
address is 192.168.1.8, but this is not in the expected format of 
<hostname>:<port>
2016-06-22 17:54:45,396 INFO [Curator-Framework-0] 
o.a.c.f.imps.CuratorFrameworkImpl backgroundOperationsLoop exiting
2016-06-22 17:54:45,399 INFO [ProcessThread(sid:0 cport:-1):] 
o.a.z.server.PrepRequestProcessor Processed session termination for sessionid: 
0x1557a1bb2f60003
2016-06-22 17:54:45,406 WARN [main] o.a.nifi.controller.StandardFlowService 
Failed to connect to cluster due to: 
org.apache.nifi.cluster.protocol.ProtocolException: Failed to create socket due 
to: java.io.IOException: Unable to determine Cluster Coordinator from ZooKeeper
org.apache.nifi.cluster.protocol.ProtocolException: Failed to create socket due 
to: java.io.IOException: Unable to determine Cluster Coordinator from ZooKeeper
        at 
org.apache.nifi.cluster.protocol.AbstractNodeProtocolSender.createSocket(AbstractNodeProtocolSender.java:112)
 ~[nifi-framework-cluster-protocol-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        at 
org.apache.nifi.cluster.protocol.AbstractNodeProtocolSender.requestConnection(AbstractNodeProtocolSender.java:47)
 ~[nifi-framework-cluster-protocol-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        at 
org.apache.nifi.cluster.protocol.impl.NodeProtocolSenderListener.requestConnection(NodeProtocolSenderListener.java:84)
 ~[nifi-framework-cluster-protocol-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        at 
org.apache.nifi.controller.StandardFlowService.connect(StandardFlowService.java:789)
 [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        at 
org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:460)
 [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:744) 
[nifi-jetty-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        at org.apache.nifi.NiFi.<init>(NiFi.java:137) 
[nifi-runtime-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        at org.apache.nifi.NiFi.main(NiFi.java:227) 
[nifi-runtime-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
Caused by: java.io.IOException: Unable to determine Cluster Coordinator from 
ZooKeeper
        at 
org.apache.nifi.cluster.coordination.node.CuratorNodeProtocolSender.getServiceAddress(CuratorNodeProtocolSender.java:110)
 ~[nifi-framework-cluster-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        at 
org.apache.nifi.cluster.protocol.AbstractNodeProtocolSender.createSocket(AbstractNodeProtocolSender.java:108)
 ~[nifi-framework-cluster-protocol-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        ... 7 common frames omitted
Caused by: org.apache.nifi.cluster.protocol.ProtocolException: Attempted to 
determine Cluster Coordinator address. Zookeeper indicates that address is 
192.168.1.8, but this is not in the expected format of <hostname>:<port>
        at 
org.apache.nifi.cluster.coordination.node.CuratorNodeProtocolSender.getServiceAddress(CuratorNodeProtocolSender.java:86)
 ~[nifi-framework-cluster-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
        ... 8 common frames omitted
2016-06-22 17:54:45,857 INFO [Curator-Framework-0] 
o.a.c.f.imps.CuratorFrameworkImpl backgroundOperationsLoop exiting
2016-06-22 17:54:45,858 INFO [ProcessThread(sid:0 cport:-1):] 
o.a.z.server.PrepRequestProcessor Processed session termination for sessionid: 
0x1557a1bb2f60002
2016-06-22 17:54:45,859 INFO [Publish Heartbeat Address] 
o.a.n.c.c.h.ClusterProtocolHeartbeatMonitor Successfully published Cluster 
Heartbeat Monitor Address of :8088 to ZooKeeper
2016-06-22 17:54:48,844 INFO [Heartbeat Monitor Thread-1] 
o.a.n.c.c.node.NodeClusterCoordinator Failed to retrieve any new heartbeat 
information for nodes. Will not make any decisions based on heartbeats.
2016-06-22 17:54:50,409 INFO [main] o.a.c.f.imps.CuratorFrameworkImpl Starting
2016-06-22 17:54:50,411 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181] 
o.a.zookeeper.server.ZooKeeperServer Client attempting to establish new session 
at /127.0.0.1:50471
2016-06-22 17:54:50,411 INFO [SyncThread:0] 
o.a.zookeeper.server.ZooKeeperServer Established session 0x1557a1bb2f60004 with 
negotiated timeout 4000 for client /127.0.0.1:50471
2016-06-22 17:54:50,411 INFO [main-EventThread] 
o.a.c.f.state.ConnectionStateManager State change: CONNECTED
2016-06-22 17:54:50,412 INFO [main] o.a.n.c.c.node.CuratorNodeProtocolSender 
Determined that Cluster Coordinator is located at :8088; will use this address 
for sending heartbeat messages
2016-06-22 17:54:50,413 INFO [Curator-Framework-0] 
o.a.c.f.imps.CuratorFrameworkImpl backgroundOperationsLoop exiting
2016-06-22 17:54:50,413 INFO [ProcessThread(sid:0 cport:-1):] 
o.a.z.server.PrepRequestProcessor Processed session termination for sessionid: 
0x1557a1bb2f60004
2016-06-22 17:54:50,420 INFO [Process Cluster Protocol Request-1] 
o.a.n.c.c.node.NodeClusterCoordinator Status of localhost:8080 changed from 
NodeConnectionStatus[state=DISCONNECTED, Disconnect Code=Not Has Not Yet 
Connected to Cluster, Disconnect Reason=NOT_YET_CONNECTED, updateId=1] to 
NodeConnectionStatus[state=CONNECTING, updateId=2]
2016-06-22 17:54:50,425 INFO [Process Cluster Protocol Request-2] 
o.a.n.c.c.node.NodeClusterCoordinator Status of localhost:8080 changed from 
NodeConnectionStatus[state=CONNECTING, updateId=2] to 
NodeConnectionStatus[state=CONNECTING, updateId=2]
{code}

Turns out I had left the http web port and also specified an https web port. 
Once I removed the http port and disabled http site-to-site I was able to start 
up. 

We should provide a better message about what the problem was here.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to