Oozie error while trying to execute “bin/mkdistro.sh -DskipTests”

♀尐吖头ヾ 提交于 2019-12-11 02:58:56

问题


Trying to install oozie 4.0.1 following http://www.thecloudavenue.com/2013/10/installation-and-configuration-of.html
hadoop version - 2.4.0
maven - 3.0.4
sqoop - 1.4.4

while trying to execute "bin/mkdistro.sh -DskipTests", failed building

..........
[INFO] Apache Oozie HCatalog Libs ........................ SUCCESS [0.399s]
[INFO] Apache Oozie Core ................................. FAILURE [7.819s]
[INFO] Apache Oozie Docs ................................. SKIPPED
.........
[ERROR] Failed to execute goal on project oozie-core: Could not resolve dependencies for project org.apache.oozie:oozie-core:jar:4.0.0: The following artifacts could not be resolved: org.apache.oozie:oozie-hadoop-test:jar:2.4.0.oozie-4.0.0, org.apache.oozie:oozie-hadoop:jar:2.4.0.oozie-4.0.0, org.apache.oozie:oozie-sharelib-oozie:jar:4.0.0-cdh5.0.2, org.apache.oozie:oozie-sharelib-hcatalog:jar:4.0.0-cdh5.0.2: Failure to find org.apache.oozie:oozie-hadoop-test:jar:2.4.0.oozie-4.0.0 in htp://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] htp://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :oozie-core


anybody tried oozie4.0.1 with hadoop 2.4.0? how can I solve this issue?


回答1:


Me too faced the same probelm.

Try this installtion steps it is worked for me change the versions in below steps depends on what version you need.

STEP 1 : Extract the tar file using tar -xvf oozie-4.0.1.tar.gz
STEP 2 : Change the name oozie-4.0.1 to oozie using below command.
mv oozie-4.0.1 oozie
STEP 3 : Move to oozie/bin directory using cd oozie/bin Build oozie for 
             Hadoop-2.2 using below command.
mkdistro.sh -DskipTests Dhadoopversion=2
             Before build oozie we must change versions for java, hive pig, 
             sqoop in pom.xml file.
                    Java   - 1.7
                    Hive    - 0.13.0
                    Pig      - 0.12.1
                    Sqoop - 1.4.3


        Eg : <javaVersion>1.7</javaVersion>
             <targetJavaVersion>1.7</targetJavaVersion>
             <hive.version>0.13.0</hive.version>
             <pig.version>0.12.1</pig.version>
             <pig.classifier></pig.classifier>
             <sqoop.version>1.4.3</sqoop.version>
             If build is success you will get the message like 
             Oozie distro created, DATE[2014.01.05-18:55:14GMT] VC-  
               REV[unavailable], available at 
               [/home/labuser/oozie/distro/target]
             Now use the expanded oozie located in   
             /home/labuser/oozie/distro/target/oozie-4.0.1-distro/oozie-4.0.1
STEP 4 : Create a libext directory in expanded oozie and copy the 
             Hadoop-2.2.0 jar files and extjs zip file to libext directory.
STEP 5 : Set this property in Hadoop core-site.xml file.
        Eg : <property>
             <name>hadoop.proxyuser.labuser.hosts</name>
             <value>*</value>
             </property>
             <property>
             <name>hadoop.proxyuser.labuser.groups</name>
             <value>*</value>
             </property>
             Set this property in oozie-site.xml file located in conf directory
              <name>oozie.service.JPAService.create.db.schema</name>
              <value>true</value>
              By default it is false change it to true

Step 6 : Now prepare a oozie war file. So move to expanded oozie/bin 
             and run the below command. 
./oozie-setup.sh prepare-war
             If you get any error like zip: command not found then install 
             zip using following command sudo apt-get install zip
            Then again run the prepare-war command to create a file. if the
             war file created successfully you will get the message like 
                  INFO: Oozie is ready to be started
Step 7 : upload the share lib folder from expanded oozie to hdfs using the
            below command
./oozie-setup.sh sharelib create -fs hdfs://localhost:8020
Step 8 : Create a database for oozie using the command 
./oozie-setup.sh db create –run
              If database created then you will get the message like
setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
Validate DB Connection 
DONE 
Check DB schema does not exist 
DONE 
Check OOZIE_SYS table does not exist 
DONE 
Create SQL schema 
DONE 
Create OOZIE_SYS table 
DONE
Oozie DB has been created for Oozie version ’4.0.0′
Step 9 : Start the oozie using ./oozied.sh start


Step 10 : Check status of oozie using the below command
              ./oozie admin –oozie http://localhost:11000/oozie -status
              You will get the message like System mode: NORMAL


Issues Faced with this installation
1.  While building hive-0.13.0 share library of Oozie, there is an unsolvable dependency ‘hive-builtins’. 
Cause: Hive-builtins jar is necessary in hive-0.10.0 but in hive-0.13.0 there is no hive-builtins.jar.
Solution: Removed dependency hive-builtins
2.  While building Oozie, we faced issue with java.lang.OutOfMemoryError
Cause: This error signals that the JVM running Maven has run out of memory. It is caused by maven-compiler-plugin
Solution: Edited a maven-compiler-plugin property
<fork>true</fork>
Fork allows running the compiler in a separate process. If false it uses the built in compiler, while if true it will use an executable.

Finally we made a Oozie bulid, with above versions of  Hadoop-ecosystems.



回答2:


I have stumbled on the same error and I did a quick search on Google, just to find out that there is a JIRA ticket still open to move the hadoop-2 profile to Hadoop 2.4.0

https://issues.apache.org/jira/browse/OOZIE-1730

I have no idea how hard is that to do, but the build fails to me in exactly the same way.




回答3:


Please see.

I built 4.0.1 + Hadoop 1.2.1 + Hive 0.10.0.

QQ: when you are saying Hadoop = 2.4.1 , it is what you have changed in the pom.xml of oozie or ?

When I build with custom version of hadoop and hive, I have to change the

a. <OOZIE_BUILD_HOME>/pom.xml
b. <OOZIE_BUILD_HOME>/hadooplibs/hadoop-1/pom.xml
c. <OOZIE_BUILD_HOME>/hadooplibs/hadoop-distcp-1/pom.xml
d. <OOZIE_BUILD_HOME>/hadooplibs/hadoop-test-1/pom.xml 

The default version for hadoop is 1.1.1 so find and replace with which every version you want. like in my case I did to 1.2.1

Other similar way is to change pom.xml related to Hadoop 2.

Please let me know if there any question.

Regards, Manish



来源:https://stackoverflow.com/questions/24429327/oozie-error-while-trying-to-execute-bin-mkdistro-sh-dskiptests

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!