hadoop-2.2.0 compalition failing on Mac OS X 64bit - hadoop

[ERROR] Failed to execute goal org.codehaus.mojo:native-maven-plugin:1.0-alpha-7:javah (default) on project hadoop-common: Error running javah command: Error executing command line: Error setting up environmental variables: Cannot run program "env": error=20, Not a directory -> [Help 1]

I got the same error in windows 8. Here's what I did:
Ensure javah is copied to the path that's specified as JAVA_HOME.
Tools.jar should be copied to to the corresponding lib folder of JAVA_HOME. For ex: if JAVA_HOME is c:..\jre, tools.jar should be copied to c:..\jre\lib.
This resolved the above said error. Hope this helps.

Related

How to set up apache ranger on apple macbook pro m1

I'm trying to set up apache ranger for work using this https://github.com/apache/ranger/tree/master/dev-support/ranger-docker
however by running
mvn clean package -DskipTests
I'm getting the following error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded (prepare) on project security-admin-web: Execution prepare of goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded failed: Unable to load the mojo 'exploded' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.6' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null The entire error can be seen in this picture:
[1]
and as an alternative provided in the github, when I run:
docker-compose -f docker-compose.ranger-base.yml -f docker-compose.ranger-build.yml up
I get the error:
ranger-build | The JAVA_HOME environment variable is not defined correctly
ranger-build | This environment variable is needed to run this program
ranger-build | NB: JAVA_HOME should point to a JDK not a JRE
ranger-build | mv: cannot stat 'target/ranger-*': No such file or directory
ranger-build exited with code 1
I have also tried following https://medium.com/swlh/hands-on-apache-ranger-docker-poc-with-hadoop-hdfs-hive-presto-814344a03a17
however it gets stuck in the ranger-admin container and localhost:6080 doesn't work.
[1]: https://i.stack.imgur.com/57ubI.jpg
I was able to solve this by downgrading my maven to 3.6.3 as I was having incompatibility issues, although this particular issue was resolved by adding maven war 2.6 plug in in pom.xml but then more incompatibility issues arose so i had to uninstall and reinstall a completely different maven version and that fixed all the issues.

Jenkins ERROR: Failed to parse POMs java.io.IOException: Cannot run program error=2, No such file or directory

In jenkins I am forcing the execution to happen in one of the slaves.
in jenkins configuration I have updated the JAVA_HOME and MAVEN location to the location where its installed in the slave. When I start the build in jenkins I receive the following error
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "/home/jmeter/jdk1.8.0_112/bin/java" (in directory "/home/jmeter/apache-jmeter-2.13/bin/workspace/MyProject"): error=2, No such file or directory
PS : /home/jmeter/apache-jmeter-2.13/bin/workspace/MyProject - This directory got created and does exist in the slave machine
Can someone please share their expertise in resolving it ?
I needed to add Tool location of JDK8 for machine i run test on.
looks like there is a problem in the MVN installation. PLS make sure in the global config that you have the required mvn installation.
jenkins-->manage-->configure look for Maven installations and use automatic installation for the required version
make sure you have the JDK installation in the same config file
After wasting one day trying with different things going through different suggestions I got nothing. But, it was actually very simple. Please add the JDK path as bellow to your JDK Path in Jenkins-
/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
You should assign the JDK in the Meta Data,The JAVA_HOME of system is not work for build.
Check your Maven version selected into the Manage Jenkins->Global Configurations->Maven->Maven Installations->Install from Apache->Version is same as installed on the server and your maven project.
You might have left out a few dependencies resulting in this issue.
Go back and download java and set the path as before:
To download, use
$yum -y install java-1.8*
Set the path to
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.amzn2.0.1.x86_64
Note: Get your path using command
find /usr/lib/jvm/java-1.8* | head -n 3
This got resolved after adding maven_home and providing the path in the global properties.
Go to: Jenkins ⟶ Manage Jenkins ⟶ Global Properties ⟶ MAVEN_HOME [C:\Program Files\Apache\apache-maven-3.6.3-bin\apache-maven-3.6.3]
Just in case someone else runs into this. I was getting this error because someone setup the JDK in Global Tool Configuration to download a windows version of the JDK, but my instance of jenkins is running on linux. Once I made the change to use a linux version of the JDK my issue was resolved.

