title: NiFiCoreException: Unable to start Flow Controller
body: <p>i get this error when starting Nifi 1.9.2 in cluster mode with embedded zookeeper 3.5.5.</p>
  
  <p>I successfully start three zookeeper 3.5.5 separately using Java 1.8.nifi.</p>
  
  <pre><code>org.apache.nifi.web.NiFiCoreException: Unable to start Flow Controller.
      at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:88)
      at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:953)
      at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:558)
      at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:918)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:370)
      at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:848)
      at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:403)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.server.Server.start(Server.java:419)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.Server.doStart(Server.java:386)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:935)
      at org.apache.nifi.NiFi.&lt;init&gt;(NiFi.java:158)
      at org.apache.nifi.NiFi.&lt;init&gt;(NiFi.java:72)
      at org.apache.nifi.NiFi.main(NiFi.java:297)
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation; nested exception is java.lang.ArrayIndexOutOfBoundsException: 1
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:185)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1640)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1086)
      at org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:55)
      ... 38 common frames omitted
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation; nested exception is java.lang.ArrayIndexOutOfBoundsException: 1
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:185)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1640)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1086)
      at org.apache.nifi.spring.StandardFlowServiceFactoryBean.getObject(StandardFlowServiceFactoryBean.java:48)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
      ... 44 common frames omitted
  Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
      at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:188)
      at org.apache.nifi.controller.state.server.ZooKeeperStateServer.&lt;init&gt;(ZooKeeperStateServer.java:55)
      at org.apache.nifi.controller.state.server.ZooKeeperStateServer.create(ZooKeeperStateServer.java:189)
      at org.apache.nifi.controller.FlowController.&lt;init&gt;(FlowController.java:576)
      at org.apache.nifi.controller.FlowController.createClusteredInstance(FlowController.java:399)
      at org.apache.nifi.spring.FlowControllerFactoryBean.getObject(FlowControllerFactoryBean.java:65)
      at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
      ... 51 common frames omitted
  2019-08-03 11:13:17,902 INFO [Thread-1] org.apache.nifi.NiFi Initiating shutdown of Jetty web server...
  2019-08-03 11:13:17,982 INFO [Thread-1] o.eclipse.jetty.server.AbstractConnector Stopped ServerConnector@1b07ba9{HTTP/1.1,[http/1.1]}{192.168.159.130:18001}
  2019-08-03 11:13:17,991 INFO [Thread-1] org.eclipse.jetty.server.session node0 Stopped scavenging
  </code></pre>
  
  <p>This error took me too much time,but i could not reslove it.
  Can someone help me?
  THX in Advance.</p>
  
  <p><strong>conf/zookeeper.properties</strong></p>
  
  <pre><code>clientPort=2187
  #clientPort=2188
  #clientPort=2189
  server.1=machine001:3888:4888
  server.2=machine001:5888:6888
  server.3=machine001:7888:8888
  </code></pre>
  
  <p><strong>myid</strong></p>
  
  <pre><code>1
  #2
  #3
  </code></pre>
  
  <p><strong>conf/nifi.properties</strong></p>
  
  <pre><code>nifi.state.management.embedded.zookeeper.start=true
  nifi.web.http.host=machine001 
  nifi.web.http.port=8000
  #nifi.web.http.port=8001
  #nifi.web.http.port=8002
  
  nifi.cluster.is.node=true
  nifi.cluster.node.address=machine001
  nifi.cluster.node.protocol.port=9997
  #nifi.cluster.node.protocol.port=9998
  #nifi.cluster.node.protocol.port=9999
  
  nifi.zookeeper.connect.string=machine001:2187,machine001:2188,machine001:2189
  </code></pre>
  
  <p><strong>conf/state-management.xml</strong></p>
  
  <pre><code>&lt;property name="Connect String"&gt;machine001:2187,machine001:2188,machine001:2189&lt;/property&gt;
  </code></pre>