KB Article #68509

steps for restarting an instance of CFT which was incorrectly stopped

Problem

When CFT is improperly stopped, an error occurs during startup that reads



S_TCP : already in use



This indicates that the S_TCP process is still open and was not closed properly.  Here is the procedure on how to clean this up so that CFT will startup normally.


Resolution

The remedy *must* proceed in the following order:



1. Run the "cftstop -kill" command.
2. At the command line prompt run "ipcs | grep mft2" (or grep for whichever user runs CFT)
3. Based upon the results of the ipcs output, you must use the ipcrm command to kill the zombie "Shared Memory Segments", "Semaphore Arrays", and "Message Queues" processes.



Examples:
ipcrm -m 10
ipcrm -s 20
ipcrm -q 30



4. Locate and delete the orphaned "S_TCP" file. When CFT is gracefully shutdown, CFT will always delete this S_TCP file. But if an orphaned S_TCP file exists, that will cause the next attempt to start CFT to abort, because with the presence of that file CFT thinks an instance of itself is already running.



The S_TCP file should be located in the following directory:



ie /axway/Transfer_CFT/runtime/data



Remember, the best practice is to avoid having to run the remedy process at all. On a UNIX/Linux instance of CFT, always use the following command to gracefully and completely shutdown CFT:



cftutil shut fast=yes
OR
cftutil shut,fast=yes (MVS)



Note that the Run the "cftstop -forcedkill" command must be up to clean the environment.