Maven not recognized in Jenkins

I have installed Tomcat 7 on Windows 8, on which Jenkins is deployed. I configured the JDK, Ant and Maven in the Jenkin settings. In the Maven section, I gave a name as LocalMaven and the MAVEN_HOME as C:\Techie\apache-maven. When I did a test build, it gave me the following error that the mvn.bat is not recognized. Then I checked by entering mvn command in CMD. It gave some maven statements, which means maven is available in the PATH variables.
After googling, I changed the MAVEN_HOME as **%M2_HOME%\bin** in Jenkin-Maven configuration. Still it did not work.
LOG:
[workspace] $ cmd.exe /C '"mvn.bat -f HighScoresServiceClient compile && exit %%ERRORLEVEL%%"'
'mvn.bat' is not recognized as an internal or external command,
operable program or batch file
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
Edited: Added the analysis
The command executed by Jenkins is [workspace] $ cmd.exe /C '"mvn.bat -f String-replacer compile && exit %%ERRORLEVEL%%"' where mvn.bat is not a valid command and so Jenkins errors out as follows that 'mvn.bat' is not recognized as an internal or external command, I think Jenkins should call the command as mvn and not mvn.bat. Can some experts correct me if I am wrong? Please let me know how to change this behaviour if I am right.
Edited: Attached the Configuration
I suppose your Tomcat server is running as a Windows service.
Did you create your MAVEN_HOME and M2_HOME as system environment variables? (idem for your PATH)
Another solution is to configure your variables in the apache-tomcat/bin/setenv.bat file:
set MAVEN_HOME=C:\Techie\apache-maven
set PATH=%MAVEN_HOME%\bin;%PATH%
I bet you've installed Maven 3.3 that has mvn.bat renamed to mvn.cmd
There is a report on this issue in Jenkins JIRA: https://issues.jenkins-ci.org/browse/JENKINS-27525

how to set requirejs plugin in maven

I move my project from ubuntu to windows, and the requirejs plugin not work!
I just change the nodejs path
<nodeExecutable>C:/Program Files/nodejs/node</nodeExecutable>
And the maven return this
[ERROR] Failed to execute goal com.github.mcheely:requirejs-maven-plugin:2.0.0:o
ptimize (default) on project interactBack: r.js exited with an error. -> [Help 1
]
I have test my project by cmd , and it works fun!
node r.js -o app.build.js
What's the problem?
I get the answer!
As is said by the author
nodeExecutable
An optional path to a nodejs executable. This should not be needed if node is in
the system path as 'node' or 'nodejs';
So, just delete the tag.

Jenkins executing maven from incorrect path

This happens for both: maven projects, and freestyle projects, when maven target is envoked, it tries to execute mvn using absolute path.
[MY-Job] $ tools/Maven/Jenkins_Private_Maven/bin/mvn -f cc/pom.xml -Ddeploy_env=xxx.dev.prv -Dbranch=dev -D-Dsmdist.target=/opt/builds -U clean test -DtestGroups=unit,delegate -Do verride:server=xxx.dev.prv
FATAL: command execution failed
java.io.IOException: Cannot run program "tools/Maven/Jenkins_Private_Maven/bin/mvn" (in directory "workspace/MY-Job"): java.io.IOException: error=2, No such file or directory
I can see that mvn is installed at user's home :
/home/jenkins/tools/Maven/Jenkins_Private_Maven/bin/mvn
but it's trying to run it from the workspace:
/home/jenkins/workspace/MY-Job/tools/Maven/Jenkins_Private_Maven/bin/mvn
Add the default maven installation under (Jenkins -> configuration)
Goto the failing job and make sure you choose the default maven installation from dropdown
Run the job. Success!
Are you sure you have set up Maven in Jenkins -> configuration like this
I have hunch you have a accidental **"."** current directory reference somewhere in your maven set up.
This looks like an auto installed Maven by Jenkins. In which case the previous answers are not correct.
It would seem in this occasion that you have not specified a "remote fs root" for your slave in the salve setup - later versions of Jenkins flag not setting this up correctly as an error.
in Jenkins 2.43:
Manage Jenkins -> Global Tool Configuration -> Maven

Resources