** tmshutdown -k KILL 인 경우 WSH가 남는 현상
# tmshutdown -k KILL
Shutdown all admin and server processes? (y/n): y
Shutting down all admin and server processes in /ofm/jwchoi/sw2/tp/tuxedo12.2.2.0.0/samples/atmi/simpapp/tuxconfig
Shutting down server processes ...
Server Id = 202 Group Id = GROUP2 Machine = simple2: SIGKILL
Server Id = 201 Group Id = GROUP2 Machine = simple2: SIGKILL
Server Id = 200 Group Id = GROUP2 Machine = simple2: SIGKILL
Server Id = 101 Group Id = GROUP1 Machine = simple2: SIGKILL
Server Id = 100 Group Id = GROUP1 Machine = simple2: SIGKILL
Server Id = 5000 Group Id = WSLGRP4 Machine = simple2: SIGKILL
Server Id = 4000 Group Id = WSLGRP3 Machine = simple2: SIGKILL
Server Id = 3000 Group Id = WSLGRP2 Machine = simple2: SIGKILL
Server Id = 2000 Group Id = WSLGRP1 Machine = simple2: SIGKILL
Shutting down admin processes ...
Server Id = 0 Group Id = simple2 Machine = simple2:
CMDTUX_CAT:1668: WARN: Cannot shutdown BBL on simple2. Clients and/or servers may be running
CMDTUX_CAT:949: WARN: Shutdown failed
9 processes stopped.
# tmadmin -r
tmadmin - Copyright (c) 1996-2016 Oracle.
All Rights Reserved.
Distributed under license by Oracle.
Tuxedo is a registered trademark.
TMADMIN_CAT:199: WARN: Cannot become administrator.Limited set of commands available.
> pclt
LMID User Name Client Name Time Status Bgn/Cmmt/Abrt
--------------- --------------- --------------- -------- ------- -------------
simple2 jwchoi WSH 1:11:11 IDLE 0/0/0
simple2 jwchoi WSH 1:11:11 IDLE 0/0/0
simple2 jwchoi WSH 1:11:11 IDLE 0/0/0
simple2 jwchoi WSH 1:11:11 IDLE 0/0/0
simple2 jwchoi WSH 1:11:11 IDLE 0/0/0
simple2 jwchoi WSH 1:11:11 IDLE 0/0/0
simple2 jwchoi WSH 1:11:11 IDLE 0/0/0
simple2 jwchoi WSH 1:11:11 IDLE 0/0/0
simple2 jwchoi WSH 1:11:10 IDLE 0/0/0
simple2 jwchoi WSH 1:11:10 IDLE 0/0/0
simple2 jwchoi WSH 1:11:10 IDLE 0/0/0
simple2 jwchoi WSH 1:11:10 IDLE 0/0/0
simple2 jwchoi tmadmin 0:00:03 IDLE 0/0/0
> psr
Prog Name Queue Name 2ndQueue Name Grp Name ID RqDone Load Done Current Service
--------- ---------- ---------- -------- -- ------ --------- ---------------
BBL 123554 simple2 0 2 100 ( IDLE )
>
ULOG
162102.node1!tmshutdown.57606568.1.-2: 09-20-2022: Tuxedo Version 12.2.2.0.0, 64-bit
162102.node1!tmshutdown.57606568.1.-2: CMDTUX_CAT:1402: INFO: SRVID = 202 SRVGRP = GROUP2 SIGKILL sent
162103.node1!tmshutdown.57606568.1.-2: INFO: Awaiting process 41615874 for killing
162103.node1!tmshutdown.57606568.1.-2: INFO: Kill process 41615874 successful
162103.node1!tmshutdown.57606568.1.-2: CMDTUX_CAT:1402: INFO: SRVID = 201 SRVGRP = GROUP2 SIGKILL sent
162104.node1!tmshutdown.57606568.1.-2: INFO: Awaiting process 49217864 for killing
162104.node1!tmshutdown.57606568.1.-2: INFO: Kill process 49217864 successful
162104.node1!tmshutdown.57606568.1.-2: CMDTUX_CAT:1402: INFO: SRVID = 200 SRVGRP = GROUP2 SIGKILL sent
162105.node1!tmshutdown.57606568.1.-2: INFO: Awaiting process 39059732 for killing
162105.node1!tmshutdown.57606568.1.-2: INFO: Kill process 39059732 successful
162105.node1!tmshutdown.57606568.1.-2: CMDTUX_CAT:1402: INFO: SRVID = 101 SRVGRP = GROUP1 SIGKILL sent
162106.node1!tmshutdown.57606568.1.-2: INFO: Awaiting process 14090814 for killing
162106.node1!tmshutdown.57606568.1.-2: INFO: Kill process 14090814 successful
162106.node1!tmshutdown.57606568.1.-2: CMDTUX_CAT:1402: INFO: SRVID = 100 SRVGRP = GROUP1 SIGKILL sent
162107.node1!tmshutdown.57606568.1.-2: INFO: Awaiting process 45613336 for killing
162107.node1!tmshutdown.57606568.1.-2: INFO: Kill process 45613336 successful
162107.node1!tmshutdown.57606568.1.-2: CMDTUX_CAT:1402: INFO: SRVID = 5000 SRVGRP = WSLGRP4 SIGKILL sent
162108.node1!tmshutdown.57606568.1.-2: INFO: Awaiting process 25625090 for killing
162108.node1!tmshutdown.57606568.1.-2: INFO: Kill process 25625090 successful
162108.node1!tmshutdown.57606568.1.-2: CMDTUX_CAT:1402: INFO: SRVID = 4000 SRVGRP = WSLGRP3 SIGKILL sent
162109.node1!tmshutdown.57606568.1.-2: INFO: Awaiting process 30605858 for killing
162110.node1!tmshutdown.57606568.1.-2: INFO: Kill process 30605858 successful
162110.node1!tmshutdown.57606568.1.-2: CMDTUX_CAT:1402: INFO: SRVID = 3000 SRVGRP = WSLGRP2 SIGKILL sent
162111.node1!tmshutdown.57606568.1.-2: INFO: Awaiting process 39649606 for killing
162111.node1!tmshutdown.57606568.1.-2: INFO: Kill process 39649606 successful
162111.node1!tmshutdown.57606568.1.-2: CMDTUX_CAT:1402: INFO: SRVID = 2000 SRVGRP = WSLGRP1 SIGKILL sent
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:541: WARN: Server GROUP2/200 terminated
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:550: WARN: Cleaning up restartable server GROUP2/200
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:541: WARN: Server WSLGRP4/5000 terminated
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:550: WARN: Cleaning up restartable server WSLGRP4/5000
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:541: WARN: Server WSLGRP3/4000 terminated
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:550: WARN: Cleaning up restartable server WSLGRP3/4000
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:541: WARN: Server WSLGRP2/3000 terminated
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:550: WARN: Cleaning up restartable server WSLGRP2/3000
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:541: WARN: Server WSLGRP1/2000 terminated
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:550: WARN: Cleaning up restartable server WSLGRP1/2000
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:541: WARN: Server GROUP2/201 terminated
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:550: WARN: Cleaning up restartable server GROUP2/201
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:541: WARN: Server GROUP2/202 terminated
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:550: WARN: Cleaning up restartable server GROUP2/202
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:541: WARN: Server GROUP1/100 terminated
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:550: WARN: Cleaning up restartable server GROUP1/100
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:541: WARN: Server GROUP1/101 terminated
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:550: WARN: Cleaning up restartable server GROUP1/101
162114.node1!BBL.26083850.1.0: LIBTUX_CAT:1233: ERROR: Unable to shutdown, clients/servers still attached
162114.node1!cleanupsrv.25625094.1.-2: 09-20-2022: Tuxedo Version 12.2.2.0.0, 64-bit
162114.node1!cleanupsrv.25625094.1.-2: server GROUP2/200: CMDTUX_CAT:551: INFO: server removed
162114.node1!cleanupsrv.25625094.1.-2: ERROR: msgrcv err(LIBTUX_CAT:669: ERROR: Message operation failed because of the invalid message queue identifier): errno=22,qid=-1,buf=4564238248,bytes=4712,type=-1073741824,flag=2048
162114.node1!cleanupsrv.25625094.1.-2: server WSLGRP4/5000: CMDTUX_CAT:551: INFO: server removed
162114.node1!cleanupsrv.25625094.1.-2: ERROR: msgrcv err(LIBTUX_CAT:669: ERROR: Message operation failed because of the invalid message queue identifier): errno=22,qid=-1,buf=4564243784,bytes=4712,type=-1073741824,flag=2048
162114.node1!cleanupsrv.25625094.1.-2: server WSLGRP3/4000: CMDTUX_CAT:551: INFO: server removed
162114.node1!cleanupsrv.25625094.1.-2: ERROR: msgrcv err(LIBTUX_CAT:669: ERROR: Message operation failed because of the invalid message queue identifier): errno=22,qid=-1,buf=4564252104,bytes=4712,type=-1073741824,flag=2048
162114.node1!cleanupsrv.25625094.1.-2: server WSLGRP2/3000: CMDTUX_CAT:551: INFO: server removed
162114.node1!cleanupsrv.25625094.1.-2: ERROR: msgrcv err(LIBTUX_CAT:669: ERROR: Message operation failed because of the invalid message queue identifier): errno=22,qid=-1,buf=4564257096,bytes=4712,type=-1073741824,flag=2048
162114.node1!cleanupsrv.25625094.1.-2: server WSLGRP1/2000: CMDTUX_CAT:551: INFO: server removed
162114.node1!cleanupsrv.25625094.1.-2: server GROUP2/201: CMDTUX_CAT:551: INFO: server removed
162114.node1!cleanupsrv.25625094.1.-2: ERROR: msgrcv err(LIBTUX_CAT:669: ERROR: Message operation failed because of the invalid message queue identifier): errno=22,qid=-1,buf=4564453896,bytes=4712,type=-1073741824,flag=2048
162114.node1!cleanupsrv.25625094.1.-2: server GROUP2/202: CMDTUX_CAT:551: INFO: server removed
162114.node1!cleanupsrv.25625094.1.-2: server GROUP1/100: CMDTUX_CAT:551: INFO: server removed
162114.node1!cleanupsrv.25625094.1.-2: ERROR: msgrcv err(LIBTUX_CAT:669: ERROR: Message operation failed because of the invalid message queue identifier): errno=22,qid=-1,buf=4564463880,bytes=4712,type=-1073741824,flag=2048
162114.node1!cleanupsrv.25625094.1.-2: server GROUP1/101: CMDTUX_CAT:551: INFO: server removed
왜 WSH는 죽지 않았을까요?
1. tmshutdown -k KILL 을 수행하면 tuxedo 엔진은 내부적으로 SIGKILL 시그널을 tuxedo의 AP Server 프로세스에게 전달됩니다.
2. 이러한 시그널을 받은 Server 프로세스들은 바로 종료됩니다.
3. 이때 WSH는 tuxedo 엔진 입장에서는 일종의 client이기 때문에 SIGKILL 시그널을 직접 받지 못하는 것입니다.
즉, 정상적인 종료인 경우에 WSL의 tpsvrdone 함수에서 WSH를 정리하는 단계가 있으나,
현재 SIGKILL시그널을 받아 갑자기 종료가 되므로 tpsvrdone 함수를 만나지 못하게 되어 WSH를 정리하지 못하고 종료되어 WSH 프로세스가 남는 것입니다.
** tmshutdown -k TERM 인 경우 WSL, WSH 가 남는 현상
# tmshutdown -k TERM
Shutdown all admin and server processes? (y/n): y
Shutting down all admin and server processes in /ofm/jwchoi/sw2/tp/tuxedo12.2.2.0.0/samples/atmi/simpapp/tuxconfig
Shutting down server processes ...
Server Id = 202 Group Id = GROUP2 Machine = simple2: SIGTERM
Server Id = 201 Group Id = GROUP2 Machine = simple2: SIGTERM
Server Id = 200 Group Id = GROUP2 Machine = simple2: SIGTERM
Server Id = 101 Group Id = GROUP1 Machine = simple2: SIGTERM
Server Id = 100 Group Id = GROUP1 Machine = simple2: SIGTERM
Server Id = 5000 Group Id = WSLGRP4 Machine = simple2: SIGTERM
Server Id = 4000 Group Id = WSLGRP3 Machine = simple2: SIGTERM
Server Id = 3000 Group Id = WSLGRP2 Machine = simple2: SIGTERM
Server Id = 2000 Group Id = WSLGRP1 Machine = simple2: SIGTERM
Shutting down admin processes ...
Server Id = 0 Group Id = simple2 Machine = simple2:
CMDTUX_CAT:1668: WARN: Cannot shutdown BBL on simple2. Clients and/or servers may be running
CMDTUX_CAT:949: WARN: Shutdown failed
9 processes stopped.
# tmadmin -r
tmadmin - Copyright (c) 1996-2016 Oracle.
All Rights Reserved.
Distributed under license by Oracle.
Tuxedo is a registered trademark.
TMADMIN_CAT:199: WARN: Cannot become administrator.Limited set of commands available.
> psr
Prog Name Queue Name 2ndQueue Name Grp Name ID RqDone Load Done Current Service
--------- ---------- ---------- -------- -- ------ --------- ---------------
WSL 00004.05000 WSLGRP4 5000 0 0 ( IDLE SHUTDOWN )
WSL 00003.04000 WSLGRP3 4000 0 0 ( IDLE SHUTDOWN )
WSL 00002.03000 WSLGRP2 3000 0 0 ( IDLE SHUTDOWN )
WSL 00001.02000 WSLGRP1 2000 0 0 ( IDLE SHUTDOWN )
BBL 123554 simple2 0 5 250 ( IDLE )
> pclt
LMID User Name Client Name Time Status Bgn/Cmmt/Abrt
--------------- --------------- --------------- -------- ------- -------------
simple2 jwchoi WSH 1:16:54 IDLE 0/0/0
simple2 jwchoi WSH 1:16:54 IDLE 0/0/0
simple2 jwchoi WSH 1:16:54 IDLE 0/0/0
simple2 jwchoi WSH 0:00:51 IDLE 0/0/0
simple2 jwchoi WSH 1:16:54 IDLE 0/0/0
simple2 jwchoi WSH 1:16:54 IDLE 0/0/0
simple2 jwchoi WSH 1:16:54 IDLE 0/0/0
simple2 jwchoi WSH 0:00:51 IDLE 0/0/0
simple2 jwchoi WSH 1:16:54 IDLE 0/0/0
simple2 jwchoi WSH 1:16:54 IDLE 0/0/0
simple2 jwchoi WSH 1:16:53 IDLE 0/0/0
simple2 jwchoi WSH 0:00:51 IDLE 0/0/0
simple2 jwchoi WSH 1:16:53 IDLE 0/0/0
simple2 jwchoi WSH 1:16:53 IDLE 0/0/0
simple2 jwchoi WSH 1:16:53 IDLE 0/0/0
simple2 jwchoi WSH 0:00:51 IDLE 0/0/0
simple2 jwchoi WSH 0:00:51 IDLE 0/0/0
simple2 jwchoi WSH 0:00:51 IDLE 0/0/0
simple2 jwchoi WSH 0:00:51 IDLE 0/0/0
simple2 jwchoi WSH 0:00:50 IDLE 0/0/0
simple2 jwchoi WSH 0:00:50 IDLE 0/0/0
simple2 jwchoi WSH 0:00:50 IDLE 0/0/0
simple2 jwchoi WSH 0:00:50 IDLE 0/0/0
simple2 jwchoi WSH 0:00:50 IDLE 0/0/0
simple2 jwchoi tmadmin 0:00:03 IDLE 0/0/0
ULOG
161919.node1!tmshutdown.9896574.1.-2: 09-20-2022: Tuxedo Version 12.2.2.0.0, 64-bit
161919.node1!tmshutdown.9896574.1.-2: CMDTUX_CAT:1407: INFO: SRVID = 202 SRVGRP = GROUP2 SIGTERM sent
161919.node1!simpserv2.16581210.1.0: LIBTUX_CAT:522: INFO: Default tpsvrdone() function used
161919.node1!tmshutdown.9896574.1.-2: CMDTUX_CAT:1407: INFO: SRVID = 201 SRVGRP = GROUP2 SIGTERM sent
161919.node1!simpserv2.43057722.1.0: LIBTUX_CAT:522: INFO: Default tpsvrdone() function used
161919.node1!tmshutdown.9896574.1.-2: CMDTUX_CAT:1407: INFO: SRVID = 200 SRVGRP = GROUP2 SIGTERM sent
161919.node1!simpserv2.14090776.1.0: LIBTUX_CAT:522: INFO: Default tpsvrdone() function used
161919.node1!tmshutdown.9896574.1.-2: CMDTUX_CAT:1407: INFO: SRVID = 101 SRVGRP = GROUP1 SIGTERM sent
161919.node1!simpserv.37028442.1.0: LIBTUX_CAT:522: INFO: Default tpsvrdone() function used
161919.node1!tmshutdown.9896574.1.-2: CMDTUX_CAT:1407: INFO: SRVID = 100 SRVGRP = GROUP1 SIGTERM sent
161919.node1!simpserv.58262134.1.0: LIBTUX_CAT:522: INFO: Default tpsvrdone() function used
161919.node1!tmshutdown.9896574.1.-2: CMDTUX_CAT:1407: INFO: SRVID = 5000 SRVGRP = WSLGRP4 SIGTERM sent
161919.node1!tmshutdown.9896574.1.-2: CMDTUX_CAT:1407: INFO: SRVID = 4000 SRVGRP = WSLGRP3 SIGTERM sent
161919.node1!tmshutdown.9896574.1.-2: CMDTUX_CAT:1407: INFO: SRVID = 3000 SRVGRP = WSLGRP2 SIGTERM sent
161919.node1!tmshutdown.9896574.1.-2: CMDTUX_CAT:1407: INFO: SRVID = 2000 SRVGRP = WSLGRP1 SIGTERM sent
161922.node1!BBL.26083850.1.0: LIBTUX_CAT:1233: ERROR: Unable to shutdown, clients/servers still attached
TERM으로 tmshutdown을 하면
KILL과는 달리 tpsvrdone()을 수행하면서 process들이 종료가 되는데 이때 TERM을 받는 대상은 사용자 AP Server이고 BBL, DBBL, GWTDOMAIN, WSL들은 대상에서 제외됩니다.
TERM을 만든 이유가 사용자 AP Server 프로세스의 hang 현상을 제거하기 위해서 만들어진 것이기 때문에 이미 tuxedo 엔진에서 정의한 system server 프로세스들은 대상에서 제외된 것입니다.
참고자료
'Trouble Shooting' 카테고리의 다른 글
[Tuxedo] CMDTUX_CAT:111: ERROR: TUXCONFIG (0) | 2022.09.21 |
---|---|
[Tuxedo] WSL 띄워지고 WSNADDR 설정이 됐는데, tpinit failed 라면 (0) | 2022.09.21 |
[Tuxedo] DBBLWAIT * 2 is greater than BLOCKTIME (0) | 2022.09.20 |
[Tuxedo] SVCTIMEOUT / Tperrno = 10 (0) | 2022.09.20 |
[Tuxedo] Cannot attach bulletin board - magic number mismatch (0) | 2022.09.20 |