[Archivesspace_Users_Group] Running archivesspace from systemd

Flannon Jackson flannon at nyu.edu
Mon Aug 7 14:01:15 EDT 2017

Hi All,

I'm trying to run the archivesspace daemon from a systemd unit file but I'm
getting an odd delay.  If I start archivesspace manually by running "$ sudo
archivesspace.sh start" things run normally, but when I start archivesspace
from systemctl then any operation on port 8080 delays from 10 to 20 seconds
before it returns results.

If anyone is running archivesspace from systemctl and can offer any advice
it would be appreciated.

The details of my deployment are as follow,

OS  :                 Centos 7.3.10
Java:                 OpenJDK 1.8.0_141
archivesspace:  2.0.0 | 2.0.1 | 2.1.0  (i've tried all three with the same

My unit file is as follows,

*  [Unit]  Description=Archivesspace Service  After=syslog.target
network.target  [Service]  Type=forking
ExecStart=/opt/archivesspace/archivesspace.sh start
PIDFile=/opt/archivesspace/data/.archivesspace.pid  User=aspace
Group=aspace  TimeoutStopSec=10  Restart=on-failure  [Install]

Initially I tried running it as user aspace.  When that didn't work I also
tried as root, but that didn't change anything.

Currently I'm running archivesspace 1.5.2 on Centos 6 and the archivesspace
daemon gets started from a wrapper script in init.d, so I thought that if I
replicated that structure and had a wrapper script to run from the unit
fil,e and set the type to either simple, or oneshot or idle, that that
might do it.  So I tried it like this,

*[Unit]  Description=Archivesspace Service  After=syslog.target
network.target  [Service]  Type=simple
PIDFile=/opt/archivesspace/data/.archivesspace.pid  User=root  Group=root
[Install]  WantedBy=multi-user.target*
But basically nothing changed -- archivesspace started fine but I still had
the crazy delay.   I'm thinking at this point that rather than having a
unit file that calls archivesspace.sh that I need to write a unit file that
replaces the functionality of archivesspace.sh and calls archivesspace
directly.  As you've probably noticed, archivesspace.sh is not exactly a
trivial shell script, so before I get started I wanted to see if anyone
else has had any luck getting archivesspace running on systemd.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20170807/d371c826/attachment.html>

More information about the Archivesspace_Users_Group mailing list