Does OpenEdge (11.6) provide linux systemd unit files

Posted by cverbiest on 09-Feb-2016 11:08

Hi,

I just installed oe116 on Red Hat Enterprise Linux Server release 7.2 (Maipo).
Services, such as the admin service, are no longer started by init.d scripts but configured using unit files.

Does OpenEdge install such unit files ?

Or are there sample unit files in the installation ?

If not in the installation can someone share such a file for OpenEdge ?

I'll try to create one if none exist but I'd rather not duplicate effort

Posted by Libor Laubacher on 10-Feb-2016 10:31

Wrt the init.d - it's still present for legacy purposes.

I believe the answer to first 2 questions would be "no".

This works fine on my home CentOS 7.

[Unit]

Description=OE 11.6 Adminserver

Wants=network.target

After=network.target

Before=shutdown.target reboot.target halt.target

[Service]

Type=simple

ExecStartPre=/bin/rm -f /var/run/admserv116.sock

ExecStart=/progress/oe116/bin/proadsv -start

ExecStop=/progress/oe116/bin/proadsv -stop

RemainAfterExit=yes

[Install]

WantedBy=multi-user.target

Posted by cverbiest on 10-Feb-2016 11:15

Hi Libor,

thanks, based on you input and https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Unit_Files.html I did the following

session commands

# vi /etc/systemd/system/openedge_admin.service
# chmod 664 /etc/systemd/system/openedge_admin.service
# systemctl daemon-reload
# systemctl start openedge_admin.service
# systemctl
...skipping...
  nmb.service                                                                    loaded active running   Samba NMB Daemon
  ntpd.service                                                                   loaded active running   Network Time Service
  oddjobd.service                                                                loaded active running   privileged operations for unprivileged applications
  openedge_admin.service                                                         loaded active exited    OpenEdge Adminserver for dlc
...skipping...
# /usr/dlc/bin/proadsv -q
OpenEdge Release 11.6 as of Fri Oct 16 18:22:20 EDT 2015
AdminServer is alive. (8545)

# systemctl stop openedge_admin.service
# /usr/dlc/bin/proadsv -q
OpenEdge Release 11.6 as of Fri Oct 16 18:22:20 EDT 2015
AdminServer not alive. (8543)

/etc/systemd/system/openedge_admin.service file contents

[Unit]
Description=OpenEdge Adminserver for dlc
Wants=network.target
After=network.target
Before=shutdown.target reboot.target halt.target

[Service]
Type=Forking
ExecStart=/usr/dlc/bin/proadsv -start
ExecStop=/usr/dlc/bin/proadsv -stop
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

It seems to work but it displays "exited", changed the Type in the config file from Simple to Forking and now systemctl show the service as running

All Replies

Posted by Libor Laubacher on 10-Feb-2016 10:31

Wrt the init.d - it's still present for legacy purposes.

I believe the answer to first 2 questions would be "no".

This works fine on my home CentOS 7.

[Unit]

Description=OE 11.6 Adminserver

Wants=network.target

After=network.target

Before=shutdown.target reboot.target halt.target

[Service]

Type=simple

ExecStartPre=/bin/rm -f /var/run/admserv116.sock

ExecStart=/progress/oe116/bin/proadsv -start

ExecStop=/progress/oe116/bin/proadsv -stop

RemainAfterExit=yes

[Install]

WantedBy=multi-user.target

Posted by cverbiest on 10-Feb-2016 11:15

Hi Libor,

thanks, based on you input and https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Unit_Files.html I did the following

session commands

# vi /etc/systemd/system/openedge_admin.service
# chmod 664 /etc/systemd/system/openedge_admin.service
# systemctl daemon-reload
# systemctl start openedge_admin.service
# systemctl
...skipping...
  nmb.service                                                                    loaded active running   Samba NMB Daemon
  ntpd.service                                                                   loaded active running   Network Time Service
  oddjobd.service                                                                loaded active running   privileged operations for unprivileged applications
  openedge_admin.service                                                         loaded active exited    OpenEdge Adminserver for dlc
