NiFi Build Errors - maven

I'm trying to build Apache NiFi after cloning it from https://github.com/apache/nifi and it keeps failing on the tests on the nifi-standard-processors project. I opened up the output file in the surefire-reports directory and there's the below error that it can't run program "cmd" in directory /var/test, because no such file or directory exists. The first time I ran the install it didn't exist, but I created it and I still get the error message. I do a sanity check every time to make sure the directory still does exist. Does anyone have any idea what might be causing this issue? I'm only taking a very few steps to do this. They are posted below. I'm logged on as root on a CentOS Linux VM. Thanks in advance for any help.
Steps:
cd /tmp
git clone https://github.com/apache/nifi
cd nifi
mvn clean install
[main] ERROR org.apache.nifi.processors.standard.ExecuteProcess - ExecuteProcess[id=a8d6b3a3-befa-4b74-a962-330bd021ec7b] Failed to create process due to java.io.IOException: Cannot run program "cmd" (in directory "/var/test"): error=2, No such file or directory: java.io.IOException: Cannot run program "cmd" (in directory "/var/test"): error=2, No such file or directory

I believe this is due to a recent commit "solving" this ticket[1]. I actually already reopened[2] it due to failures on TravisCI and the contributor is currently working on a fix.
In order to build now, you can tell maven to "skip tests" by running the command with the proper flag: mvn clean install -Dmaven.test.skip=true
[1] https://issues.apache.org/jira/browse/NIFI-2905
[2] https://issues.apache.org/jira/browse/NIFI-2905?focusedCommentId=15603258&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15603258

Related

Jenkins Blue Ocean ./gradlew: No such file or directory

I am having trouble getting Blue Ocean to recognize where my default gradle folder is on my Mac OSX. I have GRADLE_HOME set to /opt/gradle.
I keep getting the following error message when running my shell script ./gradlew assembleDebug:
/Users/me/.jenkins/workspace/project#tmp/durable-d97717dc/script.sh:
line 2: ./gradlew: No such file or directory
script returned exit code 1
I could see two reasons for that error:
Your script is not executed in the folder where your gradlew lays.
The gradlew has not set the correct permissions set for the calling user.
Adding a check for existing and the correct permissions on the file to execute could help you to sort these problems out.

Error in Maven goal inside Jenkins on Docker in Windows

I am trying to setup jenkins on docker in my windows machine. Everything was going smooth until I configured the maven goal in Jenkins. It looks like maven is overlooking the Jenkins_home path configured while starting the docker. I used the following command during startup
docker run -p 8080:8080 -p 50000:50000 -v //D/jenkins:/var/jenkins_home Jenkins
I also tried the following
docker run -p 8080:8080 -p 50000:50000 -v jenkins_home://D/jenkins_workspace jenkins
but I keep getting the error
[crazywebapp_dev] $ mvn clean install
FATAL: command execution failed java.io.IOException: error=2, No such
file or directory at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:247) at
java.lang.ProcessImpl.start(ProcessImpl.java:134) at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) Caused:
java.io.IOException: Cannot run program "mvn" (in directory
"/var/jenkins_home/workspace/crazywebapp_dev"): error=2, No such file
or directory at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at
hudson.Proc$LocalProc.(Proc.java:249)
I believe it has got to do something with maven because the Jenkins workspace is getting created in my D: drive and the code is checked out successfully from bit bucket and the workspace contents shows up in Jenkins. I have also noticed that even though the workspace is created in my D: drive, Jenkins_home still shows up as /var/Jenkins_home in the Jenkins config page. Please help me figure this out.
I have also noticed that even though the workspace is created in my
D: drive, Jenkins_home still shows up as /var/Jenkins_home in the
Jenkins config page. Please help me figure this out.
From the containers perspective, there is no D: drive, the jenkins_home will always be /var/jenkins_home inside the container.
The syntax -v //D/jenkins:/var/jenkins_home means mount D:\jenkins onto /var/jenkins_home inside the container. This will effectively just replace or backup the containers jenkins home in the jenkins folder.
The syntax -v jenkins_home://D/jenkins_workspace is not useful. It means "create" a /D/jenkins_workspace directory inside the container and use a named volume called jenkins_home to backup this folder. This is not useful.
The main problem that you have, is that maven is not installed inside the jenkins container. Thus jenkins clearly can't find it. You need to configure maven to be installed. You can do that in jenkins, by going to:
Manage Jenkins > Configure System > Maven section and then configure it to install maven automatically.

Ant fails on Slave Jenkins on Mac

I am getting this error:-
Cannot run program "ant" (in directory "/Users/test/~/.jenkins/~/.jenkins/workspace/"): error=2, No such file or directory.
As you can see that directory path is somehow messed up. I dont have idea where to fix it. I am new to jenkins so plz try to be descriptive.
I have slave jenkins in mac under user:- test/.jenkins

Openshift application deployment git

I am creating openshift application during application creation it will give error mention below....
When I see my open shift account application is created.
An exception occurred while creating local git repository.
Clone operation failed, with failed cleanup: Could not delete file C:\Program Files (x86)\Git\y. Manual cleanup may be required.
So how i do manual clean up git respository
It's most likely because that C:\Program Files (x86)\Git\y might already exist and can't automatically be removed. You'll need to remove that file manually.
I'm guessing that you're trying to clone your application into your C:\Program Files (x86)\Git\ which I wouldn't recommend since this is the binary folder for GIT. Try running the rhc app create in your home folder C:\Users\<yourusername and see if that gives you better results.

Jenkins Windows slave failing the Play! framework build

We are using the Play! framework and I've setup our Jenkins CI to run auto-test and other things on a master Unix machine. As a second step I want to setup a windows slave to run some in browser webdriver tests. Unfortunately my build doesn't get to that point. The source checks out fine in the workspace directory. As a first build step I run
play clean
Which seems to fail everytime. I've given full permissions to admin for that directory and I'm running the jenkins slave under that administrator like so
runas /noprofile /user:DOMAIN\Administrator "javaws http://jenkins:8080/computer/Keith/slave-agent.jnlp"
The console output I see from jenkins is:
Building remotely on Keith in workspace C:\Documents and Settings\administrator\My Documents\Jenkins\workspace\windows
Updating http://svnrepo..
At revision 448
no change for http://svnrepo.. since the previous build
play path is C:\Software\Play\play
Executing C:\Software\Play\play clean "C:\Documents and Settings\administrator\My Documents\Jenkins\workspace\windows"
[windows] $ C:\Software\Play\play clean "C:\Documents and Settings\administrator\My Documents\Jenkins\workspace\windows"
Build step 'Play!' marked build as failure
Finished: FAILURE
Note that when I run the command below manually on the windows box it works fine:
C:\Software\Play\play clean "C:\Documents and Settings\administrator\My Documents\Jenkins\workspace\windows"
Anyone got any ideas what I'm doing wrong?
Thanks!
I had the same problem and I solved it by adding .bat at the end of play path. In your case, you should configure play path in jenkins as C:\Software\Play\play.bat (not just C:\Software\Play\play).

Resources