메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


1. maven다운로드
cd /usr/local

wget http://mirror.apache-kr.org/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz

--2015-04-30 15:32:17--  http://mirror.apache-kr.org/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz
Resolving mirror.apache-kr.org... 182.161.117.136
Connecting to mirror.apache-kr.org|182.161.117.136|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7956528 (7.6M) [application/x-gzip]
Saving to: “apache-maven-3.2.5-bin.tar.gz”

100%[==========================================================================================================================>] 7,956,528   11.2M/s   in 0.7s    

2015-04-30 15:32:23 (11.2 MB/s) - “apache-maven-3.2.5-bin.tar.gz” saved [7956528/7956528]

2. 압축풀기
tar xvfz apache-maven-3.2.5-bin.tar.gz

3. 링크걸기
 ln -s apache-maven-3.2.5 maven

4. M2_HOME환경변수및 PATH 설정
vi /etc/profile
export M2_HOME=/usr/local/maven
export PATH=$PATH:$M2_HOME/bin

* 변경반영 : source /etc/profile

5. oozie 4.1다운로드
  wget http://mirror.apache-kr.org/oozie/4.1.0/oozie-4.1.0.tar.gz
5-1. 기본적으로 hadoop 1.1.1을 기준으로 build되므로  hadoop 2.5.2로 컴파일 되도록 정보르 수정해준다.

6. 컴파일(default는 hadoop 1.1.1버젼으로 컴파일 되므로 -P hadoop-2를 지정하여 hadoop 2버젼으로 컴파일한다)
 cd oozie-4.1.0/bin
 ./mkdistro.sh -P hadoop-2 -DskipTests
 (컴파일 완료후 결과파일 생성위치 : /home/hadoop/oozie-4.1.0/distro/target/oozie-4.1.0-distro.tar.gz)

7. 6번 빌드파일을 설치할 위치로 복사후 압축풀기및 링크생성
cp ./oozie-4.1.0-distro.tar.gz /usr/local
cd /usr/local
tar xvfz oozie-4.1.0-distro.tar.gz
ln -s oozie-4.1.0/ oozie

