both solutions have the same results, it's just about the permissions you were granted as an Automic admin. It's not always the case that you are allowed to define the service yourself. But most probably you always have the permission to change the wrapper script yourself in case there are any changes to the environment.
Original Message:
Sent: Dec 06, 2024 08:39 AM
From: Christoph Rekers at Tricise
Subject: Assistance Needed to Configure Automic Agent as a Service on Linux
Hi @Markus Embacher,
Could you explain, why you recommend using automicsm instead of starting the smgr via .service?
Something like this works without the automicsm-script:
# Systemd unit file for Automic Service Manager
[Unit]
Description=Automic Service Manager
Requires=network-online.target
After=network-online.target
[Service]
Type=simple
Environment=LD_LIBRARY_PATH=/oracle/client/12x/client/lib:/usr/lib:/lib
Environment=ORACLE_HOME=/oracle/client/12x/client
Environment=CALIB=/opt/automic/capki/lib
Environment=CABIN=/opt/automic/capki/bin
Environment=CASHCOMP=/opt/automic/capki
WorkingDirectory=/opt/automic/smgr/bin
ExecStart=/opt/automic/smgr/bin/ucybsmgr -i/opt/automic/smgr/bin/ucybsmgr.ini AUTOMIC_V21
ExecStop=/bin/kill -15 $MAINPID
User=uc4
srvGroup=uc4
TimeoutStartSec=10
TimeoutStopSec=15
RestartSec=10
[Install]
WantedBy=multi-user.target
------------------------------
--------------------------------------------------------
Automic Consultant and Trainer since 2000
--------------------------------------------------------
now Tricise
Original Message:
Sent: Dec 05, 2024 02:27 AM
From: Markus Embacher
Subject: Assistance Needed to Configure Automic Agent as a Service on Linux
Hi,
I recommend using a wrapper script to set the required environment.
[Service]
type=forking
ExecStart=/home/automic/ServiceManager/bin/automicsm start
ExecStop=/home/automic/ServiceManager/bin/automicsm stop
Within the script you can set PATH and LD_LIBRARY_PATH to point to /home/automic/ServiceManager/bin where the required libraries can be found.
Regards, Markus
Original Message:
Sent: Dec 04, 2024 08:28 AM
From: Liron Atar
Subject: Assistance Needed to Configure Automic Agent as a Service on Linux
We would greatly appreciate your help!
We are trying to manage the Automic Linux agent as a service. Currently, we start the ServiceManager manually using nohup
, but we need guidance on how to configure it properly to start as a service using systemctl
.
Below are the configurations and logs we've used so far:
Configuration File (/etc/systemd/system/automic-agent.service
):
Manual Start Command:
Error Encountered:
Checks Performed:
- We verified the existence of the library
libzu00132.so
. The file is located here:
/home/automic/ServiceManager/bin/libzu00132.so
Despite this, when starting the service with systemctl
, it returns an error related to this library.
Questions:
- How can we properly configure the Linux agent to run as a service using
systemctl
? - What additional steps are required to resolve the shared library issue?
Your expertise and guidance on this matter would be invaluable.
Thank you in advance for your assistance!
Best regards,