" /> Service startup for GAX (Other Genesys components etc.) in Linux CentOS 7 - Genesys CTI User Forum

Author Topic: Service startup for GAX (Other Genesys components etc.) in Linux CentOS 7  (Read 4140 times)

Offline ryusuf

  • Full Member
  • ***
  • Posts: 108
  • Karma: 0
Advertisement
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)

[code][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[/code]

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


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
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


Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
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

Offline ryusuf

  • Full Member
  • ***
  • Posts: 108
  • Karma: 0
[quote author=Kubig link=topic=12290.msg54825#msg54825 date=1651060154]
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
[/quote]

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?


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
You start GAX from GA for example, if it later is detected by SCS as Stopped, will try to start it over.


Offline Janis

  • Full Member
  • ***
  • Posts: 123
  • Karma: 4
For GAX I'm using

[code][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
[/code]

Local user "genesys" is the owner of /opt/genesys, /var/log/genesys and /var/run/genesys

EnvironmentVariables contains all needed environment like:

[code]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
[/code]

But, yes, you can just set autostart in application Annex:

[code][sml]
autostart=true
[/code]

Offline Janis

  • Full Member
  • ***
  • Posts: 123
  • Karma: 4
LCA:

[code][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
[/code]
« Last Edit: April 29, 2022, 07:21:56 AM by Janis »

Offline Janis

  • Full Member
  • ***
  • Posts: 123
  • Karma: 4
SCS:

[code][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
[/code]

Offline Janis

  • Full Member
  • ***
  • Posts: 123
  • Karma: 4
Configuration Server:

[code][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[/code]

Offline Janis

  • Full Member
  • ***
  • Posts: 123
  • Karma: 4
Additonal file /etc/tmpfiles.d/genesys.conf that instructs to create directory for PID files at startup:

[code]d    /var/run/genesys  0755 genesys root - -[/code]

Offline ryusuf

  • Full Member
  • ***
  • Posts: 108
  • Karma: 0
[quote author=Janis link=topic=12290.msg54832#msg54832 date=1651213214]

Local user "genesys" is the owner of /opt/genesys, /var/log/genesys and /var/run/genesys


[/quote]

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.

Offline ryusuf

  • Full Member
  • ***
  • Posts: 108
  • Karma: 0
[quote author=Janis link=topic=12290.msg54834#msg54834 date=1651213464]
SCS:

[code][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
[/code]
[/quote]

Under the unit section of this file for SCS, the [b]After [/b]field is [b]genesysscs.service[/b]. Since this file is for SCS itself, should the after field contain genesysscs.service?

Offline Janis

  • Full Member
  • ***
  • Posts: 123
  • Karma: 4
No, there is genesyscs :) Like GenesysConfigrationService.
But feel free to create your own starting sequence according to your needs.

Offline ryusuf

  • Full Member
  • ***
  • Posts: 108
  • Karma: 0
[quote author=Janis link=topic=12290.msg54871#msg54871 date=1652017364]
No, there is genesyscs :) Like GenesysConfigrationService.
But feel free to create your own starting sequence according to your needs.
[/quote]

Ohhh  :) :) :)

I misread it as scs instead of cs.  :D

Thanks

Offline ryusuf

  • Full Member
  • ***
  • Posts: 108
  • Karma: 0
[quote author=Janis link=topic=12290.msg54871#msg54871 date=1652017364]
No, there is genesyscs :) Like GenesysConfigrationService.
But feel free to create your own starting sequence according to your needs.
[/quote]

What have you done for FlexLM license manager? Can you share your insights.

Thanks in advance