설치및환경설정 OS 별 JEUS7 설치및설정 2014. 01. 27
목차 OS별 JEUS7 설치및설정... 4 1. Window OS 설치... 4 1.1 설치전사전작업... 4 1.1.1 Ph 설정과정... 4 1.1.2 OS bit 확인... 6 1.2 Windows JEUS 7 install... 7 1.2.1 설치파일다운로드... 7 1.2.2 테스트환경... 7 1.2.3 설치과정... 7 1.3 cmd창을닫았을때의 JEUS 상태... 15 1.3.1 Test 진행... 15 1.3.2 모두정상기동후 cmd창에서확인... 15 1.3.3 결과확인및정리... 15 2. UNIX 계열 OS 설치... 17 2.1 설치전사전작업... 17 2.1.1 ph 설정과정... 17 2.1.2 OS bit 확인... 17 2.2 Unix JEUS7 install... 18 2.2.1 설치파일다운로드... 18 2.2.2 테스트환경... 18 2.2.3 설치과정... 18 2.3 Install 시발생될수있는 error... 20 2.3.1 disk 부족... 20 2.3.2 cpu 사용량이높을때... 20 2.3.3 tmp 디렉토리부족... 20 3. JEUS 부팅... 22 3.1 DomainAdminServer(DAS) 기동및확인... 22 3.1.1 스크립트실행... 22 3.1.2 Webadmn 접속... 22 4. Nodemanager... 25 4.1 Nodemanager 설정및기동... 25 4.1.1 설정파일... 25 4.1.2 NodeManager 기동... 25 5. MS추가및설정... 32 2
5.1. MS추가를위한입력항목 ( 표 )... 32 5.2 MS 추가작업... 32 5.2.1 MS 등록... 32 5.2.2 Listener 설정... 34 5.2.3 Web-Connection 설정... 35 6. Server stus정리... 38 6.1 SHUTDOWN... 38 6.2 STARTING... 38 6.3 RUNNING... 38 6.4 FAIURE_SUSPECTED... 39 6.5 FAILD... 39 7. DaSource... 40 7.1 DaSource 설정을위한입력항목 ( 표 )... 40 7.2 dasource 설정사전작업... 40 7.2.1 jdbc 드라이버놓기... 40 7.3 webadmin에서 dasource 설정... 41 7.3.1dasource 설정... 41 7.4 DB연동확인... 45 7.4.1 MS에 DaSource 미선택시발생되는 error 상황... 45 7.4.2 콘솔에서확인... 48 7.4.3 웹브라우저로호출해서확인... 49 3
OS 별 JEUS7 설치및설정 1. Window OS 설치 윈도우장비의경우 jdk설치후시스템변수에 java ph를설정해야한다. Log 가쌓이는 disk를제외한권장스팩은다음과같다 HDD : 약 800Mbyte ( 순수바이너리기준 ) Memory : MS1개기준으로약 1.2GByte 1.1 설치전사전작업 1.1.1 Ph 설정과정 내컴퓨터오른쪽클릭 -> 속성 고급시스템설정클릭 4
환경변수클릭 사용자변수등록 ( 새로만들기클릭후 jdk 가설정된경로를지정한다.) 5
사용자변수에등록한 JAVA_HOME 을시스템변수 (S) 의 Ph 에등록한다. 편집 -> 등록 1.1.2 OS bit 확인 cmd 창을통해서명령어로확인 (dxdiag) 운영체제항목에 bit 를확인할수있다. 6
1.2 Windows JEUS 7 install 1.2.1 설치파일다운로드 [ 설치파일 ] 설치파일다운로드 : http://technet.tmax.co.kr/kr/index.do 다운로드 엔지니어용다운로드 제품선택 OS 및 bit 선택 다운로드 1.2.2 테스트환경 OS : Windows Professional 7 JDK : 1.6.0_24 Webtob 4.1.5.3 JEUS 7.0.0.1 1.2.3 설치과정 다운로드파일을관리자권한으로실행하여설치를시작하도록해야함. 7
설치 1 단계 설치파일을실행하면다음과같은화면이뜸 8
설치 2 단계 다음과같은화면이열리면서설치작업을시작함 설치 3 단계 설치진행여부를묻는창으로 [Next] 버튼을클릭한다. 9
설치 4 단계 라이선스동의여부를묻는창으로다음과같이동의선택한후 [Next] 버튼을클릭한다. 설치 5 단계 JEUS 7 설치경로를지정해주는창으로, 다음은 default 경로이며경로를변경하고자하는경우에는변경할절대경 로를입력하여준후 [Next] 버튼을클릭한다. 10
설치 6 단계 설치타입을지정하는창으로 DAS(Domain Admin Server) 를설치할지, MS(Managed Server) 를설치할지본인의필 요에따라설치하도록한다. 본인은 DAS 로설치를진행할것이므로 DAS 를선택후 [Next] 버튼을클릭한다. 설치 7 단계 설치모드를선택하는창으로, Production Mode 와 Development Mode 가있으나엔지니어입장에서는 Production Mode 로설치를진행할경우가대다수일것이다. 그러므로 Production Mode 를클릭한다. 11
설치 8 단계 사용하고자하는 JDK 를지정해주는창으로, JEUS 7 에서는아직까지는 JDK 6 버전을권장하므로 JDK 6 버전을 ph 로설정하고 [Next] 버튼을클릭한다. 설치 9 단계 이하버전과동일하게 JEUS administror account 의패스워드를지정하고 [Next] 버튼을클릭한다. 12
설치 10 단계 사용하고자하는 Domain name 을지정하는곳으로 default 는 jeus_domain 으로나오나본인은도메인이름을 lyj_domain 으로변경하였고 [Next] 버튼을클릭한다. 설치 11 단계 설치정보에대해요약해준창으로확인후맞으면 [Install] 버튼을클릭하고맞지않을경우는 [Previous] 버튼을 클릭하여변경하도록한다. 13
설치 12 단계 설치가진행중임을나타내는창이다. 설치 13 단계 설치가완료되었음이나오며 [Done] 버튼을클릭하여설치를종료한다. UNIX 와 window 는 GUI 가다르기때문에설치모습을캡처했으며, 그이외의설정은 unix 와다르지않다. 14
1.3 cmd 창을닫았을때의 JEUS 상태 window 장비에서는 JEUS, WEBTOB 서비스등록을하지않을경우에는 jeus, webtob 기동후 cmd 창을닫지말아야 한다. 하지만 JEUS7 의경우는 cmd 창을닫더라도 DAS 는죽지않고, nodemanager 만 down 된다. 1.3.1 Test 진행 모두정상기동된것을확인한후 cmd 창을임의로닫았을때의현상을파악한다. 1.3.2 모두정상기동후 cmd 창에서확인 DAS, MS, NodeManager 를모두정상적으로기둥후 cmd 창에서명령어를통해확인 1.3.3 결과확인및정리 cmd 창을닫고나서다시 webadmin 을호출했을때정상호출이되며, 다시 startdomainadminserver 을하면다음과 같이이미기동중이라는 error 발생 << Exception >> jeus.util.jeusruntimeexception: Unable to acquire the file lock D:\TmaxSoft\JEUS 7.0\domains\jeus_domain\servers\adminServer\.workspace\tmp\adminServer.lck. The server might already be running. jeus.server.server.acquireserverlock(server.java:1249). 생략 cmd 창을닫으면 NodeManager 가죽어버리기때문에 webadmin 에서 control 을하지못함. 15
DAS 는 default 로 backgroupd 프로세스로작동하기때문에 window 환경에서하나의 cmd 창을닫아도실제프로세스 가죽지않는다. 16
2. UNIX 계열 OS 설치 Log 가쌓이는 disk 를제외한권장스팩은다음과같다 HDD : 약 800Mbyte ( 순수바이너리기준 ) Memory : MS1 개기준으로약 1.2GByte 2.1 설치전사전작업 2.1.1 ph 설정과정 명령어를통해서 java 가설치된경로확인 hptest:/user/wonyoung/jeus7/bin>which java /opt/java6/bin/java Jeus 를설치할계정홈의프로파일등록 (.bash_profile.profile 모두동일 ) ##### JAVA ##### export JAVA_HOME= /opt/jdk6.0.0.2/opt/java6 export PATH=$JAVA_HOME/bin:$PATH 명령어를통해서 ph 설정확인 hptest:/user/wonyoung>echo $JAVA_HOME /opt/jdk6.0.0.2/opt/java6 2.1.2 OS bit 확인 HP 장비비트확인 hptest:/user/wonyoung>getconf KERNEL_BITS 64 Solaris 장비비트확인 [suntest:wonyoung:/user/wonyoung] isainfo -kv 64-bit sparcv9 kernel modules Linux 장비비트확인 [infrasvr:wonyoung:/user/wonyoung] getconf LONG_BIT 64 AIX 장비비트확인 [ibmtest:wonyoung:/user/wonyoung] bootinfo -y 64 17
2.2 Unix JEUS7 install 2.2.1 설치파일다운로드 [ 설치파일 ] 설치파일다운로드 : http://technet.tmax.co.kr/kr/index.do 다운로드 엔지니어용다운로드 제품선택 OS 및 bit 선택 다운로드 2.2.2 테스트환경 OS : HP-UX ia64 JDK : 1.6.0_24 Webtob 4.1.4.0 JEUS 7.0.0.1 2.2.3 설치과정 설치를계속진행할것인가? 생략 Respond to each prompt to proceed to the next step in the installion. If you want to change something on a previous step, type 'back'. You may cancel this installion any time by typing 'quit'. 생략 PRESS <ENTER> TO CONTINUE: : Enter 라이선스에관련된정보, 서버 memory 와 disk 용량권고사항 생략 This is a legal agreement between you (either an individual or an company) and TmaxSoft, Incorpored. By opening the sealed software package and/or by using the software, you agree to be bound by the terms of this agreement. 1. Grant of License: 생략 PRESS <ENTER> TO CONTINUE :Enter 라이선스에따른사용자제한수및저작권관련정보 생략 mechanism or process in place to ensure th the number of persons using the software concurrently does not exceed the number of licenses. 2. Copyright: 생략 3. Other restrictions.. 생략 PRESS <ENTER> TO CONTINUE: : Enter DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N): Y Choose Plform 18
Choose the opering system and architecture : 1)HP-UX PA-RISC 2)HP-UX Itanium 3)Solaris UltraSPARC 4)Solaris x86 5)Solaris x64 6)AIX 5.x, 6.x, 7.x PowerPC 7)Linux Itanium 8)Linux x86 9)Linux x64 Quit) Quit Installer Choose Current System (DEFAULT: 1): 1 Enter Bit 선택화면 ->1-32Bit 2-64Bit 3- Previous ENTER THE NUMBER OF THE DESIRED CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT: 2 Enter 어떤셋팅으로 install 이되어질지를선택 (Domain Admin Server) 선택 ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT : 2 Enter Please choose the Install Set to be installed by this installer. ->1- Domain Admin Server 2- Managed Serve ENTER THE NUMBER FOR THE INSTALL SET, OR PRESS <ENTER> TO ACCEPT THE DEFAULT : Install 모드선택 (dev 모드는개발자의편의를위해 auto-reload 를켜놓았지만, 서버 resource 적측면을고려했을 때이전과동일하게 off(product mode) 를권장한다. ->1- Production Mode 2- Development Mode 3- Cancel ENTER THE NUMBER OF THE DESIRED CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT: 1 Enter Jdk 설치경로선택 ------------------- Enter the JDK ph: Enter the JDK ph (DEFAULT: ): /usr/java6_64 Enter Jeusadmin 패스워드설정 ( 통상적으로 jeusadmin 입력 ) -------------- Enter the Password for the administror account. Input Password: jeusadmin Confirm Password: jeusadmin Enter 사용자 Domain 이름설정. (default jeus_domain) ---------------- Enter the Domain name 19
Enter the domain name (DEFAULT: jeus_domain): Enter Install 시작 ------------------------ 생략 PRESS <ENTER> TO CONTINUE: Enter 인스톨시작 2.3 Install 시발생될수있는 error 2.3.1 disk 부족 설치경로에임의로 disk 공간을늘린후 df k 로봤을때 97% 상태에서 test 를한다. Not Enough Disk Space --------------------- Warning! This installion requires 769.54 MB of free disk space, but there are only 275.95 MB available : /user/wonyoung/jeus7 Please free least 493.59 MB to proceed with the installion. PRESS <ENTER> TO RECALCULATE AVAILABLE DISK SPACE, OR TYPE 'QUIT' TO EXIT THE INSTALLER: Enter 를입력하면위와같은경고메시지가지속적으로나타난다. 이럴때는 quit 를이용하여진행을 stop 하고 disk 용량을확인후조치한다. 2.3.2 cpu 사용량이높을때 임의로 GC 상황을재현한다음그때동시에 install 을시작한다. top 으로봤을때 98% 상태 Preparing to install... Extracting the installion resources from the installer archive... Configuring the installer for this system's environment... Launching installer... Preparing CONSOLE Mode Installion... # # There is insufficient memory for the Java Runtime Environment to continue. # Nive memory allocion (malloc) failed to alloce 91064 bytes for Chunk::new # An error report file with more informion is saved as: # /tmp/install.dir.6876/hs_err_pid6876.log [thread 2 also had an error] cpu 의점유율이높아서 memory 할당에실패하였으며자세한정보를 log 에남겨준다. ( 예 /tmp/install.dir.6876/ 위치 에시스템코어파일 hs_err_pid6876.log 가생성 ) 2.3.3 tmp 디렉토리부족 /tmp 디렉토리에임의의파일을 upload 하여 df k 로봤을때 99% 일때 test 진행 Preparing to install... WARNING: /tmp does not have enough disk space! Attempting to use /user/wonyoung for install base and tmp dir. Extracting the installion resources from the installer archive... msgcnt 66562 vxfs: mesg 001: vx_nospace - /dev/vg01/lvol1 file system full (1 block extent) The size of the extracted files to be installed are corrupted. Please 20
try to download the installer again and make sure th you download using 'binary' mode. Please do not tempt to install this currently downloaded copy. /tmp 디렉토리의 file system 정보가나오면서 install 이되지않는현상을겪는다. /tmp 디렉토리는제품설치시생성 되는임시파일들이저장되므로충분한공간이있어야한다. /tmp 디렉토리가부족하면 install 시 /tmp 디렉토리경로를지정해서다른경로로잡거나, 담당자에게말해서 /tmp 디 렉토리 disk 를확보하면된다. 21
3. JEUS 부팅 설치 (install) 가완료되면 JEUS7 을부팅한다. Window 계열및 UNIX 계열모두구동과정은동일하므로, Unix 계열을 토대로가이드함. 3.1 DomainAdminServer(DAS) 기동및확인 3.1.1 스크립트실행 3.1.2 Webadmn 접속 실행파일경로 : $JEUS_HOME/domains/wyj_domain/bin hptest:/user/wonyoung/jeus7/domains/wyj_domain/bin>startdomainadminserver u administro p jeusadmin & *************************************************************** - JEUS Home : /user/wonyoung/jeus7 - Java Vendor : HP - Added Java Option : -d64 -Djeus.vm.bits=64 *************************************************************** + /opt/jdk6.0.0.2/opt/java6/bin/java -server -Xmx512m - Xbootclassph/p:/user/wonyoung/jeus7/lib/system/extension.jar -classph /user/wonyoung/jeus7/lib/system/jeuslauncher.jar:/user/wonyoung/jeus7/lib/system/xalan.jar:/user/wonyoung/jeus7/lib/syste m/jaxbimpl.jar:/user/wonyoung/jeus7/lib/system/woodstox.jar:/user/wonyoung/jeus7/lib/system /xml_resource.jar:/user/wonyoung/jeus7/lib/system/commonscli.jar:/user/wonyoung/jeus7/lib/system/jaxb2-basicsruntime.jar:/user/wonyoung/jeus7/lib/system/javaee.jar:/user/wonyoung/jeus7/lib/syste m/tmaxjce_jdk15x.jar -Dsun.rmi.dgc.client.gcInterval=3600000 - Dsun.rmi.dgc.server.gcInterval=3600000 - Djava.library.ph=/user/wonyoung/jeus7/lib/system - Djava.endorsed.dirs=/user/wonyoung/jeus7/lib/endorsed - Djava.naming.factory.initial=jeus.jndi.JNSContextFactory - Djava.naming.factory.url.pkgs=jeus.jndi.jns.url -Djava.net.preferIPv4Stack=true - Djava.util.logging.manager=jeus.util.logging.JeusLogManager - Djava.util.logging.config.file=/user/wonyoung/jeus7/bin/logging.properties - Djeus.tool.webadmin.locale.language=ko -Djeus.home=/user/wonyoung/jeus7 - Djeus.jvm.version=hotspot -Djeus.tm.checkReg=true - Djeus.properties.replice=jeus,sun.rmi,java.util,java.net -d64 -Djeus.vm.bits=64 jeus.launcher.launcher -domain wyj_domain -u administror -p jeusadmin hptest:/user/wonyoung/jeus7/domains/wyj_domain/bin> ================ JEUS LICENSE INFORMATION ================ === VERSION : JEUS 7.0 (Fix#1) (7.0.0.1-b71_1) === EDITION: Enterprise (Trial License) === NOTICE: This license restricts the number of allowed clients. === Max. Number of Clients: 5 ========================================================== This license is not approprie for product runtime mode. Replace the license with an approprie one. [2013.09.26 17:19:26][2] [launcher-1] [Launcher-0012] Starting the server [adminserver] with the command. 생략 [2013.09.26 16:42:38][0] [launcher-1] [Launcher-0040] Successfully started the server. The server ste is now RUNNING. http:// server ip :port/webadmin 예 ) http://192.168.1.219:13333/webadmin 22
메시지가뜨는이유 : Server의부팅을빠르게하기위해서, Webadmin 호출시 MS를부팅할때는 fake webadmin이 deploy되며실제 webadmin은백그라운드로 deploy 된다. 실제 webadmin의 deploy가완료되면 page가변경된다. 화면이오랜시간지속되는이유 : webadmin 자체는 JEUS입장에서하나의 applicion이며, webadmin이다소무겁기때문 Default : administror / jeusadmin( istall 시입력값 ) 입력 23
Login 후첫화면 여기서 port 는 JEUS BASE 포트이다. 최초설치시 default port 는 9736 이며, adminserver 의 BASE port 이다. 변경방 법 : $JEUS_HOME/domains/jeus_domain/config/domain.xml 수정 생략 <servers> <server> <name>adminserver</name> <listeners> <name>base</base> <listen-port>13333</listen-port> 생략 </listener> 여기까지완료하면일단 DAS 는정상적으로기동이된것이며, JEUS 가부팅이된상태이다. 24
4. Nodemanager Nodemanager 는 jeus 7.0 fix 1 에서추가된방식으로, DAS 와 MS 사의의 control 을위해기동시키는실행스크립트이 다. (java type) 4.1 Nodemanager 설정및기동 4.1.1 설정파일 설정파일 : $JEUS_HOME/nodemanager/ jeusnm.properties usenodemanager=true host=192.168.1.219 port=57720 usessllistener=false servermonitoringperiod=500 serverautorestart=true serverrestarttrycount=5 serverrestartduriontime=120000 serverretryrestart=false serverautorestart 는 nodemanager 기동시 MS 가비정상적으로종료되었을경우자동으로기동시키느냐의여부이다. 4.1.2 NodeManager 기동 DAS 는기동되어있으며, serverautorestart=true 일때 최초 DAS 를기동하고나서 nodemanager 를기동하면 MS 는기동되지않고 nodemanager 만기동이된다. $JEUS_HOME/bin 에서 startnodemanager 를기동한다. hptest:/user/wonyoung/jeus7/bin>./startnodemanager & [1] 17705 hptest:/user/wonyoung/jeus7/bin>***************************************************** ********** - JEUS Home : /user/wonyoung/jeus7 - Java Vendor : HP - Added Java Option : -d64 -Djeus.vm.bits=64 *************************************************************** + /opt/jdk6.0.0.2/opt/java6/bin/java -server -Xmx512m - Xbootclassph/p:/user/wonyoung/jeus7/lib/system/extension.jar -classph /user/wonyoung/jeus7/lib/system/jeusnodemanager.jar:/user/wonyoung/jeus7/lib/system/jeusapi.jar:/user/wonyoung/jeus7/lib/ system/jeusutil.jar:/user/wonyoung/jeus7/lib/system/jeusnetwork.jar:/user/wonyoung/jeus7/lib/system/jmxremote.jar:/user/wonyoung/jeus7/lib/sy stem/jeusjaxb.jar:/user/wonyoung/jeus7/lib/system/jmxdescription.jar:/user/wonyoung/jeus7/lib/system/javaee.jar - Djava.library.ph=/user/wonyoung/jeus7/lib/system - Djava.endorsed.dirs=/user/wonyoung/jeus7/lib/endorsed - Djava.naming.factory.initial=jeus.jndi.JNSContextFactory - Djava.naming.factory.url.pkgs=jeus.jndi.jns.url -Djava.net.preferIPv4Stack=true - Djava.util.logging.manager=jeus.util.logging.JeusLogManager - Djava.util.logging.config.file=/user/wonyoung/jeus7/bin/logging.properties - Djeus.tool.webadmin.locale.language=ko -Djeus.home=/user/wonyoung/jeus7 - Djeus.jvm.version=hotspot -Djeus.properties.replice=jeus,sun.rmi,java.util,java.net -d64 -Djeus.vm.bits=64 jeus.nodemanager.jeusnodemanager Nodemanager 가정상적으로기동되었는지확인.( 프로세스확인 ) 25
26
Nodemanager 가정상적으로기동되었는지확인 ( webadmin 에서 MS 기동으로확인하기 ) Start -> 확인버튼을누르면잠시투명색으로변해있다가정상적으로기동된것을확인한다. 투명색화면으로변한상태확인. 27
server 를 kill -9( 비정상종료 ) 하고나서다시 nodemanager 를기동 Server 를죽이고다시 nodemanager 를기동하여 kill 되었던 server 자동으로기동시키는것을확인 이때 5 번의 ConnectException 이발생되며 0.5 초단위로 5 번발생한다. 이는, nodemanager 가서버재기동설정주 기 ( 시간 :120000ms) 동안재기동을시도하는횟수이며, 설정한횟수만큼시도했는데기동이되지않으면더이상 재기동을진행하지않는다. Jeusnm.properties 파일의 default 설정값 : serverrestarttrycount=5 hptest:/user/wonyoung/jeus7/bin>./startnodemanager & [1] 18433 hptest:/user/wonyoung/jeus7/bin>***************************************************** ********** - JEUS Home : /user/wonyoung/jeus7 - Java Vendor : HP - Added Java Option : -d64 -Djeus.vm.bits=64 *************************************************************** + /opt/jdk6.0.0.2/opt/java6/bin/java -server -Xmx512m - Xbootclassph/p:/user/wonyoung/jeus7/lib/system/extension.jar -classph /user/wonyoung/jeus7/lib/system/jeusnodemanager.jar:/user/wonyoung/jeus7/lib/system/jeusapi.jar:/user/wonyoung/jeus7/lib/ system/jeusutil.jar:/user/wonyoung/jeus7/lib/system/jeusnetwork.jar:/user/wonyoung/jeus7/lib/system/jmxremote.jar:/user/wonyoung/jeus7/lib/sy stem/jeusjaxb.jar:/user/wonyoung/jeus7/lib/system/jmxdescription.jar:/user/wonyoung/jeus7/lib/system/javaee.jar - Djava.library.ph=/user/wonyoung/jeus7/lib/system - Djava.endorsed.dirs=/user/wonyoung/jeus7/lib/endorsed - Djava.naming.factory.initial=jeus.jndi.JNSContextFactory - Djava.naming.factory.url.pkgs=jeus.jndi.jns.url -Djava.net.preferIPv4Stack=true - Djava.util.logging.manager=jeus.util.logging.JeusLogManager - Djava.util.logging.config.file=/user/wonyoung/jeus7/bin/logging.properties - Djeus.tool.webadmin.locale.language=ko -Djeus.home=/user/wonyoung/jeus7 - Djeus.jvm.version=hotspot -Djeus.properties.replice=jeus,sun.rmi,java.util,java.net -d64 -Djeus.vm.bits=64 jeus.nodemanager.jeusnodemanager [2013.10.09 22:35:26][2] [nodemanager-1] [NodeManager-0101] The node manager is starting. [2013.10.09 22:35:26][2] [nodemanager-1] [NodeManager-0102] Initializing the node manager configurion. [2013.10.09 22:35:26][2] [nodemanager-1] [NodeManager-0108] Beginning to listen: /192.168.1.219:55520. [2013.10.09 22:35:26][2] [nodemanager-1] [NodeManager-0115] Domain=[wyj_domain], Server=[test] [2013.10.09 22:35:26][2] [nodemanager-9] [NodeManager-0109] Processing the request... [2013.10.09 22:35:26][2] [nodemanager-10] [NodeManager-0137] Beginning to monitor the server[test] in the domain[wyj_domain]. [2013.10.09 22:35:27][2] [nodemanager-10] [NodeManager-0142] The process may not be alive(server=test, Process ID=18257). [2013.10.09 22:35:27][2] [nodemanager-10] [NodeManager-0147] An exception occurred 28
while connecting to the server[test]. << Exception >> java.net.connectexception: 연결이거부되었습니다. (errno:239) java.net.plainsocketimpl.socketconnect(nive Method) java.net.plainsocketimpl.doconnect(plainsocketimpl.java:333) java.net.plainsocketimpl.connecttoaddress(plainsocketimpl.java:195) java.net.plainsocketimpl.connect(plainsocketimpl.java:182) java.net.sockssocketimpl.connect(sockssocketimpl.java:366) java.net.socket.connect(socket.java:529) java.net.socket.connect(socket.java:479) jeus.nodemanager.monitoringserverthread.connectserver(monitoringserverthread.java:412) jeus.nodemanager.monitoringserverthread.checkserverste(monitoringserverthread.java: 208 add 4 회 ( 총 5 회발생 ) [2013.10.09 22:38:24][0] [nodemanager-10] [Launcher-0040] Successfully started the server. The server ste is now RUNNING. [2013.10.09 22:38:24][2] [nodemanager-34] [NodeManager-0137] Beginning to monitor the server[test] in the domain[wyj_domain]. 29
DAS 는기동되어있으며, serverautorestart=false 일때 위와동일하게동일한 server 를 kill -9 로죽이고나서 nodemanager 를다시기동하면 server 가자동으로재시작되 지않는것을확인. hptest:/user/wonyoung/jeus7/bin>./startnodemanager & [1] 19000 *************************************************************** - JEUS Home : /user/wonyoung/jeus7 - Java Vendor : HP - Added Java Option : -d64 -Djeus.vm.bits=64 *************************************************************** + /opt/jdk6.0.0.2/opt/java6/bin/java -server -Xmx512m - Xbootclassph/p:/user/wonyoung/jeus7/lib/system/extension.jar -classph /user/wonyoung/jeus7/lib/system/jeusnodemanager.jar:/user/wonyoung/jeus7/lib/system/jeusapi.jar:/user/wonyoung/jeus7/lib/ system/jeusutil.jar:/user/wonyoung/jeus7/lib/system/jeusnetwork.jar:/user/wonyoung/jeus7/lib/system/jmxremote.jar:/user/wonyoung/jeus7/lib/sy stem/jeusjaxb.jar:/user/wonyoung/jeus7/lib/system/jmxdescription.jar:/user/wonyoung/jeus7/lib/system/javaee.jar - Djava.library.ph=/user/wonyoung/jeus7/lib/system - Djava.endorsed.dirs=/user/wonyoung/jeus7/lib/endorsed - Djava.naming.factory.initial=jeus.jndi.JNSContextFactory - Djava.naming.factory.url.pkgs=jeus.jndi.jns.url -Djava.net.preferIPv4Stack=true - Djava.util.logging.manager=jeus.util.logging.JeusLogManager - Djava.util.logging.config.file=/user/wonyoung/jeus7/bin/logging.properties - Djeus.tool.webadmin.locale.language=ko -Djeus.home=/user/wonyoung/jeus7 - Djeus.jvm.version=hotspot -Djeus.properties.replice=jeus,sun.rmi,java.util,java.net -d64 -Djeus.vm.bits=64 jeus.nodemanager.jeusnodemanager hptest:/user/wonyoung/jeus7/bin>[2013.10.09 22:54:54][2] [nodemanager-1] [NodeManager-0101] The node manager is starting. [2013.10.09 22:54:54][2] [nodemanager-1] [NodeManager-0102] Initializing the node manager configurion. [2013.10.09 22:54:54][2] [nodemanager-1] [NodeManager-0108] Beginning to listen: /192.168.1.219:55520. [2013.10.09 22:54:54][2] [nodemanager-1] [NodeManager-0115] Domain=[wyj_domain], Server=[test] [2013.10.09 22:54:54][2] [nodemanager-9] [NodeManager-0109] Processing the request... [2013.10.09 22:54:54][2] [nodemanager-10] [NodeManager-0137] Beginning to monitor the server[test] in the domain[wyj_domain]. hptest:/user/wonyoung/jeus7/bin>[2013.10.09 22:54:57][2] [nodemanager-10] [NodeManager-0142] The process may not be alive(server=test, Process ID=18879). [2013.10.09 22:54:57][2] [nodemanager-10] [NodeManager-0147] An exception occurred while connecting to the server[test]. --- 생략 --- [2013.10.09 22:54:59][2] [nodemanager-10] [NodeManager-0142] The process may not be alive(server=test, Process ID=18879). [2013.10.09 22:54:59][2] [nodemanager-10] [NodeManager-0147] An exception occurred while connecting to the server[test]. [2013.10.09 22:55:06][2] [nodemanager-10] [NodeManager-0138] The server[test] might have shut down. [2013.10.09 22:55:06][2] [nodemanager-10] [NodeManager-0139] Server[test] process was forcibly shut down. ( 로그종료 ) 30
Nodemanager 가기동이되었음에도불구하고 server 의 stus 는 failed 로되어있는모습. Server 가정상적으로종료된후에 nodemanager 를재구동하면, ConnectionExeption 은발생하지않으며, NodeManager 를실행할때 & 를붙여서백그라운드프로세스로돌려야한다. NodeManager 의설졍환경파일은 jeusnm.properties 이며, 자세한내용은 JEUS7 fix 01 매뉴얼 /JEUS Node Manager 안내서 /2.3환경설정 /2.3.1 설정파일참고. 31
5. MS 추가및설정 MS 추가방법을설명하며, webadmin 에서 (*) 가포함된항목및 (*) 가포함되지않았더라도필수로를입력해야하는 case 에대해서만설명. 5.1. MS 추가를위한입력항목 ( 표 ) 세부컴포넌트 BASE(Basic info) Resource (Listener) Engine (Web Connections) - Name - Node name - Listen Address - Lisent port - Name - Registrion id - Network address port - Network address ip address - Thread Pool - Number <MS 추가시 tag 설명 > 5.2 MS 추가작업 5.2.1 MS 등록 a. Server 클릭 32
b. LOCK & EDIT 는 webadmin 에서일련의작업을하기위해서수정할때누르는컴포넌트 (button) 임 a. Add 버튼을클릭하여 server 를추가 b. 이름설정 (name 란에이름을입력후확인클릭 ), nodename 입력 33
c. 확인버튼을클릭후적용된것을확인함. 5.2.2 Listener 설정 d. Resource 클릭후 Add 를클릭 e. ADD 클릭후모습 : Listener 의이름, port, Listne Address 를설정한다. *Use Nin (default = 체크표시 = non-blocking) Jeus7 에서특화된설정으로 non-blocking 의여부를결정한다. Non-blocking 이란사용자의요청을 listne 할때 socket 형태로 listen 해서넘겨주는지, channel 형태로 listen 해서넘겨주지의판단이며, JEUS6은기본적으로 non-blocking 형태를지원했다, 34
5.2.3 Web-Connection 설정 f. 연동할 webserver type 선택예 ) 로 http 리스너 g. http 리스너정보기입 (thread, 리스너 name) 35
h. 모든설정후, 확인을눌러적용을시키고실제반영을위해 Active Changge 클릭함 i. 고급선택사항을따로지정하지않고적용했을때값들 j. 모두기입한후 Active Changes 를클릭하면다음과같이 server 에추가한 MS 가표시된다. 그후 start 버튼을클릭하면 SHUTDOWN->RUNNING 으로변경된다. k. MS 를정상적으로추가후 http 리스너와정상연동확인 (exploded 를임의로포팅 ) 36
리스너설정 (,g) 에서설정한 3249 port 를입력하여확인함. 37
6. Server stus 정리 6.1 SHUTDOWN 최초 DAS 만기동하고나서 webadmin 을접속했을때 MS 는 SHUTDOWN 상태이다. ( 기동되지않은상태 ) 또한, RUNNING 상태인 server 를정상적으로 stop 했을때도 SHOTDOWN 으로변경된다. 6.2 STARTING Server 를 start 하면기동중일때의 stus 6.3 RUNNING Server 가정상적으로구동되어기동중일때 38
6.4 FAIURE_SUSPECTED Nodemanager 가 down 된상태에서 server 가비정상종료 (kill -9) 로죽었을때나타나는현상. Default 로 15 초동안 FAIURE_SUSPECTED 상태에있다가 FAILD 로변함. 6.5 FAILD 때 FAIURE_SUSPECTED 상태에서 15 초후에 FAILD 상태로변경된다. 이상태가되면, Nodemanager 를다시기동해도 server 가 start 되지않는다. 39
7. DaSource test 중발생되었던몇가지 error 도함께설명한다. 또한, 아래에서설명할 test capture 화면은선 test 작업이후 dump 화면을추출한것이기때문에이미기입한이미지도있다. 7.1 DaSource 설정을위한입력항목 ( 표 ) 구분세부컴포넌트설명 ( 예 ) DaSource id Export Name vander Export Name 과동일 DaSource id oracle Listen port DB 서버로통신할 port (1521) Da Source Class Name Da Source Type BASE Server Name Port Name DaBase Name Orlace 의예로 SID User Password Connection Pool Property ( 고급선택사항 ) Min max Step period 드라이버type 예 ) thin drivertype:java.lang.string=thin Default 2 설정되어있음 Default 30 설정되어있음 Default 1 설정되어있음 Default 1시간설정되어있음 7.2 dasource 설정사전작업 <DaSource 설정시 tag 설명 > 7.2.1 jdbc 드라이버놓기. Java 버전과호환되는 jdbc 드라이버를 $JEUS_HOME/lib/dasource 에 upload 해야하는것은기존의 JEUS 와동일하 며, 본매뉴얼에서는 oracle 과연동하는것을기준으로 test 함. $JEUS_HOME/lib/dasource 에 ojdbc14.jar 가있는것을확인할수있다. 40
7.3 webadmin 에서 dasource 설정 7.3.1dasource 설정 Resources -> DaSource 클릭 Lock * EDIT 클릭하여수정 41
Dabase 의 add 클릭 정보기입화면 (BASE) -> Da Source ID 와 Export Name 은동일한것을권장 DaSource ID 는추후에 MS 별로 dasource 를달리지정했을떄식별값으로쓰인다. 파란색체크부분을이용해입력을하면밑에 driver type 이자동으로등록된다. 42
정보기입화면 (connection pool) 43
설정을모두완료하고 Avtive Changes 를클릭하여반영한다. 그리고나서 server 를재구동한다. 만약 server 가 running 상태가아니라면동적으로반영되었다는메시지가나온다. 정상적으로 server 를재시작하면 JEUS 환경에 DB 설정부분이적용된다. 그리고나서 webadmin 에서 Server 를클릭 하면각 Server 에서 Da Source 에추가한 DaSource ID 가나타나는것을확인할수있다. 44
7.4 DB 연동확인 7.4.1 MS 에 DaSource 미선택시발생되는 error 상황 Webadmin 을통해서 MS 에서 dasource 를선택하지않고 MS 를기동시켰을때 error [2013.09.30 11:26:04][2] [adminserver-66] [Console-0010] Attempting to execute a command: creecp from wonyoung@192.168.1.219. [2013.09.30 11:26:04][2] [adminserver-66] [Console-0014] The command: creecp from wonyoung@192.168.1.219 is executed successfully. [2013.09.30 11:26:10][2] [adminserver-66] [Console-0010] Attempting to execute a command: connection-pool-info from wonyoung@192.168.1.219. [2013.09.30 11:26:10][2] [adminserver-66] [Console-0014] The command: connectionpool-info from wonyoung@192.168.1.219 is executed successfully. [2013.09.30 11:26:24][2] [adminserver-36] [Console-0010] Attempting to execute a command: creecp from wonyoung@192.168.1.219. [2013.09.30 11:26:24][2] [adminserver-36] [JDBC-0401] The command [cree-connectionpool] failed. Da source ID [wonyoung] << Exception >> jeus.connector.pool.connectionpoolexception: Creing the connection pool [wonyoung] failed. jeus.jdbc.management.jdbcresourceinternal.creeconnectionpool(jdbcresourceinternal.j ava:229) sun.reflect.nivemethodaccessorimpl.invoke0(nive Method) sun.reflect.nivemethodaccessorimpl.invoke(nivemethodaccessorimpl.java:39) sun.reflect.delegingmethodaccessorimpl.invoke(delegingmethodaccessorimpl.java:25) java.lang.reflect.method.invoke(method.java:597) com.sun.jmx.mbeanserver.standardmbeanintrospector.invokem2(standardmbeanintrospector. java:93) com.sun.jmx.mbeanserver.standardmbeanintrospector.invokem2(standardmbeanintrospector. java:27) com.sun.jmx.mbeanserver.mbeanintrospector.invokem(mbeanintrospector.java:208) com.sun.jmx.mbeanserver.perinterface.invoke(perinterface.java:120) com.sun.jmx.mbeanserver.mbeansupport.invoke(mbeansupport.java:262) com.sun.jmx.interceptor.defaultmbeanserverinterceptor.invoke(defaultmbeanserverinterc eptor.java:836) com.sun.jmx.mbeanserver.jmxmbeanserver.invoke(jmxmbeanserver.java:761) jeus.management.jeusmbeanserveraccesscontroller.invoke(jeusmbeanserveraccesscontrolle r.java:573) javax.management.remote.generic.serverintermediary.handlerequest(serverintermediary.j ava:270) javax.management.remote.generic.serverintermediary$privilegedrequestjob.run(serverint ermediary.java:941) java.security.accesscontroller.doprivileged(nive Method) javax.management.remote.generic.serverintermediary$requesthandler.handlembsreqmessage (ServerIntermediary.java:717) javax.management.remote.generic.serverintermediary$requesthandler.execute(serverinter mediary.java:619) jeus.management.remote.generic.serversynchromessagenonblockingconnectionimpl.readmess 45
age(serversynchromessagenonblockingconnectionimpl.java:152) jeus.management.remote.jeusmp.unifiedtransportconnection$1.run(unifiedtransportconnec tion.java:272) jeus.server.work.managedthreadpoolimpl$workwrapper.run(managedthreadpoolimpl.java:226) jeus.util.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:1170) jeus.util.threadpoolexecutor$worker.run(threadpoolexecutor.java:1220) java.lang.thread.run(thread.java:619) Caused by: javax.naming.namenotfoundexception: OP_LOOKUP failed: wonyoung [Root exception is javax.naming.namenotfoundexception: [wonyoung] Name not found.] sun.reflect.niveconstructoraccessorimpl.newinstance0(nive Method) sun.reflect.niveconstructoraccessorimpl.newinstance(niveconstructoraccessorimpl.j ava:39) sun.reflect.delegingconstructoraccessorimpl.newinstance(delegingconstructoraccess orimpl.java:27) java.lang.reflect.constructor.newinstance(constructor.java:513) jeus.jndi.jns.local.dirservice.wrapclientexception(dirservice.java:917) jeus.jndi.jns.local.jndilocalclient.requestlookup(jndilocalclient.java:119) jeus.jndi.jns.local.dirservice.lookup(dirservice.java:483) jeus.jndi.jns.local.dirservice.dereference(dirservice.java:116) jeus.jndi.jns.local.dirservice.lookup(dirservice.java:475) jeus.jndi.jnscontext.lookupinternal(jnscontext.java:593) jeus.jndi.jnscontext.lookup(jnscontext.java:552) jeus.jndi.jnscontext.lookup(jnscontext.java:541) jeus.jndi.jeusfailovercontext.lookup(jeusfailovercontext.java:314) javax.naming.initialcontext.lookup(initialcontext.java:392) jeus.jdbc.management.jdbcresourceinternal.creeconnectionpool(jdbcresourceinternal.j ava:223)... 23 more Caused by: javax.naming.namenotfoundexception: [wonyoung] Name not found. jeus.jndi.jns.server.dirservice.dereference(dirservice.java:432) jeus.jndi.jns.server.servicehandler.handlelookup(servicehandler.java:144) jeus.jndi.jns.local.jndilocalclient.requestlookup(jndilocalclient.java:77)... 32 more Root Exception stack trace: javax.naming.namenotfoundexception: [wonyoung] Name not found. jeus.jndi.jns.server.dirservice.dereference(dirservice.java:432) jeus.jndi.jns.server.servicehandler.handlelookup(servicehandler.java:144) jeus.jndi.jns.local.jndilocalclient.requestlookup(jndilocalclient.java:77) jeus.jndi.jns.local.dirservice.lookup(dirservice.java:483) jeus.jndi.jns.local.dirservice.dereference(dirservice.java:116) jeus.jndi.jns.local.dirservice.lookup(dirservice.java:475) jeus.jndi.jnscontext.lookupinternal(jnscontext.java:593) jeus.jndi.jnscontext.lookup(jnscontext.java:552) jeus.jndi.jnscontext.lookup(jnscontext.java:541) jeus.jndi.jeusfailovercontext.lookup(jeusfailovercontext.java:314) javax.naming.initialcontext.lookup(initialcontext.java:392) jeus.jdbc.management.jdbcresourceinternal.creeconnectionpool(jdbcresourceinternal.j ava:223) 생략 java.security.accesscontroller.doprivileged(nive Method) javax.management.remote.generic.serverintermediary$requesthandler.handlembsreqmessage (ServerIntermediary.java:717) javax.management.remote.generic.serverintermediary$requesthandler.execute(serverinter 46
mediary.java:619) jeus.management.remote.generic.serversynchromessagenonblockingconnectionimpl.readmess age(serversynchromessagenonblockingconnectionimpl.java:152) jeus.management.remote.jeusmp.unifiedtransportconnection$1.run(unifiedtransportconnec tion.java:272) jeus.server.work.managedthreadpoolimpl$workwrapper.run(managedthreadpoolimpl.java:226) jeus.util.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:1170) jeus.util.threadpoolexecutor$worker.run(threadpoolexecutor.java:1220) java.lang.thread.run(thread.java:619) <<!Exception >> 47
7.4.2 콘솔에서확인 jeusadmin -host localhost -port 13333 -u administror -p jeusadmin [DAS]wyj_domain.adminServer>creecp -id ena123 Servers th successfully creed a connection pool : test Servers th failed to cree a connection pool : none. [DAS]wyj_domain.adminServer>connection-pool-info -id ena123 -server test Informion about connections in the server [test]'s connection pool [ena123]. ================================================================================ +-------------------+-------+--------------------------+--------------+--------+ Connection ID Ste Ste Time(sec) Use Count Type +-------------------+-------+--------------------------+--------------+--------+ ena123-2 idle 174.75 0 pooled ena123-1 idle 174.918 0 pooled +-------------------+-------+--------------------------+--------------+--------+ ================================================================================ [DAS]wyj_domain.adminServer>creecp -id won123 Servers th successfully creed a connection pool : tmax Servers th failed to cree a connection pool : none. [DAS]wyj_domain.adminServer>connection-pool-info -id won123 -server tmax Informion about connections in the server [tmax]'s connection pool [won123]. ================================================================================ +-------------------+-------+--------------------------+--------------+--------+ Connection ID Ste Ste Time(sec) Use Count Type +-------------------+-------+--------------------------+--------------+--------+ won123-1 idle 202.322 0 pooled won123-2 idle 202.228 0 pooled +-------------------+-------+--------------------------+--------------+--------+ ================================================================================ 48
7.4.3 웹브라우저로호출해서확인 DB 연동확인을위해호출할 jsp 파일 (dbtest.jsp) <%@ page import="java.sql.connection,java.sql.*,javax.naming.initialcontext" %> <%@ page import="javax.naming.namingexception,javax.sql.dasource" %> <% Connection Conn=null; try { InitialContext ctx = new InitialContext(); DaSource ds=(dasource)ctx.lookup("test"); Conn=ds.getConnection(); if(conn!= null) { out.println("<center>get Connection Success..!!</CENTER><BR>"); } else { out.println("<center>get Connection Failed..!!</CENTER><BR>"); } out.println("autocommin?");out.println(conn.getautocommit()); out.println("<br>"); PreparedStement pstmt = Conn.prepareStement("select sysde from dual"); ResultSet Rs = pstmt.executequery(); while(rs.next()) { out.println ("DATA? " + Rs.getString(1) + "<br />"); } } cch(sqlexception e) { out.println(e.getmessage()); throw new SQLException(e.getMessage()); } cch(namingexception e) { out.println(e.getmessage()); throw new SQLException(e.getMessage()); } cch(exception e) { out.println(e.getmessage()); throw new SQLException(e.getMessage()); } finally { try { if(conn!=null) Conn.close(); } cch(exception e){} } %> 호출확인 ( webtob 와연동시킨후확인한모습 ) 49
Copyright 2013 TmaxSoft Co., Ltd. All Rights Reserved. TmaxSoft Co., Ltd. Trademarks Tmax, WebtoB, WebT, JEUS, ProFrame, SysMaster and OpenFrame are registered trademarks of TmaxSoft Co., Ltd. Other products, titles or services may be registered trademarks of their respective companies. Contact Informion TmaxSoft can be contacted the following addresses to arrange for a consulting team to visit your company and discuss your options for legacy modernizion. Korea - TmaxSoft Co., Ltd. Corpore Headquarters 272-6 Seohyeon-dong, Bundang-gu, Seongnam-si, South Korea, 463-824 Tel : (+82) 31-8018-1708 Fax : (+82) 31-8018- 1710 Website : http://tmaxsoft.com U.S.A. - TmaxSoft Inc. 560 Sylvan Avenue Englewood Cliffs, NJ 07632, USA Tel : (+1) 201-567-8266 Fax : (+1) 201-567- 7339 Website : http://us.tmaxsoft.com Japan TmaxSoft Japan Co., Ltd. 5F Sanko Bldg, 3-12-16 Mita, Mino-Ku, Tokyo, 108-0073 Japan Tel : (+81) 3-5765-2550 Fax: (+81) 3-5765- 2567 Website : http://jp.tmaxsoft.com China TmaxSoft China Co., Ltd. Room 1101, Building B, Recreo Internional Center, East Road Wang Jing, Chaoyang District, Beijing, 100102, P.R.C Tel : (+86) 10-5783-9188 Fax: (+86) 10-5783- 9188(#800) Website : http://cn.tmaxsoft.com China(JV) Upright(Beijing) Software Technology Co., Ltd Room 1102, Building B, Recreo Internional Center, East Road Wang Jing, Chaoyang District, Beijing, 100102, P.R.C Tel : (+86) 10-5783-9188 Fax: (+86) 10-5783- 9188(#800) Website : www.uprightsoft.com TD-JSIT-D0127001 50