...skipping...
# /usr/dlc/bin/proadsv -q
OpenEdge Release 11.6 as of Fri Oct 16 18:22:20 EDT 2015
AdminServer is alive. (8545)

# systemctl stop openedge_admin.service
# /usr/dlc/bin/proadsv -q
OpenEdge Release 11.6 as of Fri Oct 16 18:22:20 EDT 2015
AdminServer not alive. (8543)

/etc/systemd/system/openedge_admin.service file contents

[Unit]
Description=OpenEdge Adminserver for dlc
Wants=network.target
After=network.target
Before=shutdown.target reboot.target halt.target

[Service]
Type=Forking
ExecStart=/usr/dlc/bin/proadsv -start
ExecStop=/usr/dlc/bin/proadsv -stop
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

It seems to work but it displays "exited", changed the Type in the config file from Simple to Forking and now systemctl show the service as running

Posted by Marian Edu on 10-Feb-2016 11:41

Carl, that's because the 'proadsv' process is 'forking' and then it exit so systemd think it was died.

What you can try is to switch from 'simple' to 'forking' service type but then I think you need to provide a PID file with the admin server process pid so systemd can check the process's status... or just start in interactive mode :)

[Service]
Type=simple
; ExecStartPre=/bin/rm -f /var/run/admserv116.sock
ExecStart=/usr/dlc/bin/proadsv -start -interactive true

Posted by jbijker on 11-Feb-2016 00:51

This is the Admin server startup script I'm using on CentOS7 for OE11.3, but I guess the same could be used for OE11.6:

/etc/systemd/system/admin.service

[Unit]
Description=Progress OpenEdge Admin Service
After=network.target
Requires=network.target

[Service]
Type=forking
ExecStart=/apps/dlc113/bin/proadsv -start
ExecStop=/apps/dlc113/bin/proadsv -stop

[Install]
WantedBy=multi-user.target

No need to provide any PID file. Systemd keeps track of all forked processed and will keep track of them all.

Simply do a systemctl -l status admin.service

admin.service - Progress OpenEdge Admin Service
   Loaded: loaded (/etc/systemd/system/admin.service; enabled)
   Active: active (running) since Thu 2016-01-28 12:49:28 SAST; 1 weeks 6 days ago
  Process: 774 ExecStart=/apps/dlc113/bin/proadsv -start (code=exited, status=0/SUCCESS)
 Main PID: 1864 (java)
   CGroup: /system.slice/admin.service
           ââ 1498 /apps/dlc113/bin/_mprosrv -classpath /apps/dlc113/java/progress.jar:/apps/dlc113/java/osmetrics.jar:/apps/dlc113/java/prorepl.jar:/apps/dlc113/java/ext/xercesImpl.jar:/apps/dlc113/java/ext/xmlParserAPIs.jar:/apps/dlc113/java/ext/soap.jar:/apps/dlc113/java/ext/wsdl4j.jar:/apps/dlc113/java/ext/jettison-1.2.jar -properties /apps/dlc113/properties/conmgr.properties -servergroup multitenantdb.defaultconfiguration.defaultservergroup -adminport 7843 -m5
           ââ 1522 /apps/dlc113/bin/_mprshut /db/mipdb -adminport 7843 -cpinternal iso8859-1 -cpcoll BASIC -C biw
           ââ 1527 /apps/dlc113/bin/_mprshut /db/mipdb -adminport 7843 -cpinternal iso8859-1 -cpcoll BASIC -C watchdog
           ââ 1534 /apps/dlc113/bin/_mprshut /db/mipdb -adminport 7843 -cpinternal iso8859-1 -cpcoll BASIC -C apw
           ââ 1538 /apps/dlc113/bin/_dbagent -db /db/mipdb -port 8843 -u DB_Agent -propertyfile /apps/dlc113/properties/agent.properties -config multitenantDB -installdir /apps/dlc113 -ipver IPv4 -m5
... etc ...

Posted by cverbiest on 11-Feb-2016 02:36

Thanks for all the input, I updated my answer. Maybe someone at Progress can create a PKB entry.

I didn't seem to need the interactive attribute.

systemctl shows openedge_admin.service as running and detects it's gone when I stop it with proadsv -stop.

This thread is closed