Start or stop a Groundplex on Linux

Steps to start or stop a Groundplex on Linux

Overview

You can use either the systemd or init.d utility to start and stop the Snaplex for Linux distributions such as Red Hat, Fedora CoreOS, CentOS, and SuSE. The procedures vary depending on which Linux distribution is installed on the Snaplex host.

Prerequisite

  • Before you begin start or stop the snaplex, refer to the Groundplex installation on Linux document

Steps

Start and stop the Groundplex using the init.d utility with this procedure for Red Hat-like Linux distributions such as Red Hat, Fedora CoreOS, CentOS, and SuSE.

To add the Snaplex as a service:

  1. Log in to the host as a root or sudo user.
  2. Create the startup service file:
    touch/etc/systemd/system/snaplogic.service
  3. Change the permissions on the file:
    chmod 664 /etc/systemd/system/snaplogic.service
    This change provides read and write permissions for the owner and group, and read permission for others.
  4. Open the file with a text editor. For example, using a vim editor:
    vim /etc/systemd/system/snaplogic.service
  5. Add the following text to the file:
           [Unit]
          Description=SnapLogic JVM
          After=network.target
    
          [Service]
          Type=forking
          ExecStart=/opt/snaplogic/bin/jcc.sh start
          ExecReload=/opt/snaplogic/bin/jcc.sh restart
          ExecStop=/opt/snaplogic/bin/jcc.sh stop
    
          [Install]
          WantedBy=default.target
    
  6. Save and exit the file.
  7. Enable the service by running the following command:
    systemctl enable snaplogic.service
    The service will start automatically when the host reboots.
  8. Start the service:
    systemctl start snaplogic.service
  9. To stop the Snaplex as a service, run the following command:
    systemctl disable snaplogic.service

Steps

Start and stop the Groundplex using the init.d utility with this procedure for Red Hat-like Linux distributions such as Red Hat, Fedora CoreOS, CentOS, and SuSE.

  1. Log in to the Linux machine as root.
  2. Change directories:
    cd /etc/init.d/
  3. Create a softlink to the jcc.sh file:
    ln -s /opt/snaplogic/bin/jcc.sh snaplex
  4. Add the softlink to chkconfig management:
    chkconfig --add snaplex
    Note: We recommend that you reboot the machine to verify if the Snaplex service is restarting automatically on machine reboot. Under some conditions, the symlink resolution might fail when the machine is starting up. In this case, you can change the Snaplex startup script to be a file instead of a symlink. Run the following commands a root user:
       rm /etc/init.d/snaplex
      cp /opt/snaplogic/bin/jcc.sh /etc/init.d/snaplex
      echo "export SL_ROOT=/opt/snaplogic" >> /etc/sysconfig/jcc
    
  5. To delete the Snaplex as a service, remove the service from the chkconfig management:
    chkconfig --del snaplex
  1. Log in to the Linux machine as root.
  2. Change directories:
    cd /etc/init.d/
  3. Create a soft-link to the jcc.sh file:
    ln -s /opt/snaplogic/bin/jcc.sh snaplex
  4. Install the service using update-rc.d. For example:
    sudo update-rc.d snaplex defaults 98 02
    Important:

    Troubleshooting if the machine reboot fails.

    We recommend that you reboot the machine to verify whether the Snaplex service is restarting automatically on machine reboot. Under some conditions, the symlink resolution might fail when the machine is starting up. In this case, you can change the Snaplex startup script to be a file instead of a symlink. Run the following commands a root user:

     rm /etc/init.d/snaplex
    cp /opt/snaplogic/bin/jcc.sh /etc/init.d/snaplex
    echo "export SL_ROOT=/opt/snaplogic" >> /etc/sysconfig/jcc
    

    On a Debian system, the /etc/sysconfig directory would need to be created if not already present.

Manage disk volumes for Groundplex nodes

To address issues that cause disk full errors and to ensure smoother operations of the systems that affect the stability of the Groundplex, you need to have separate mounts on Groundplex nodes. Follow the steps suggested below to create two separate disk volumes on the JCC nodes.
Notice: The commands and the steps specified are validated on *nix (RHEL based systems).
  • The JCC nodes are equipped with two separate disk volumes to ensure that the operating system and pipeline execution workspace remain segregated.
    • The JCC is installed in /(root) volume, and the workspace is separated in the bind mounts.
    • The second disk volume is mounted on /workspace, and bind mount directories are created.
       sudo su
      mkdir /workspace
    
  • Create subdirectories in /workspace and /opt/snaplogic/run directories using the commands specified below:
  • Create the bind mounts using the commands specified below:
       mount --bind /workspace/fs /opt/snaplogic/run/fs
      mount --bind /workspace/broker /opt/snaplogic/run/broker
      mount --bind /workspace/tmp /tmp   
    
Workspace Bind Mount Ownership Permissions
/workspace/fs /opt/snaplogic/run/fs snapuser:snapuser 0775
/workspace/broker /opt/snaplogic/run/broker snapuser:snapuser 0775
/workspace/tmp /tmp snapuser:snapuser 0775


Important: To ensure that the changes remain in effect after system reboots, it is necessary to create entries in /etc/fstab.

Example:

   /dev/nvme1n1 /workspace xfs noatime 0 0
  /workspace/fs /opt/snaplogic/run/fs none bind 0 0
  /workspace/broker /opt/snaplogic/run/broker none bind 0 0
  /workspace/tmp /tmp none bind 0 0