ryusuf
April 27, 2022, 10:58am
1
Dears,
Is there any documentation on setting up services for Genesys Applications like GAX in Linux CentOS 7 which will start automatically on boot?
When we installed LCA, it prompted whether to add in the init.d directory for startup and it created gctilca file inside the directory.
Similarly for config server, i created the following service inside the /etc/systemd/system directory (expecting this is the right approach)
[Unit]
Description=Genesys Config Server
After=network.target
[Service]
WorkingDirectory=/app/gcti/config_srv
ExecStart=/app/gcti/config_srv/confserv 2020
Restart=always
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=genesys-confserv
User=root
Group=root
[Install]
WantedBy=multi-user.target
I want GAX to start once the Linux machine starts up. What is the recommended approach? Is there some kind of service scripts to be added in the init.d or /etc/systemd/system for all the Genesys components?
Let me know your inputs on the best practices.
Best Regards,
Rashid
No they don’t exist by default as Linux tends to vary from flavor to flavor.
Usually that is handled by Linux admins…
But yes, would be nice to have a full library of those.
Enviado de meu SM-N9600 usando o Tapatalk
Kubig
April 27, 2022, 11:49am
3
Why you do not use the autostart function which SCS provides by default? In that case, you will need only the framework and management being started by OS, rest can be started by Genesys MGMT layer
ryusuf
April 28, 2022, 8:55am
4
So does it mean that we need to run gax_startup.sh first and then set the autostart option in the annex of the GAX object. After which, whenever there is a restart of the host, GAX would start automatically?
You start GAX from GA for example, if it later is detected by SCS as Stopped, will try to start it over.
janisk
April 29, 2022, 6:20am
6
For GAX I’m using
[Unit]
Description=Genesys Administrator Extension Server
After=genesyscs.service
[Service]
EnvironmentFile=/opt/genesys/EnvironmentVariables
Type=forking
PIDFile=/var/run/genesys/genesysgax.pid
User=genesys
Group=genesys
ExecStart=/bin/bash -c "cd /opt/genesys/gax/ ; ./gax_startup.sh & echo $! >/var/run/genesys/genesysgax.pid"
Restart=always
RestartSec=30
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target
Local user “genesys” is the owner of /opt/genesys, /var/log/genesys and /var/run/genesys
EnvironmentVariables contains all needed environment like:
JAVA_HOME=/opt/java/jdk11
CASSANDRA_HOME=/opt/cassandra
JRE_HOME=/opt/java/jre11
PATH=/opt/java/jre11/bin:/usr/bin
LD_LIBRARY_PATH=/opt/genesys/SecurityPack:/opt/oracle/instantclient_11_2
LD_LIBRARY_PATH_64=/opt/genesys/SecurityPack
CLASSPATH=/opt/genesys/lib/postgresql-9.3-1104.jdbc4.jar
But, yes, you can just set autostart in application Annex:
[sml]
autostart=true
janisk
April 29, 2022, 6:21am
7
LCA:
[Unit]
Description=Genesys Local Control Agent
After=network-online.target nss-user-lookup.target
[Service]
EnvironmentFile=/opt/genesys/EnvironmentVariables
Type=forking
PIDFile=/var/run/genesys/genesyslca.pid
User=genesys
Group=genesys
ExecStart=/bin/bash -c "env > /opt/genesys/env_on_last_lca_launch.log ; cd /opt/genesys/LocalControlAgent/ ; ./run.sh & echo $! >/var/run/genesys/genesyslca.pid"
Restart=always
RestartSec=30
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target
janisk
April 29, 2022, 6:24am
8
SCS:
[Unit]
Description=Genesys Solution Control Server
After=genesyscs.service
[Service]
Type=forking
PIDFile=/var/run/genesys/genesysscs.pid
User=genesys
Group=genesys
ExecStart=/bin/bash -c "cd /opt/genesys/SolutionControlServer/ ; ./run.sh & echo $! >/var/run/genesys/genesysscs.pid"
Restart=always
RestartSec=30
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target
janisk
April 29, 2022, 7:20am
9
Configuration Server:
[Unit]
Description=Genesys Configuration Server
After=network-online.target nss-user-lookup.target
[Service]
Type=forking
PIDFile=/var/run/genesys/genesyscs.pid
User=genesys
Group=genesys
ExecStart=/bin/bash -c "cd /opt/genesys/confserv/ ; ./run.sh & echo $! >/var/run/genesys/genesyscs.pid"
Restart=always
RestartSec=30
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target
janisk
April 29, 2022, 7:24am
10
Additonal file /etc/tmpfiles.d/genesys.conf that instructs to create directory for PID files at startup:
d /var/run/genesys 0755 genesys root - -
Do you use /var/run/genesys directory to store all the genesys service files? If you can, please elaborate so we can use these practices.
Thanks a lot Janis for the details shared. Appreciate it.
Let me try this out and will update.
Under the unit section of this file for SCS, the After field is genesysscs.service . Since this file is for SCS itself, should the after field contain genesysscs.service?
No, there is genesyscs Like GenesysConfigrationService.
But feel free to create your own starting sequence according to your needs.
Ohhh
I misread it as scs instead of cs.
Thanks
What have you done for FlexLM license manager? Can you share your insights.
Thanks in advance
FlexLM:
[Unit]
Description=Genesys Flex License Daemon
After=network-online.target nss-lookup.target
[Service]
Type=forking
User=genesys
Group=genesys
ExecStart=/opt/genesys/flexlm/lmgrd -c /opt/genesys/flexlm/license.dat -l /var/log/genesys/flexlm/lmgrd.log
Restart=always
RestartSec=30
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target
No, in /var/run/genesys we are getting PID files - small files where process identification numbers of genesys daemons are stored. Systemd likes it.
For systemd unit files (services) I would choose /etc/systemd/system. (https://unix.stackexchange.com/questions/224992/where-do-i-put-my-systemd-unit-file )
To be honest, I’m not the greatest Linux expert. Not sure that everything I do is according to best practices. But it is is working
No, in /var/run/genesys we are getting PID files - small files where process identification numbers of genesys daemons are stored. Systemd likes it.
For systemd unit files (services) I would choose /etc/systemd/system. (https://unix.stackexchange.com/questions/224992/where-do-i-put-my-systemd-unit-file )
To be honest, I’m not the greatest Linux expert. Not sure that everything I do is according to best practices. But it is is working
Thanks, understood.
The practices shared by you all will help in building the solution in a better way.
Thanks, let me try this out.
What i have noticed is that, whenever i start FlexLM from the GAX, it is toggling between STARTED/STOPPED. When i check the processes running for lmgrd, i could see a lot is getting created.
Does it have something to do with autostart configured in the options of FlexLM application object? is there anything additional that needs to be configured in the application object? Or we do not need to control it from autostart option in GAX?
Never had an application object for FlexLM. Just a systemd unit file. Not sure if we can use Management Layer for any third party executable we have.