<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div>Hi All,<br><br></div>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.<br><br></div>If anyone is running archivesspace from systemctl and can offer any advice it would be appreciated.<br><br></div>The details of my deployment are as follow,<br><br></div>OS  :                 Centos 7.3.10<br></div>Java:                 OpenJDK 1.8.0_141<br></div>archivesspace:  2.0.0 | 2.0.1 | 2.1.0  (i've tried all three with the same results) <br><br></div>My unit file is as follows,<br><br><b>  [Unit]<br>  Description=Archivesspace Service<br>  After=syslog.target network.target<br><br>  [Service]<br>  Type=forking<br>  ExecStart=/opt/archivesspace/archivesspace.sh start<br>  PIDFile=/opt/archivesspace/data/.archivesspace.pid<br>  User=aspace<br>  Group=aspace<br>  TimeoutStopSec=10<br>  Restart=on-failure<br><br>  [Install]<br>  WantedBy=multi-user.target</b><br><br></div>Initially I tried running it as user aspace.  When that didn't work I also tried as root, but that didn't change anything.<br><br></div>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,<br><br>  <b>[Unit]<br>  Description=Archivesspace Service<br>  After=syslog.target network.target<br><br>  [Service]<br>  Type=simple<br>  ExecStart=/opt/archivesspace/aspace-start.sh<br>  PIDFile=/opt/archivesspace/data/.archivesspace.pid<br>  User=root<br>  Group=root<br><br>  [Install]<br>  WantedBy=multi-user.target<br></b><br></div>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.<br><br></div>Thanks,<br><br></div>Flannon<br></div>