Modifying a TimesTen Instance to Disable Management by systemd

This example assumes the myinstance_2 TimesTen instance is configured with systemd. The tt_myinstance_2 TimesTen service is running and is under automatic management of systemd. The example walks through the process of modifying the instance to remove the systemd configuration. It then performs the necessary steps to stop the tt_myinstance_2 TimesTen service and revert to manual control of the TimesTen daemon.

  1. Use the systemd systemctl status command to verify the tt_myinstance_2 TimesTen service is running.
    % systemctl status tt_myinstance_2.service
    ● tt_myinstance_2.service - TimesTen Service
       Loaded: loaded (/lib/systemd/system/tt_myinstance_2.service; enabled; vendor preset: disabled)
       Active: active (running) since Wed 2021-08-18 05:55:00 PDT; 39s ago
      Process: 30976 ExecStart=/scratch/ttuser2/myinstance_2/bin/ttDaemonAdmin -start -force -systemd (code=exited, status=0/SUCCESS)
     Main PID: 30984 (timestend)
       Memory: 53.3M
       CGroup: /system.slice/tt_myinstance_2.service
               ├─30984 /scratch/ttuser2/myinstance_2/install/bin/timestend -init...
               ├─30988 installation_dir/tt22.1.1.25.0/bin/timestensubd -ve...
               ├─30989 installation_dir/tt22.1.1.25.0/bin/timestensubd -ve...
               └─30991 installation_dir/tt22.1.1.25.0/bin/ttcserver -verbo...
  2. Run the $TIMESTEN_HOME/bin/ttInstanceModify utility with the -nosystemd option. TimesTen modifies the instance to remove the systemd configuration.
    % $TIMESTEN_HOME/bin/ttInstanceModify -nosystemd
    The daemon for instance 'myinstance_2' is currently configured to be managed by systemd.
    
    Unconfiguring TimesTen daemon startup from systemd
    
    ** NOTICE **
    
    If the TimesTen daemon startup scripts were installed, you must run
            $TIMESTEN_HOME/bin/setuproot -uninstall -systemd
    to remove them.
    
  3. Run the TimesTen ttStatus utility to illustrate the myinstance_2 instance is no longer configured for systemd.
    % $TIMESTEN_HOME/bin/ttStatus
    TimesTen status report as of Wed Aug 18 13:25:31 2021
    
    Daemon pid 30984 port 6640 instance myinstance_2
    TimesTen server pid 30991 started on port 6641
    ------------------------------------------------------------------------
    ------------------------------------------------------------------------
    Accessible by group g900
    End of report
    
  4. Run the systemd systemctl status command to illustrate that the tt_myinstance_2 TimesTen service is still running.
    % systemctl status tt_myinstance_2.service
    ● tt_myinstance_2.service - TimesTen Service
       Loaded: loaded (/lib/systemd/system/tt_myinstance_2.service; enabled; vendor preset: disabled)
       Active: active (running) since Wed 2021-08-18 05:55:00 PDT; 29min ago
      Process: 30976 ExecStart=/scratch/ttuser2/myinstance_2/bin/ttDaemonAdmin -start -force -systemd (code=exited, status=0/SUCCESS)
     Main PID: 30984 (timestend)
       Memory: 53.8M
       CGroup: /system.slice/tt_myinstance_2.service
               ├─30984 /scratch/ttuser2/myinstance_2/install/bin/timestend -init...
               ├─30988 installation_dir/tt22.1.1.1.0/bin/timestensubd -ve...
               ├─30989 installation_dir/tt22.1.1.1.0/bin/timestensubd -ve...
               └─30991 installation_dir/tt22.1.1.1.0/bin/ttcserver -verbo...
  5. As the root user, run the $TIMESTEN_HOME/bin/setuproot -uninstall -systemd script to disable and stop the tt_myinstance_2 TimesTen service.
    # $TIMESTEN_HOME/bin/setuproot -uninstall -systemd  
    Would you like to uninstall the TimesTen daemon startup scripts in /lib/systemd/system? [ yes ]
    Removed symlink /etc/systemd/system/tt_myinstance_2.service.
    Removed symlink /etc/systemd/system/multi-user.target.wants/tt_myinstance_2.service.
    
    Successfully deleted the following scripts :
    /lib/systemd/system/tt_myinstance_2.service
    
  6. Run the systemd systemctl status command to verify systemd is no longer managing the TimesTen daemon.
    % systemctl status tt_myinstance_2.service
    ● tt_myinstance_2.service - TimesTen Service
       Loaded: loaded (/usr/lib/systemd/system/tt_myinstance_2.service; bad; vendor preset: disabled)
       Active: failed (Result: exit-code) since Wed 2021-08-18 06:39:57 PDT; 2min 13s ago
     Main PID: 30984 (code=exited, status=0/SUCCESS)
    Warning: tt_myinstance_2.service changed on disk. Run 'systemctl daemon-reload' to reload units.
    
  7. Run the TimesTen ttStatus utility. The TimesTen daemon is no longer running and is now under manual control of the instance administrator. As the instance administrator, use the TimesTen ttDaemonAdmin to manually start the TimesTen daemon. Then use the ttStatus utility to ensure the TimesTen daemon is running.
    % ttStatus
    ttStatus: Could not connect to the TimesTen daemon on port 6640.
    If the TimesTen daemon is not running, please start it
    by running "ttDaemonAdmin -start".
    /scratch/ttuser2/myinstance_2/info/daemon.status says:
    2021-08-18 12:55:00 TimesTen daemon starting up
    
    % ttDaemonAdmin -restart
    ttDaemonAdmin: daemon is not running
    TimesTen Daemon (PID: 7060, port: 6640) startup OK.
    
    % ttStatus
    TimesTen status report as of Wed Aug 18 06:53:52 2021
    
    Daemon pid 7060 port 6640 instance myinstance_2
    TimesTen server pid 7067 started on port 6641
    ------------------------------------------------------------------------
    ------------------------------------------------------------------------
    Accessible by group g900
    End of report
    
You have successfully modified the instance to remove the systemd configuration. In addition, you have performed the steps to stop the automatic management of the TimesTen daemon by systemd. The instance administrator is now manually managing the TimesTen daemon.