XCOM for Linux automatic startup at server start using systemd system service
search cancel

XCOM for Linux automatic startup at server start using systemd system service

book

Article ID: 272011

calendar_today

Updated On:

Products

XCOM Data Transport - Linux PC XCOM Data Transport

Issue/Introduction

The purpose of this article is to document how to enable automatic startup of the XCOM for Linux xcomd daemon at server start by creating a system service using the Linux systemd system and service manager.

Environment

XCOM™ Data Transport® for UNIX/Linux 11.6, 12.0

Resolution

The XCOM installer does not setup the system to automatically start the xcomd daemon at system startup and therefore by default it needs to be started manually.
The complete path to start xcomd would be /opt/CA/XCOM/sbin/xcomd or the path where XCOM is installed. 

On Unix/Linux platforms, the native OS facilities can be used to define the service and be configured to start XCOM automatically on reboot. Refer to steps below to learn how to define a system service and enable for auto start on RHEL versions 8 or 9.

Validate the steps provided below and consult with the system administrator in order to customize it according to needs.

  1. Create a file /etc/systemd/system/xcomd.service and add the below content to the file.

    [Unit]
    Description = XCOMD Scheduler service
    After = network.target
    StartLimitIntervalSec=30
    StartLimitBurst=5

    [Service]
    Type = forking
    Environment=XCOM_HOME=/opt/CA/XCOM
    ExecStart=/sbin/xcomd
    ExecStop=/sbin/xcomd -s
    Restart=on-failure
    RemainAfterExit=no
    RestartSec=3

    [Install]
    WantedBy = multi-user.target

    Modify/customize any of the intervals and other things.


  2. Issue below commands to start/stop or check status.

    systemctl start xcomd
    systemctl stop xcomd
    systemctl status xcomd

    NOTE
    : Using command "xcomd -s" to stop the daemon will not stop it and it will result in a restart of the daemon because it is interpreted as a process failure by the "Restart=on-failure" that is configured in the system service.


  3. Issue the command below to enable the service. This will set the service for an auto start on reboots and will also create a soft link for the file  etc/systemd/system/xcomd.service in directory /etc/systemd/system/multi-user.target.wants:

    systemctl enable xcomd

Additional Information

If encountering problems with the automatic startup of xcomd, it is worth checking if SELinux is preventing xcomd from running in the background.
Use commands like these to check for any error messages and address them with the Linux administrator:

  • grep "SELinux is preventing" /var/log/messages
  • grep -i "xcomd" /var/log/messages