KB Article #182957

CFT UNIX service remains inactive even though CFT is NOT stopped

Problem


CFT is configured as a service on a UNIX platform.



In case the CFT is started with “cft start” command or from GUI, stopping the CFT service with “systemctl stop” doesn’t do anything.



The status of the service appears as inactive while the CFT processes remain active.




[alexandra@X runtime]$ cft start
Starting Transfer CFT...



Starting Transfer CFT with IDPARM "IDPARM0"
Transfer CFT working directory : /home/alexandra/CFT3.10/runtime
[=================================]100% RUNNING



Transfer CFT started correctly.
CFTMAIN process id is 16550.



[alexandra@X runtime]$ systemctl stop cft.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Multiple identities can be used for authentication:
1. alexandra
2. xfbcft
3. alexandra2
4. user1
Choose identity to authenticate as (1-4): 1
Password:
Info: Warning: your password will expire in 7 days
==== AUTHENTICATION COMPLETE ===



[alexandra@X runtime]$ ps -ef|grep -i cft
alexand+ 16550 1 0 11:24 ? 00:00:00 CFTMAIN
alexand+ 16560 16550 0 11:24 ? 00:00:00 CFTLOG
alexand+ 16561 16550 0 11:24 ? 00:00:00 CFTSUBPR
alexand+ 16562 16550 0 11:24 ? 00:00:00 CFTFHLP
alexand+ 16563 16550 0 11:24 ? 00:00:00 CFTTCOM
alexand+ 16564 16550 0 11:24 ? 00:00:00 CFTTCOMS
alexand+ 16565 16550 0 11:24 ? 00:00:00 CFTPRX
alexand+ 16593 16550 0 11:24 ? 00:00:00 CFTDSCAN
alexand+ 16634 16550 0 11:24 ? 00:00:00 CFTTPRO
alexand+ 16635 16634 0 11:24 ? 00:00:00 CFTTCPS
alexand+ 16730 14566 0 11:24 pts/0 00:00:00 grep --color=auto -i cft



[alexandra@X runtime]$ systemctl status cft.service
● cft.service - Axway Transfer CFT
Loaded: loaded (/etc/systemd/system/cft.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Mon 2023-04-24 11:24:24 EEST; 35s ago
Process: 16186 ExecStop=/bin/sh -c . ./profile && cft stop (code=exited, status=0/SUCCESS)
Process: 15910 ExecStart=/bin/sh -c . ./profile && cft start (code=exited, status=0/SUCCESS)
Main PID: 16005 (code=exited, status=0/SUCCESS)

Apr 24 11:23:53 X sh[15910]: Transfer CFT working directory : /home/alexandra/CFT3.10/runtime
Apr 24 11:23:56 X sh[15910]: [188B blob data]
Apr 24 11:23:56 X sh[15910]: Transfer CFT started correctly.
Apr 24 11:23:56 X sh[15910]: CFTMAIN process id is 16005.
Apr 24 11:23:56 X systemd[1]: Started Axway Transfer CFT.
Apr 24 11:24:21 X systemd[1]: Stopping Axway Transfer CFT...
Apr 24 11:24:22 X sh[16186]: Stopping Transfer CFT...
Apr 24 11:24:24 X sh[16186]: [282B blob data]
Apr 24 11:24:24 X sh[16186]: Transfer CFT stopped correctly.
Apr 24 11:24:24 X systemd[1]: Stopped Axway Transfer CFT.


Resolution


We cannot mix manual and service startup (even if we have applied the script provided in the user guide).



It is possible to stop the service manually after activating it as a service, but otherwise it does not allow systemd to track the active CFT.



This is not a CFT limitation but more complex uses of systemd.



Also, with the use of service mode, it is important to be aware of the permissions of the users who execute the service.



If the user running the service is different than the one used for commands, appropriate permissions (mainly to runtime) must be set.