workflow 를 시스템에 적용해보기 위해
Hadoop WMS(Workflow Management System) 에 대해서 알아보고 있다.
우선 검토한 시스템은 Oozie 와 Azkaban, Cascading, Hamake 를 조사해봤다.
이번에는 실제로 oozie 를 설치해보려고 시도했지만 실패..
혹시 원인을 아시는 분은 알려주세요..ㅠㅠ
oozie 를 설치하기 위해 시도해본 내용은 아래와 같다..
oozie 설치
1. mysql 에 oozie db 생성
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 806517 Server version: 5.5.20-log MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | hive | | mysql | | performance_schema | | test | +--------------------+ 8 rows in set (0.03 sec) mysql> create database oozie; Query OK, 1 row affected (0.02 sec) mysql> grant all privileges on oozie.* to oozie@host identified by 'passwd' with grant option; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.03 sec) |
접속 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
]$ mysql -h host -u oozie -p oozie Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 806697 Server version: 5.5.20-log MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> |
2. oozie 다운
1 2 3 4 |
]$ cd /home/oozie ]$ wget https://github.com/downloads/yahoo/oozie/oozie-3.0.2-distro.tar.gz ]$ tar xvzf oozie-3.0.2-distro.tar.gz ]$ ln -s oozie-3.0.2 oozie |
3. oozie war 에 mysql-connector와 extjs 포함 시키기
1 2 3 4 5 6 7 |
]$ pwd /home/oozie/oozie ]$ ./bin/oozie-setup.sh -jars /home/oozie/mysql-connector-java-5.1.20.jar -extjs /home/oozie/ext-2.2.zip New Oozie WAR file with added 'ExtJS library, JARs' at /home/oozie/oozie/oozie-server/webapps/oozie.war INFO: Oozie is ready to be started |
4. oozie-site.xml 설정
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
]$ pwd /home/oozie/oozie/cont ]$ vi oozie-site.xml ... <property> <name>oozie.service.StoreService.jdbc.driver</name> <value>com.mysql.jdbc.Driver</value> <description> JDBC driver class. </description> </property> <property> <name>oozie.service.StoreService.jdbc.url</name> <value>jdbc:mysql://host:3306/oozie</value> <description> JDBC URL. </description> </property> <property> <name>oozie.service.StoreService.jdbc.username</name> <value>oozie</value> <description> DB user name. </description> </property> <property> <name>oozie.service.StoreService.jdbc.password</name> <value>passwd</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. IMPORTANT: if the StoreServicePasswordService is active, it will reset this value with the value given in the console. </description> </property> ... |
5. oozie 시작
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
]$ bin/oozie-start.sh Setting OOZIE_HOME: /home/oozie/oozie Setting OOZIE_CONFIG: /home/oozie/oozie/conf Sourcing: /home/oozie/oozie/conf/oozie-env.sh Setting OOZIE_CONFIG_FILE: oozie-site.xml Setting OOZIE_DATA: /home/oozie/oozie/data Setting OOZIE_LOG: /home/oozie/oozie/logs Setting OOZIE_LOG4J_FILE: oozie-log4j.properties Setting OOZIE_LOG4J_RELOAD: 10 Setting OOZIE_HTTP_HOSTNAME: host Setting OOZIE_HTTP_PORT: 11000 Setting OOZIE_BASE_URL: http://host:11000/oozie Setting CATALINA_BASE: /home/oozie/oozie/oozie-server Setting CATALINA_OUT: /home/oozie/oozie/logs/catalina.out Setting CATALINA_PID: /home/oozie/oozie/oozie-server/temp/oozie.pid Using CATALINA_OPTS: -Dderby.stream.error.file=/home/oozie/oozie/logs/derby.log Adding to CATALINA_OPTS: -Doozie.home.dir=/home/oozie/oozie -Doozie.config.dir=/home/oozie/oozie/conf -Doozie.log.dir=/home/oozie/oozie/logs -Doozie.data.dir=/home/oozie/oozie/data -Doozie.config.file=oozie-site.xml -Doozie.log4j.file=oozie-log4j.properties -Doozie.log4j.reload=10 -Doozie.http.hostname=host -Doozie.http.port=11000 -Doozie.base.url=http://host:11000/oozie Using CATALINA_BASE: /home/oozie/oozie/oozie-server Using CATALINA_HOME: /home/oozie/oozie/oozie-server Using CATALINA_TMPDIR: /home/oozie/oozie/oozie-server/temp Using JRE_HOME: /usr Using CLASSPATH: /home/oozie/oozie/oozie-server/bin/bootstrap.jar Using CATALINA_PID: /home/oozie/oozie/oozie-server/temp/oozie.pid Oozie started |
6. oozie 동작 확인
1 2 |
]$ ./bin/oozie admin -oozie http://host:11000/oozie -status Error: HTTP error code: 404 : Not Found |
ㅠㅠ 왜 안되는 겨..ㅠㅠ
추가 확인 사항들…
1 2 3 4 5 6 7 8 |
]$ ps -ef |grep oozie ... oozie 24259 1 0 10:14 pts/0 00:00:03 /usr/bin/java -Djava.util.logging.config.file=/home/oozie/oozie/oozie-server/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dderby.stream.error.file=/home/oozie/oozie/logs/derby.log -Doozie.home.dir=/home/oozie/oozie -Doozie.config.dir=/home/oozie/oozie/conf -Doozie.log.dir=/home/oozie/oozie/logs -Doozie.data.dir=/home/oozie/oozie/data -Doozie.config.file=oozie-site.xml -Doozie.log4j.file=oozie-log4j.properties -Doozie.log4j.reload=10 -Doozie.http.hostname=host -Doozie.http.port=11000 -Doozie.base.url=http://host:11000/oozie -Djava.endorsed.dirs=/home/oozie/oozie/oozie-server/endorsed -classpath /home/oozie/oozie/oozie-server/bin/bootstrap.jar -Dcatalina.base=/home/oozie/oozie/oozie-server -Dcatalina.home=/home/oozie/oozie/oozie-server -Djava.io.tmpdir=/home/oozie/oozie/oozie-server/temp org.apache.catalina.startup.Bootstrap start ... ]$ netstat -anp |grep 11000 ... tcp 0 0 0.0.0.0:11000 0.0.0.0:* LISTEN 24259/java ... |
아래는 위의 에러를 해결하기위해 시도해본 내용들입니다..
1. oozie-site.xml에 oozie.services property 추가
oozie 구동시 404 관련 에러를 구글신에 검색했더니, 아래와 같은 답변을 얻을수 있었다.
http://www.ventlam.org/2012/08/14/oozie-tutorial-part-1-introductioninstall-run-example/
의 중간 부분에보면..
…
If the status is HTTP 404 Not Found,you can edit the configuration file to fix it.Open conf/oozie-default.xml with vim,copy the property “oozie.services” into oozie-site.xml. In oozie-site.xml’s ”oozie.services” property,one of the service name is “KerberosHadoopAccessorService” .Remove only ”Kerberos” which will make it “HadoopAccessorService”. And then restart oozie.The Oozie web console as Listing 1 shown:
…
그래서 바로 조치 시도 oozie-site.xml 제일 마지막부분에 아래와 같이 추가
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
]$ vi oozie-site.xml ... <property> <name>oozie.services</name> <value> org.apache.oozie.service.SchedulerService, org.apache.oozie.service.InstrumentationService, org.apache.oozie.service.CallableQueueService, org.apache.oozie.service.UUIDService, org.apache.oozie.service.ELService, org.apache.oozie.service.AuthorizationService, org.apache.oozie.service.HadoopAccessorService, org.apache.oozie.service.MemoryLocksService, org.apache.oozie.service.DagXLogInfoService, org.apache.oozie.service.SchemaService, org.apache.oozie.service.LiteWorkflowAppService, org.apache.oozie.service.JPAService, org.apache.oozie.service.StoreService, org.apache.oozie.service.CoordinatorStoreService, org.apache.oozie.service.SLAStoreService, org.apache.oozie.service.DBLiteWorkflowStoreService, org.apache.oozie.service.CallbackService, org.apache.oozie.service.ActionService, org.apache.oozie.service.ActionCheckerService, org.apache.oozie.service.RecoveryService, org.apache.oozie.service.PurgeService, org.apache.oozie.service.CoordinatorEngineService, org.apache.oozie.service.BundleEngineService, org.apache.oozie.service.DagEngineService, org.apache.oozie.service.CoordMaterializeTriggerService, org.apache.oozie.service.StatusTransitService, org.apache.oozie.service.PauseTransitService </value> <description> All services to be created and managed by Oozie Services singleton. Class names must be separated by commas. </description> </property> ... |
하지만 역시 동일한 에러..
2. /home/oozie/oozie/data 디렉토리 생성
start 할때 메세지중에 OOZIE_DATA /home/oozie/oozie/data 디렉토리가 없는 것을 발견..
디렉토리 생성
1 |
]$ mkdir /home/oozie/oozie/data |
하지만 역시 동일한 에러..
3. JDBC memory leak 문제..
서버의 catalina.out 로그 확인
로그메세지 중 JDBC 관련 에러 로그 발견.
1 2 3 4 5 6 7 8 9 |
]$ pwd /home/oozie/oozie/logs ]$ cat catalina.out ... Feb 12, 2013 11:17:46 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: The web application [/oozie] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. Feb 12, 2013 11:17:46 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: The web application [/oozie] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. ... |
관련 에러는
http://stackoverflow.com/questions/3320400/to-prevent-a-memory-leak-the-jdbc-driver-has-been-forcibly-unregistered
http://blog.naver.com/PostView.nhn?blogId=myca11&logNo=80125980831
위의 링크에서와 같이 톰캣 6.0.24 이후버전에서 이미 이 문제를 해결
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
]$ ./bin/version.sh Using CATALINA_BASE: /home/oozie/oozie/oozie-server Using CATALINA_HOME: /home/oozie/oozie/oozie-server Using CATALINA_TMPDIR: /home/oozie/oozie/oozie-server/temp Using JRE_HOME: /usr Using CLASSPATH: /home/oozie/oozie/oozie-server/bin/bootstrap.jar Server version: Apache Tomcat/6.0.32 Server built: February 2 2011 2003 Server number: 6.0.32.0 OS Name: Linux OS Version: 2.6.18-308.13.1.el5 Architecture: amd64 JVM Version: 1.6.0_22-b22 JVM Vendor: Sun Microsystems Inc. ]$ |
현재는 6.0.32 사용..
OTL 그럼 도데체 왜!!
4. 혹시 mysql 버전 문제?
mysql-connector-java-5.1.20.jar 에서 mysql-connector-java-5.1.6-bin.jar 으로 변경
1 2 |
]$ ./bin/oozie-setup.sh -jars /home/oozie/mysql-connector-java-5.1.6-bin.jar -extjs /home/oozie/ext-2.2.zip ]$ bin/oozie-start.sh |
안됨.
5. oozie 버전 문제?
2.2.2 받아서 설치시도했지만, 2.2.2에서는
oozie-setup.sh 대신 addtowar.sh를 사용해야 하며,
addtowar.sh는 hadoop 0.20 까지 지원
현재 설치된 하둡은 1.0 버전임.ㅠㅠ
1 2 3 |
]$ ./bin/addtowar.sh -inputwar /home/oozie/oozie-2.2.2-SNAPSHOT/oozie.war -outputwar /home/oozie/oozie-2.2.2-SNAPSHOT/oozie-new.war -hadoop 1.0.0 /home/hadoop/hadoop -extjs /home/oozie/ext-2.2.zip -jars /home/hadoop/hadoop/*.jar Exiting: Unsupported Hadoop version '', supported versions: 0.20.1, 0.20.2, 0.20.104 and 0.20.200 |
원인을 아시는분.. 좀 알려주세요 제가 커피 살께요~ㅠㅠ
참고
http://mixellaneous.tistory.com/1103
http://julingks.wordpress.com/2011/03/09/oozie-instsall/
3 Responses to oozie 설치 삽질기..