고객사에서 AP Server process가 계속 죽고 restart 되는 로그를 발견했다.

 

tmshutdown 으로 내린 후 재기동하니까 정상적으로 되었다고한다.

 


 

 

일단 테스트를 해보기위해 정상적으로 process 되고 있는 놈들을 ps -ef | grep PID 로 찾고

 

kill -9 하였을 때, server는 죽고 restart 되는 것을 확인했다. 

(UBBCONFIG에 *SERVER단에 default 값으로 RESTART=Y옵션을 주었으니 당연히 restart되는 것이다.)

 

 

AIX node 1에서 simpserv4.c의 함수를 TPSUCCESS --> TPEXIT 로 바꿔주었다.

TPEXIT는  TPFAIL와 같은 의미 (서비스 수행이 제대로 되지 않았음을 의미) 지만 Server를 종료한다는 점이 다르다.

 

따라서 TPEXIT로 해당 APserver(simpserv4) 가 내려지지만 

Server 단에서 restart=y 옵션으로 인해 다시 재기동 된다.

 

아래를 참고하자

 

#include <stdio.h>
#include <ctype.h>
#include <atmi.h>       /* TUXEDO Header File */
#include <userlog.h>    /* TUXEDO Header File */


#if defined(__STDC__) || defined(__cplusplus)
tpsvrinit(int argc, char *argv[])
#else
tpsvrinit(argc, argv)
int argc;
char **argv;
#endif
{
        argc = argc;
        argv = argv;

        userlog("Welcome to the simple server");
        return(0);
}


#ifdef __cplusplus
extern "C"
#endif
void
#if defined(__STDC__) || defined(__cplusplus)
TOUPPER(TPSVCINFO *rqst)
#else
TOUPPER(rqst)
TPSVCINFO *rqst;
#endif
{

        int i;

        for(i = 0; i < rqst->len-1; i++)
                rqst->data[i] = toupper(rqst->data[i]);
        /* sleep(45);  */
        tpreturn(TPEXIT, 0, rqst->data, 0L, 0);

}
~

 

102454.node1!BBL.14090774.1.0: LIBTUX_CAT:541: WARN: Server GROUP4/400 terminated
102454.node1!BBL.14090774.1.0: LIBTUX_CAT:557: INFO: Server GROUP4/400 being restarted
102454.node1!simpserv4.14877312.1.0: 11-16-2022: Tuxedo Version 12.2.2.0.0, 64-bit
102454.node1!simpserv4.14877312.1.0: LIBTUX_CAT:260: WARN: Cannot open /ofm/jwchoi/sw2/tp/tuxedo12.2.2.0.0/samples/atmi/ as stderr, Uunixerr = Cannot write to a directory.

102454.node1!simpserv4.14877312.1.0: LIBTUX_CAT:262: INFO: Standard main starting
102454.node1!simpserv4.14877312.1.0: Welcome to the simple server
102454.node1!restartsrv.15794824.1.-2: 11-16-2022: Tuxedo Version 12.2.2.0.0, 64-bit
102454.node1!restartsrv.15794824.1.-2: server GROUP4/400: CMDTUX_CAT:580: INFO: A server process has restarted: 14877312

134228.node1!simpserv4.21561688.1.0: LIBTUX_CAT:1393: WARN: tpreturn called with TPEXIT
134239.node1!BBL.14090774.1.0: LIBTUX_CAT:541: WARN: Server GROUP4/400 terminated
134239.node1!BBL.14090774.1.0: LIBTUX_CAT:557: INFO: Server GROUP4/400 being restarted
134240.node1!simpserv4.15860432.1.0: 11-16-2022: Tuxedo Version 12.2.2.0.0, 64-bit
134240.node1!simpserv4.15860432.1.0: LIBTUX_CAT:260: WARN: Cannot open /ofm/jwchoi/sw2/tp/tuxedo12.2.2.0.0/samples/atmi/ as stderr, Uunixerr = Cannot write to a directory.
134240.node1!simpserv4.15860432.1.0: LIBTUX_CAT:262: INFO: Standard main starting
134240.node1!simpserv4.15860432.1.0: Welcome to the simple server
134240.node1!restartsrv.13763080.1.-2: 11-16-2022: Tuxedo Version 12.2.2.0.0, 64-bit
134240.node1!restartsrv.13763080.1.-2: server GROUP4/400: CMDTUX_CAT:580: INFO: A server process has restarted: 15860432
134430.node1!WSH.12190422.1.0: WARNING: LLE Configuration discovered! Note that LLE has been deprecated. You should upgrade to SSL to secure network links.

134430.node1!simpserv4.15860432.1.0: LIBTUX_CAT:1393: WARN: tpreturn called with TPEXIT
134432.node1!WSH.55902548.1.0: WARNING: LLE Configuration discovered! Note that LLE has been deprecated. You should upgrade to SSL to secure network links.
134432.node1!WSH.55902548.1.0: WSNAT_CAT:1042: ERROR: tpcall() call failed, tperrno = 6
134439.node1!BBL.14090774.1.0: LIBTUX_CAT:541: WARN: Server GROUP4/400 terminated
134439.node1!BBL.14090774.1.0: LIBTUX_CAT:557: INFO: Server GROUP4/400 being restarted
134440.node1!simpserv4.5308936.1.0: 11-16-2022: Tuxedo Version 12.2.2.0.0, 64-bit
134440.node1!simpserv4.5308936.1.0: LIBTUX_CAT:260: WARN: Cannot open /ofm/jwchoi/sw2/tp/tuxedo12.2.2.0.0/samples/atmi/ as stderr, Uunixerr = Cannot write to a directory.
134440.node1!simpserv4.5308936.1.0: LIBTUX_CAT:262: INFO: Standard main starting
134440.node1!simpserv4.5308936.1.0: Welcome to the simple server
134440.node1!restartsrv.16646680.1.-2: 11-16-2022: Tuxedo Version 12.2.2.0.0, 64-bit
134440.node1!restartsrv.16646680.1.-2: server GROUP4/400: CMDTUX_CAT:580: INFO: A server process has restarted: 5308936

 

 

이 때, 되살아나는 프로세스의 PID는 보이지만, 죽는 PID는 ULOG 상에서 보이지않기 때문에

PID가 죽지 않는데 왜 restart를 하지? 라고 오해를 할 수 있다. 

 

 

알아두자. Kill 되는 process의 PID는 보이지 않고, 새롭게 갱신되며 restart되는 것이다.

 

 

 

그런데 프로세스가 스스로 죽고, 다시 restart 되는 테스트를 해보아야한다.

 

 

 

+ Recent posts