티스토리 뷰
본 포스팅은 턱시도 설치 및 JTC FailOver에 대해 알아보겠습니다.
AIX 5.3 에서 JEUS5 fix22, WebtoB 4.1에서 테스트를 진행하였다.
이 테스트는 toupper 서비스를 올린 후 하나의 JEUS에서 두개의 Tuxedo로 서비스 하는 구성에서 fail over 와 fail back의 정상여부를 확인하기 위한 테스트이다.
테스트시 webt 버전을 확인하여야 한다.
WebT-5.5.0.50
1. OS에 맞는 Tuxedo를 다운받는다.
http://commerce.bea.com/showallversions.jsp?family=TUX
2. 테스트를 위한 Tuxedo 9.1버전을 다운받았으며 license 키도 다운받아 설치 시 license 적용이 필요하다.
3. console 모드 설치시 sh tuxedo91_64_aix_53_ppc.bin -i console 다음과 같이 설치한다.
4. 설치 후 환경을 잡아주기 위해 .profile에 다음과 같이 추가한다. 이 부분은 추가변경 될 수 있다.
TUXDIR=/user/barami/tuxedo9.1; export TUXDIR
PATH=$TUXDIR/bin:$PATH; export PATH
COBCPY=:$TUXDIR/cobinclude; export COBCPY
COBOPT="-C ANS85 -C ALIGN=8 -C NOIBMCOMP -C TRUNC=ANSI -C OSEXT=cbl"; export COBOPT
SHLIB_PATH=$TUXDIR/lib:$SHLIB_PATH; export SHLIB_PATH
LIBPATH=$TUXDIR/lib:$LIBPATH; export LIBPATH
LD_LIBRARY_PATH=$TUXDIR/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
WEBJAVADIR=$TUXDIR/udataobj/webgui/java
export BDMCONFIG=/user/barami/tuxedo9.1/samples/atmi/simpapp/domact
export TUXCONFIG=/user/barami/tuxedo9.1/samples/atmi/simpapp/tuxconfig
export WSNADDR=//localhost:9000
BDMCONFIG, TUXCONFIG 의 경우 compile 된 환경파일을 지정한 것이다.
5. $TUXDIR/samples/atmi/simpapp 디렉토리에 ubbsimple.conf, domact.conf 두 개의 환경파일을다음과 같이 만든다.
ubbsimple.conf
#ident "@(#) samples/atmi/simpapp/ubbsimple $Revision: 1.5 $"
#Skeleton UBBCONFIG file for the TUXEDO Simple Application.
#Replace the <bracketed> items with the appropriate values.
*RESOURCES
IPCKEY 234567
DOMAINID simpapp
MASTER simple
MAXACCESSERS 50
MAXCONV 50
MAXSERVERS 20
MAXSERVICES 30
MODEL SHM
LDBAL N
*MACHINES
DEFAULT:
APPDIR="/user/barami/tuxedo9.1/samples/atmi/simpapp"
TUXCONFIG="/user/barami/tuxedo9.1/samples/atmi/simpapp/tuxconfig"
TUXDIR="/user/barami/tuxedo9.1"
ibmtest LMID=simple
#Example:
#beatux LMID=simple
*GROUPS
DMNS00
LMID=simple GRPNO=1 OPENINFO=NONE
GROUP2
LMID=simple GRPNO=2 OPENINFO=NONE
*SERVERS
DEFAULT:
CLOPT="-A"
simpserv SRVGRP=DMNS00 SRVID=1
DMADM SRVGRP=GROUP2 SRVID=2
CLOPT="-At -r -o /user/barami/tuxedo9.1/logs/DMADM.out"
GWADM SRVGRP=GROUP2 SRVID=3
CLOPT="-At -r -o /user/barami/tuxedo9.1/logs/GWADM.out"
GWTDOMAIN SRVGRP=GROUP2 SRVID=4
CLOPT="-At -r -o /user/barami/tuxedo9.1/logs/GWTDOMAIN.out"
*SERVICES
TOUPPER
domact.conf
DEFAULT : TYPE=TDOMAIN
DMTLOGSIZE=8192
AUDITLOG="/user/barami/tuxedo9.1/logs/DMTLOG"
CONNECTION_POLICY=ON_DEMAND
DM_A1_10 GWGRP=GROUP2
DOMAINID=DM_A1_10
DMTLOGDEV="/user/barami/tuxedo9.1/logs/DM_A1_10"
DMTLOGNAME="DMTLOG1"
*DM_REMOTE_DOMAINS
DEFAULT : TYPE=TDOMAIN
DM_M1_10 DOMAINID=DM_M1_10
*DM_TDOMAIN
DEFAULT : CMPLIMIT=1024
DM_A1_10 NWADDR="//192.167.10.48:20010"
DM_M1_10 NWADDR="//111.111.111.111:20020"
*DM_LOCAL_SERVICES
*DM_REMOTE_SERVICES
6. 환경파일 compile 하기
$ tmloadcf ubbsimple.conf
$ dmloadcf domact.conf
7. toupper를 위한 compile 하기
$ buildclient -o simpcl -f simpcl.c
$ buildserver -o simpserv -f simpserv.c -s TOUPPER
8. Tuxedo 기동 및 tmadmin 실행
barami@ibmtest:/user/barami/tuxedo9.1/samples/atmi/simpapp] tmboot -y
Booting all admin and server processes in
/user/barami/tuxedo9.1/samples/atmi/simpapp/tuxconfig
INFO: BEA Tuxedo, Version 9.1, 64-bit, Patch Level (none)
INFO: Serial #: 454493271161-2617347438265, Expiration 2008-08-15, Maxusers 100
INFO: Licensed to: BEA Evaluation Customer
Booting admin processes ...
exec BBL -A :
process id=835794 ... Started.
Booting server processes ...
exec simpserv -A :
process id=991480 ... Started.
exec DMADM -At -r -o /user/barami/tuxedo9.1/logs/DMADM.out :
process id=1081586 ... Started.
exec GWADM -At -r -o /user/barami/tuxedo9.1/logs/GWADM.out :
process id=1024144 ... Started.
exec GWTDOMAIN -At -r -o /user/barami/tuxedo9.1/logs/GWTDOMAIN.out :
process id=1003550 ... Started.
5 processes started.
barami@ibmtest:/user/barami/tuxedo9.1/samples/atmi/simpapp] tmadmin
tmadmin - Copyright (c) 1996-1999 BEA Systems, Inc.
Portions * Copyright 1986-1997 RSA Data Security, Inc.
All Rights Reserved.
Distributed under license by BEA Systems, Inc.
Tuxedo is a registered trademark.
> psc
Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
------------ ------------ --------- -------- -- ------- ------ ------
TOUPPER TOUPPER simpserv DMNS00 1 simple 0 AVAIL
DMADMIN DMADMIN DMADM GROUP2 2 simple 0 AVAIL
DM_A1_10 GWS GWADM GROUP2 3 simple 0 AVAIL
TMS GWS GWTDOMAIN GROUP2 4 simple 0 AVAIL
9. Toupper 서비스 테스트
10. 다른 계정으로 Tuxedo 설치 후 동일하게 설정하며 ubbsimple.conf, domact.conf 파일만 수정후 기동시킨다.
ubbsimple.conf
IPCKEY 40000
DOMAINID simpapp
MASTER simple
MAXACCESSERS 50
MAXCONV 50
MAXSERVERS 20
MAXSERVICES 30
MODEL SHM
LDBAL N
*MACHINES
DEFAULT:
APPDIR="/user/chnam/tuxedo9.1/samples/atmi/simpapp"
TUXCONFIG="/user/chnam/tuxedo9.1/samples/atmi/simpapp/tuxconfig"
TUXDIR="/user/chnam/tuxedo9.1"
ibmtest LMID=simple
#Example:
#beatux LMID=simple
*GROUPS
DMNS00
LMID=simple GRPNO=1 OPENINFO=NONE
GROUP2
LMID=simple GRPNO=2 OPENINFO=NONE
*SERVERS
DEFAULT:
CLOPT="-A"
simpserv SRVGRP=DMNS00 SRVID=1
DMADM SRVGRP=GROUP2 SRVID=2
CLOPT="-At -r -o /user/chnam/tuxedo9.1/logs/DMADM.out"
GWADM SRVGRP=GROUP2 SRVID=3
CLOPT="-At -r -o /user/chnam/tuxedo9.1/logs/GWADM.out"
GWTDOMAIN SRVGRP=GROUP2 SRVID=4
CLOPT="-At -r -o /user/chnam/tuxedo9.1/logs/GWTDOMAIN.out"
*SERVICES
TOUPPER
domact.conf
DEFAULT : TYPE=TDOMAIN
DMTLOGSIZE=8192
AUDITLOG="/user/chnam/tuxedo9.1/logs/DMTLOG"
CONNECTION_POLICY=ON_DEMAND
DM_A1_20 GWGRP=GROUP2
DOMAINID=DM_A1_20
DMTLOGDEV="/user/chnam/tuxedo9.1/logs/DM_A1_20"
DMTLOGNAME="DMTLOG"
*DM_REMOTE_DOMAINS
DEFAULT : TYPE=TDOMAIN
DM_M1_10 DOMAINID=DM_M1_10
*DM_TDOMAIN
DEFAULT : CMPLIMIT=1024
DM_A1_20 NWADDR="//192.167.10.48:20020"
DM_M1_10 NWADDR="//111.111.111.111:20020"
*DM_LOCAL_SERVICES
*DM_REMOTE_SERVICES
11. JEUS lifecycle-invocation 등록하기
JEUSMain.xml 파일
<lifecycle-invocation>
<class-name>tmax.jtc.external.TuxBootstrapper</class-name>
<invocation>
<invocation-method>
<method-name>init</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</invocation-method>
<invocation-argument>/user/barami/jeus5/lib/application/jtc.properties</invocation-argument>
<invocation-type>BOOT</invocation-type>
</invocation>
</lifecycle-invocation>
12. jtc.properties 환경파일 설정으로 primary의 경우 barami 계정의 tuxedo이고 backup의 경우chnam 계정의 tuxedo이다.
log.dir=/user/barami/jeus5/logs/
log.file=jtc1.log
log.bufsize=1024
tux.local.name=DM_M1_10
tux.remote.name.list=DM_A1_10,DM_A1_20
tux.default.remote=DM_A1_10
tux.buffer.size=1024
tux.default.timeout=60
tux.default.txtimeout=300
# Primary Tuxedo Server Setting
tux.DM_A1_10.addr=192.167.10.48
tux.DM_A1_10.port=20010
tux.DM_A1_10.interval=10
tux.DM_A1_10.backup=DM_A1_20
# Backup Tuxedo Server Setting
tux.DM_A1_20.addr=192.167.10.48
tux.DM_A1_20.port=20020
tux.DM_A1_20.interval=10
13. JEUS 기동 후 JEUS와 Tuxedo 가 정상적으로 연결되었는지 확인한다.
동일서버에서 20010, 20020에 대한 port 가 Listen 하고 있으며 각각의 port에 대해서 Established 되어 있음을 확인할 수 있다.
tcp4 0 0 192.167.10.48.20010 192.167.10.48.48315 ESTABLISHED
tcp4 0 0 192.167.10.48.48315 192.167.10.48.20010 ESTABLISHED
tcp4 0 0 192.167.10.48.20020 192.167.10.48.48316 ESTABLISHED
tcp4 0 0 192.167.10.48.48316 192.167.10.48.20020 ESTABLISHED
tcp4 0 0 192.167.10.48.20010 *.* LISTEN
tcp4 0 0 192.167.10.48.20020 *.* LISTEN
14. Toupper를 호출하는 tux.jsp를 실행하여 tuxedo 의 tmadmin으로 모니터링 한다.
tux.jsp
<%@ page import="tmax.webt.*"%>
<%@ page import="tmax.jtc.*"%>
<%@ page import="tmax.jtc.io.*"%>
<%@ page import="tmax.webt.io.*"%>
<%
try {
TuxService service = new TuxService("TOUPPER");
TuxBuffer sndbuf = service.createStringBuffer();
sndbuf.setString("hello");
try {
TuxBuffer rcvbuf = service.tpcall(sndbuf);
out.println(rcvbuf.getString());
} catch (WebtException e) {
e.printStackTrace();
out.println("error Occurred");
return;
%>
}catch(Exception e) {
e.printStackTrace();
}
%>
페이지 호출 (tux.jsp)
Primary 서버 (barami 계정)
Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
------------ ------------ --------- -------- -- ------- ------ ------
TOUPPER TOUPPER simpserv DMNS00 1 simple 1 AVAIL
DMADMIN DMADMIN DMADM GROUP2 2 simple 0 AVAIL
DM_A1_10 GWS GWADM GROUP2 3 simple 0 AVAIL
TMS GWS GWTDOMAIN GROUP2 4 simple 0 AVAIL
Backup 서버 (chnam 계정)
Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
------------ ------------ --------- -------- -- ------- ------ ------
TOUPPER TOUPPER simpserv DMNS00 1 simple 0 AVAIL
DMADMIN DMADMIN DMADM GROUP2 2 simple 0 AVAIL
DM_A1_10 GWS GWADM GROUP2 3 simple 0 AVAIL
TMS GWS GWTDOMAIN GROUP2 4 simple 0 AVAIL
15. JTC fail over 테스트
- primary 죽을경우 backup으로 넘어가는지 확인
Backup 서버 (chnam 계정)
Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
------------ ------------ --------- -------- -- ------- ------ ------
TOUPPER TOUPPER simpserv DMNS00 1 simple 1 AVAIL
DMADMIN DMADMIN DMADM GROUP2 2 simple 0 AVAIL
DM_A1_10 GWS GWADM GROUP2 3 simple 0 AVAIL
TMS GWS GWTDOMAIN GROUP2 4 simple 0 AVAIL
16. JTC fail back 테스트
Primary 서버 (barami 계정)
Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
------------ ------------ --------- -------- -- ------- ------ ------
TOUPPER TOUPPER simpserv DMNS00 1 simple 1 AVAIL
DMADMIN DMADMIN DMADM GROUP2 2 simple 0 AVAIL
DM_A1_10 GWS GWADM GROUP2 3 simple 0 AVAIL
TMS GWS GWTDOMAIN GROUP2 4 simple 0 AVAIL
Backup 서버 (chnam 계정)
Service Name Routine Name Prog Name Grp Name ID Machine # Done Status
------------ ------------ --------- -------- -- ------- ------ ------
TOUPPER TOUPPER simpserv DMNS00 1 simple 1 AVAIL
DMADMIN DMADMIN DMADM GROUP2 2 simple 0 AVAIL
DM_A1_10 GWS GWADM GROUP2 3 simple 0 AVAIL
TMS GWS GWTDOMAIN GROUP2 4 simple 0 AVAIL
17. 위와같이 primary, backup로 구성시 요청이 들어오면 primary로 처리하고 primary 가 죽을경우backup 에서 처리하며 primary가 기동되면 다시 primary 가 요청을 처리한다. Fail over, fail back이 정상적으로 동작하는 것을 확인할 수 있다.
'④ 미들웨어' 카테고리의 다른 글
[WAS] 각 벤더사 별 주요 환경파일 분석 (0) | 2018.08.27 |
---|---|
[Web Application Server] Architecture (WEB / WAS 부문) (5) | 2018.08.27 |
[ETC] SSL vs TLS 차이점 및 확인방안 (0) | 2018.06.18 |
[Web Application Server] WAS 벤더사 별 Appliction Deploy (0) | 2018.06.14 |
[Web Application Server] 전환 절차서 (WAS Winback 수행 절차) (0) | 2018.05.31 |
- Total
- Today
- Yesterday
- Docker
- aws
- jeus
- k8s
- wildfly
- Da
- nodejs
- openstack token issue
- OpenStack
- openstack tenant
- SWA
- MSA
- apache
- 쿠버네티스
- 아키텍처
- kubernetes
- 마이크로서비스
- SA
- Architecture
- aa
- webtob
- JEUS6
- 마이크로서비스 아키텍처
- JEUS7
- JBoss
- TA
- node.js
- 오픈스택
- git
- API Gateway
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |