The process to terminate needs to be that in the Name column in the AE.
If the processes are started out of order after SMC has started them, it won't matter because the names are derived from the ucsrv.ini file
e.g. if you have the following in ucsrv.ini
system=TEST
wp1=10001
wp5=10002
wp10=10003
Then you start the first WP it will start as TEST#WP001 regardless of what you named it in the fix Service Name in smgr and also regardless of which WP you selected to start in smgr. This is because it finds the first wp in ucsrv.ini and establishes a connection with the port. Only if the port is in use will it then try then next wp listed.
Then you start the second WP (any one from your smgr), it will start as TEST#WP005
Then you start the third WP (any one from your smgr) , it will start as TEST#WP010
Therefore you can define the TERMINATE just based on the wp you have specified in ucsrv.ini
I terminate in reverse order to prevent the Primary from switching mode. So in this example I would script
: TERMINATE SERVER, TEST#WP010
: TERMINATE SERVER, TEST#WP005
: TERMINATE SERVER, TEST#WP001
This might also be useful, before terminating I gather a list of all the processes and output to variable. Then I can use script to manage the Primary as I have 4 AE.
:SET &DATE# = SYS_DATE(YYYY-MM-DD)
:SET &TIME# = SYS_TIME("HH:MM:SS")
! WP Listing
:SET &WPNUM# = "01"
:WHILE &WPNUM# <= "99"
:SET &PROCESS# = "UC4NONPD#WP0&WPNUM#"
: SET &RET1# = GET_UC_SETTING(SERVER_MODE, "&PROCESS#")
: print "&PROCESS# is &RET1#"
: IF &RET1# = "P"
: PUT_VAR DADMPATCH_V001, "&RET1#" , "&PROCESS#"
: ENDIF
: PUT_VAR DADMPATCH_V002, "&PROCESS#", &RET1#, &DATE#, &TIME#
:SET &WPNUM# = ADD(&WPNUM#, 1)
:SET &WPNUM# = FORMAT(&WPNUM#, '00')
:ENDWHILE
(repeat similar for CPs)
Change Primary
:SET &WP# = "UC4NONPD#WP040"
:SET &MODE# = "P"
:SET &RET# = MODIFY_SYSTEM(CHANGE_MODE, &WP#, &MODE#)
:SET &RC# = FORMAT(&RET#)
:PRINT "Return code is &RC#"
Original Message:
Sent: 07-28-2020 04:06 AM
From: Christoph Rekers
Subject: Configuring service manager details for AE server processes
Hi @Michael A. Lowry,
As far as I understand, there should be no need to enter the name manually. At least in my V12.3 systems the name has been automatically set (see ScreenShot)
I checked :TERMINATE, SERVER, WP4
and it returned:
U00020645 Runtime error in object 'SCRI.TERMINATE', line '00001': There is no object 'WP4'.
...would be to easy...
So my summary is: to terminate a certain process we need to use the object name (C0000). But the object name can - and will - change. The "fix Servicename" stays, while the SMGR Name (column "Service" ) and the object name in C0000 can change. In an environment with more than one server machine, it is actually impossible to use TERMINATE and terminate a certain server process as we never know on which machine the process runs. The dynamic server names are not really an improvement...
Cheers
Christoph
------------------------------
----------------------------------------------------------------
Automic AE Consultant and Trainer since 2000
----------------------------------------------------------------
Original Message:
Sent: 07-27-2020 07:27 AM
From: Michael Lowry
Subject: Configuring service manager details for AE server processes
Yesterday I did figure out how to make it work. In my tests, I found that the value in the Name field must be the name of the process as defined in the Service Manager SMD file. (This is also the name that appears in the hidden fix Servicename column in the SMgr GUI.) Is this correct?
If so, I see a potential problem. The names in the SMD file are arbitrary and likely to change depending on startup order.
Does the :TERMINATE
AE scripting command operate on actual AE server process names, or does it too rely on the inscrutable and unstable SMD names?
Also, where in the DB are the service manager definitions for agents/servers stored?
Original Message:
An unexpected error occurred. 0x0FE6