[ 
https://issues.apache.org/jira/browse/NIFI-259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15122454#comment-15122454
 ] 

Aldrin Piri commented on NIFI-259:
----------------------------------

Noticed that when starting from outside of $NIFI_HOME, the path for ZK's myid 
gets mangled in the process.

Startup
{code}
➜  Desktop  ./nifi-0.4.2-SNAPSHOT-node2/bin/nifi.sh start
nifi.sh: JAVA_HOME not set; results may vary

Java home:
NiFi home: /Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2

Bootstrap Config File: 
/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/conf/bootstrap.conf

2016-01-28 16:35:03,234 INFO [main] org.apache.nifi.bootstrap.Command Starting 
Apache NiFi...
2016-01-28 16:35:03,235 INFO [main] org.apache.nifi.bootstrap.Command Working 
Directory: /Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2
2016-01-28 16:35:03,235 INFO [main] org.apache.nifi.bootstrap.Command Command: 
java -classpath 
/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./conf:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/jcl-over-slf4j-1.7.12.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/jul-to-slf4j-1.7.12.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/log4j-over-slf4j-1.7.12.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/logback-classic-1.1.3.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/logback-core-1.1.3.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/nifi-api-0.4.2-SNAPSHOT.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/nifi-documentation-0.4.2-SNAPSHOT.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/nifi-nar-utils-0.4.2-SNAPSHOT.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/nifi-properties-0.4.2-SNAPSHOT.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/nifi-runtime-0.4.2-SNAPSHOT.jar:/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./lib/slf4j-api-1.7.12.jar
 -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m 
-Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true 
-Djava.awt.headless=true -Djava.protocol.handler.pkgs=sun.net.www.protocol 
-Dnifi.properties.file.path=/Users/apiri/Desktop/nifi-0.4.2-SNAPSHOT-node2/./conf/nifi.properties
 -Dnifi.bootstrap.listen.port=53633 -Dapp=NiFi org.apache.nifi.NiFi
{code}

Logs
{code}
Caused by: java.lang.IllegalArgumentException: ./state/zookeeper/myid file is 
missing
        at 
org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:350)
 ~[zookeeper-3.4.6.jar:3.4.6-1569965]
        at 
org.apache.nifi.controller.state.server.ZooKeeperStateServer.<init>(ZooKeeperStateServer.java:50)
 ~[nifi-framework-core-0.4.2-SNAPSHOT.jar:0.4.2-SNAPSHOT]
        at 
org.apache.nifi.controller.state.server.ZooKeeperStateServer.create(ZooKeeperStateServer.java:130)
 ~[nifi-framework-core-0.4.2-SNAPSHOT.jar:0.4.2-SNAPSHOT]
        at 
org.apache.nifi.controller.FlowController.<init>(FlowController.java:518) 
~[nifi-framework-core-0.4.2-SNAPSHOT.jar:0.4.2-SNAPSHOT]
        at 
org.apache.nifi.controller.FlowController.createClusteredInstance(FlowController.java:381)
 ~[nifi-framework-core-0.4.2-SNAPSHOT.jar:0.4.2-SNAPSHOT]
        at 
org.apache.nifi.spring.FlowControllerFactoryBean.getObject(FlowControllerFactoryBean.java:58)
 ~[nifi-framework-core-0.4.2-SNAPSHOT.jar:0.4.2-SNAPSHOT]
        at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
 ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
        ... 35 common frames omitted
{code}

> Framework should offer Processors/extensions a way to manage simple state
> -------------------------------------------------------------------------
>
>                 Key: NIFI-259
>                 URL: https://issues.apache.org/jira/browse/NIFI-259
>             Project: Apache NiFi
>          Issue Type: Sub-task
>          Components: Core Framework
>            Reporter: Joseph Witt
>            Assignee: Mark Payne
>             Fix For: 0.5.0
>
>         Attachments: error-message.png
>
>
> It is not uncommon for processors to need managed state which  persists 
> across restarts.  One good example of this is the GetHTTP processor which 
> needs to save state of the last cache/e-tag information it received from the 
> server it interacts with so that it can avoid constantly pulling an unchanged 
> resource.
> Rather than making processors roll their own persistant state management 
> perhaps we can offer something to them via the ProcessContext which will 
> allow them to save simple primitive values and limited length Strings which 
> are local to that node and which are local to that processor only.



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

Reply via email to