8. war파일에 추가할 hadooplibs및 및 각종 jar파일 복사
mkdir libext
wget -P libext http://extjs.com/deploy/ext-2.2.zip
cd libext
wget http://dev.sencha.com/deploy/ext-2.2.zip
cp -R ../oozie-4.1.0/hadooplibs/hadoop-2/target/hadooplibs/hadooplib-2.4.1.oozie-4.0.1/* libext
cp mysql-connector~.jar libext

* war파일 변경
[root@master oozie]$ oozie-setup.sh prepare-war
* 이전에 oozie-setup.sh 실행시 -extjs옵션을 주었는데 지금은 별도로 옵션을 주지 않고 libext폴더에 ext-2.2.zip파일을 복사애 놓고
oozie-setup.sh을 실행하면 자동으로 찾아서 설정해주는것으로 바뀌었다.

  setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"

INFO: Adding extension: /hadoop/oozie/libext/activation-1.1.jar
INFO: Adding extension: /hadoop/oozie/libext/avro-1.7.4.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-beanutils-1.7.0.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-beanutils-core-1.8.0.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-cli-1.2.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-codec-1.4.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-collections-3.2.1.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-compress-1.4.1.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-configuration-1.6.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-digester-1.8.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-httpclient-3.1.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-io-2.1.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-lang-2.4.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-logging-1.1.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-math3-3.1.1.jar
INFO: Adding extension: /hadoop/oozie/libext/commons-net-3.1.jar
INFO: Adding extension: /hadoop/oozie/libext/guava-11.0.2.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-annotations-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-auth-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-client-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-common-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-hdfs-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-mapreduce-client-app-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-mapreduce-client-common-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-mapreduce-client-core-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-mapreduce-client-jobclient-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-mapreduce-client-shuffle-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-yarn-api-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-yarn-client-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-yarn-common-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/hadoop-yarn-server-common-2.3.0.jar
INFO: Adding extension: /hadoop/oozie/libext/httpclient-4.2.5.jar
INFO: Adding extension: /hadoop/oozie/libext/httpcore-4.2.4.jar
INFO: Adding extension: /hadoop/oozie/libext/jackson-core-asl-1.8.8.jar
INFO: Adding extension: /hadoop/oozie/libext/jackson-mapper-asl-1.8.8.jar
INFO: Adding extension: /hadoop/oozie/libext/jaxb-api-2.2.2.jar
INFO: Adding extension: /hadoop/oozie/libext/jersey-core-1.9.jar
INFO: Adding extension: /hadoop/oozie/libext/jetty-util-6.1.26.jar
INFO: Adding extension: /hadoop/oozie/libext/jsr305-1.3.9.jar
INFO: Adding extension: /hadoop/oozie/libext/log4j-1.2.16.jar
INFO: Adding extension: /hadoop/oozie/libext/paranamer-2.3.jar
INFO: Adding extension: /hadoop/oozie/libext/postgresql-9.3-1103.jdbc4.jar
INFO: Adding extension: /hadoop/oozie/libext/protobuf-java-2.5.0.jar
INFO: Adding extension: /hadoop/oozie/libext/servlet-api-2.5.jar
INFO: Adding extension: /hadoop/oozie/libext/slf4j-api-1.6.6.jar
INFO: Adding extension: /hadoop/oozie/libext/slf4j-log4j12-1.6.6.jar
INFO: Adding extension: /hadoop/oozie/libext/snappy-java-1.0.4.1.jar
INFO: Adding extension: /hadoop/oozie/libext/stax-api-1.0-2.jar
INFO: Adding extension: /hadoop/oozie/libext/xmlenc-0.52.jar
INFO: Adding extension: /hadoop/oozie/libext/xz-1.0.jar
INFO: Adding extension: /hadoop/oozie/libext/zookeeper-3.4.5.jar

New Oozie WAR file with added 'ExtJS library, JARs' at /hadoop/oozie/oozie-server/webapps/oozie.war


INFO: Oozie is ready to be started

9. 환경변수 설정(/etc/profile)
export OOZIE_HOME=/hadoop/oozie
export PATH=$PATH:$OOZIE_HOME/bin

* 변경반영 : source /etc/profile

10. db관련정보 수정(oozie-site.xml)
   <property>
        <name>oozie.db.schema.name</name>
        <value>ooziedb</value>
        <description>
            Oozie DataBase Name
        </description>
    </property>

    <property>
        <name>oozie.service.JPAService.create.db.schema</name>
        <value>false</value>
        <description>
            Creates Oozie DB.

            If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
            If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
        </description>
    </property>
    <property>
        <name>oozie.service.JPAService.jdbc.driver</name>
        <value>org.postgresql.Driver</value>
        <description>
            JDBC driver class.
        </description>
    </property>

    <property>
        <name>oozie.service.JPAService.jdbc.url</name>
        <value>jdbc:postgresql://node1//${oozie.db.schema.name}</value>
        <description>
            JDBC URL.
        </description>
    </property>


    <property>
        <name>oozie.service.JPAService.jdbc.username</name>
        <value>oozie</value>
        <description>
            DB user name.
        </description>
    </property>

    <property>
        <name>oozie.service.JPAService.jdbc.password</name>
        <value>oozie_pass</value>
        <description>
            DB user password.

            IMPORTANT: if password is emtpy leave a 1 space string, the service trims the value,
                       if empty Configuration assumes it is NULL.
        </description>
    </property>

*아래 부분에 대한 주석을 풀어주고 #USER#값을 반드시 oozie실행 게정(예, hadoop 혹은 oozie)으로 변경한다.
(여기서 지정된것은 core-site.xml에 지정한 proxy와 반드시 일치할 필요가 없나?? 여기는 oozie로 하고 core-site.xml에는 hadoop
으로 지정해도 실행된다.??)

<property>

        <name>oozie.service.ProxyUserService.proxyuser.#USER#.hosts</name>

        <value>*</value>

        <description>

            List of hosts the '#USER#' user is allowed to perform 'doAs'

            operations.


            The '#USER#' must be replaced with the username o the user who is

            allowed to perform 'doAs' operations.


            The value can be the '*' wildcard or a list of hostnames.


            For multiple users copy this property and replace the user name

            in the property name.

        </description>

    </property>


    <property>

        <name>oozie.service.ProxyUserService.proxyuser.hadoop.groups</name>

        <value>*</value>

        <description>

            List of groups the '#USER#' user is allowed to impersonate users

            from to perform 'doAs' operations.


            The '#USER#' must be replaced with the username o the user who is

            allowed to perform 'doAs' operations.


            The value can be the '*' wildcard or a list of groups.


            For multiple users copy this property and replace the user name

            in the property name.

        </description>

    </property>


11. core-site.xml

oozie job을 실행하는 계정에 대한 권한부여(두개다 <value></value>에 *을 부여해도됨)


<property>
         <name>hadoop.proxyuser.[userId].hosts</name>
         <value>MasterNode</value>
</property>
<property>
         <name>hadoop.proxyuser.[userId].groups</name>
         <value>[userId]</value>
</property>


12. 더비대신 mysql사용하도록 설정된 정보를 이용하여 db및 관련table생성
./ooziedb.sh create -sqlfile oozie.sql -run

13. 확인(command)
[root@master logs]$ oozie admin -oozie http://localhost:11000/oozie -status
System mode: NORMAL

14. 확인URL
http://master:11000/oozie/
* 어느정도 시간이 지나면 오류가 발생하면서 oozied가 다운되면서 catalina.out파일에 
java.lang.NoClassDefFoundError: org/apache/hadoop/util/ShutdownHookManager라는 오류가 발생하면
hadoop의 common라이브러리를 oozie설치폴더의 lib에 복사하고(/usr/local/hadoop/share/hadoop/common/hadoop-common-2.5.2.jar /usr/local/oozie/lib), oozied.sh stop, oozied.sh start하여 oozie데몬을 다시 기동시켜준다.



번호 제목 날짜 조회 수
23 oozie의 sqoop action수행시 ooize:launcher의 applicationId를 이용하여 oozie:action의 applicationId및 관련 로그를 찾는 방법 2023.07.26 181
22 [HA구성 이슈]oozie 2대를 L4로 HA구성했을때 발생하는 이슈 2023.01.17 281
21 [oozie]oozie ssh action으로 패스워드 없이 다른 서버에 ssh로그인 하여 shellscript호출하는 설정하는 방법 2022.11.10 1569
20 [TLS/SSL]Cloudera 6.3.4기준 Oozie Web UI TLS설정 항목및 설정값 2022.05.13 1150
19 Error: IO_ERROR : java.io.IOException: Error while connecting Oozie server 2022.05.02 1452
18 oozie webui접근시 id/pw를 물어보는 Windows보안 팝업창이 뜰때 확인/조치방법 2022.05.02 1557
17 Could not authenticate, GSSException: No valid credentials provided (Mechanism level: Failed to find any kerberos tgt) 2022.04.28 1150
16 [oozie]Oozie WF수행시 단계별 ID넘버링 비교/설명 2022.03.23 230
15 클러스터내의 전체 workflow및 coordinator현황을 사용자별로 추출하는 방법 2021.11.25 1207
14 [oozie] oozie shell action에서 shellscript수행결과의 2개 변수를 decision 액션에서 사용하기 2020.06.05 896
13 mysql sqoop작업을 위해서 mysql-connector-java.jar을 추가하는 경우 확실하게 인식시키는 방법 2020.05.11 823
12 oozie WF에서 참고할만한 내용 2019.07.18 353
11 "File /user/hadoop/share/lib does not exist" 오류 해결방법 2015.06.07 1268
10 Error: E0501 : E0501: Could not perform authorization operation, User: hadoop is not allowed to impersonate hadoop 해결하는 방법 2015.06.07 1335
9 java.lang.ClassNotFoundException: org.apache.hadoop.util.ShutdownHookManager 오류조치사항 2015.05.20 1311
» oozie 4.1 설치 - maven을 이용한 source compile on hadoop 2.5.2 with postgresql 9.3 2015.04.30 1365
7 Cannot create /var/run/oozie/oozie.pid: Directory nonexistent오류 2014.06.03 959
6 oozie job 구동시 JA009: User: hadoop is not allowed to impersonate hadoop 오류나는 경우 2014.06.02 1014
5 oozie의 meta정보를 mysql에서 관리하기 2014.05.26 1791
4 특정파일이 생성되어야 action이 실행되는 oozie job만들기(coordinator.xml) 2014.05.20 1178
위로