Support Questions

Find answers, ask questions, and share your expertise

CDF - Add NiFi CA Service Service to Cluster - FileNotFoundException

avatar
Explorer

Using CM with CDF, using Parcels, trying to Add NiFi CA Service to cluster. Got the following error while trying to activate roles:

 

at com.cloudera.cfg.tools.XmlTools.parseXml(XmlTools.java:122)
	at com.cloudera.cfg.tools.XmlTools.parseHadoopXmlConf(XmlTools.java:51)
	at com.cloudera.cfg.configuration.Configuration.getGlobals(Configuration.java:73)
	at com.cloudera.cfg.configuration.Configuration.substitute(Configuration.java:89)
	at com.cloudera.cfg.configuration.Configuration.load(Configuration.java:57)
	at com.cloudera.cfg.JobProcessor.<init>(JobProcessor.java:45)
	at com.cloudera.cfg.Main.main(Main.java:30)
Caused by: java.io.FileNotFoundException: /var/run/cloudera-scm-agent/process/59-nifitoolkitca-NIFI_TOOLKIT_SERVER/staging/globals.xml (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at java.io.FileInputStream.<init>(FileInputStream.java:93)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:623)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:148)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:806)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
	at com.cloudera.cfg.tools.XmlTools.parseXml(XmlTools.java:120)
	... 6 more

Any advice?
1 ACCEPTED SOLUTION

avatar
Master Guru

@anung,

 

I also used the instructions here:  https://docs.hortonworks.com/HDPDocuments/CFM/CFM-1.0.1/installation/content/overview.html

 

I tested by making sure that the CA service could not access /var/lib/nifitoolkit and reproduced the error you are seeing.

 

I did the following:

 

chown root:root nifitoolkit/

chmod 700 nifitoolkit/

 

drwx------ 3 root root 4096 Jul 13 13:44 nifitoolkit

 

 

I get:

Caused by: java.io.FileNotFoundException: /var/run/cloudera-scm-agent/process/2549-nifitoolkitca-NIFI_TOOLKIT_SERVER/staging/globals.xml (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)

 

 So, yes, the process must be able to create the /var/lib/nifitoolkit directory and it must be owned by "nifitoolkit".

 

You can try:

mkdir /var/lib/nifitoolkit

chown -R nifitoolkit:nifitoolkit /var/lib/toolkit

 

Then try restarting.  If there is still a problem, let's look at your ls -lart /var/lib output

 

 

View solution in original post

11 REPLIES 11

avatar
Explorer

Adding Sys Info:

OS: RHEL7

CDH 6.2.0 (Parcels)

CM 1.0.0.0

 

avatar
Explorer

In looking around the fs, I see that the missing files are in fact under a different path, starting at /var/run/cloudera-scm-agent/process/.

 

The files are in /var/run/cloudera-scm-agent/process/89-nifitoolkitca-NIFI_TOOLKIT_SERVER.

 

Does anyone know why the parcel installer would put files in a location that is slightly different, but still in the .../process/... path?

avatar
New Contributor

hi Sheldon_G

 

did you or solve this problem?

i'm facing same error during reinstall of NiFiCA.

i've looked for any documentation but nothing found...

 

thanks for any halp

avatar
Explorer

Nando - no I am still waiting for guidance to get this issue resolved. If I get any resolution I will update this thread.

avatar
New Contributor
yup, me too, trying with CDF 1.0.1.0 got this exact error message

avatar
Master Guru

@anung @Sheldon_G @Nando ,

 

I'm sorry to hear you are hitting this issue.  Let me walk through the install and see if I can lend a hand.  What instructions are you using? 

avatar
Master Guru

I tested on CM 6.2 and did not encounter the problem on CFM 1.0.1.0.

My process directory (created by CM/agent for the process to start) does not include the file.

However, the config.zip that is in the process directory does contain it:

 

[root@host-10-17-100-225 2537-nifitoolkitca-NIFI_TOOLKIT_SERVER]# unzip -l config.zip
Archive: config.zip
Length Date Time Name
--------- ---------- ----- ----
2094 07-13-2019 13:44 staging/globals.xml
1192 07-13-2019 13:44 logback.xml
828 07-13-2019 13:44 scripts/cc.sh
294 07-13-2019 13:44 cloudera-monitor.properties
238 07-13-2019 13:44 aux/configbuilder/ca-config.json
0 07-13-2019 13:44 redaction-rules.json
308 07-13-2019 13:44 cloudera-stack-monitor.properties
1205 07-13-2019 13:44 aux/templates/env.sh
1280 07-13-2019 13:44 aux/templates/config.json
989 07-13-2019 13:44 aux/templates/hadoop_xml_properties.j2
2332 07-13-2019 13:44 scripts/control.sh
1006 07-13-2019 13:44 aux/configbuilder/control-env.json
809 07-13-2019 13:44 aux/defaults/nifi-ca-client.xml

 

I saw one hint in an internal discussion that permissions on /var/lib/nifi* could be an issue... can you do an "ls -lrt /var/lib/nifi*" and show the results?

 

I'll work with the NiFi team on Monday to see if we can get this working for you.

avatar
New Contributor

Hi Bgooley,

thank you for responding, I tried sith Support Portal but CDF is not there yet 😛

I dont have /var/lib/nifi in the server. strange...

should I mkdir manually?

 

I'm using instruction from Hortonworks sites

avatar
Master Guru

@anung,

 

I also used the instructions here:  https://docs.hortonworks.com/HDPDocuments/CFM/CFM-1.0.1/installation/content/overview.html

 

I tested by making sure that the CA service could not access /var/lib/nifitoolkit and reproduced the error you are seeing.

 

I did the following:

 

chown root:root nifitoolkit/

chmod 700 nifitoolkit/

 

drwx------ 3 root root 4096 Jul 13 13:44 nifitoolkit

 

 

I get:

Caused by: java.io.FileNotFoundException: /var/run/cloudera-scm-agent/process/2549-nifitoolkitca-NIFI_TOOLKIT_SERVER/staging/globals.xml (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)

 

 So, yes, the process must be able to create the /var/lib/nifitoolkit directory and it must be owned by "nifitoolkit".

 

You can try:

mkdir /var/lib/nifitoolkit

chown -R nifitoolkit:nifitoolkit /var/lib/toolkit

 

Then try restarting.  If there is still a problem, let's look at your ls -lart /var/lib output