Configure linux systemd service start

193 views
Skip to first unread message

David Horan

unread,
May 1, 2024, 5:07:02 PM5/1/24
to Archivesspac...@lyrasislists.org
hi,

  Has anyone setup systemd service for archivesspace that is working.


I've been trying various settings, ie: Type=simple or Type=forking.

I can not get the script to work consistently when rebooting.  I don't see any system errors and the archivesspace log is usually empty.  Seems to start and immediately stop.

We are running RHEL9.3, selinux is enforcing.  Checking on messages in audit logs, I used audit2allow to setup archivesspace policies.

Just wondering is anyone has a working example or any other resources ?

thanks
-David
UNCP
Linux Sys Admin


Thomas McNeely

unread,
May 1, 2024, 6:35:48 PM5/1/24
to David Horan, Archivesspac...@lyrasislists.org

Hi David,

 

I didn’t set this up myself, and don’t claim to understand it, but we appear to be using the following unit file, autogenerated at boot time from the init script that comes with ArchivesSpace:

 

# Automatically generated by systemd-sysv-generator

 

[Unit]

Documentation=man:systemd-sysv-generator(8)

SourcePath=/etc/init.d/archivesspace

Description=LSB: Start the ArchivesSpace archival management system

Before=multi-user.target

Before=multi-user.target

Before=multi-user.target

Before=graphical.target

After=network-online.target

Wants=network-online.target

 

[Service]

Type=forking

Restart=no

TimeoutSec=5min

IgnoreSIGPIPE=no

KillMode=process

GuessMainPID=no

RemainAfterExit=yes

SuccessExitStatus=5 6

ExecStart=/etc/init.d/archivesspace start

ExecStop=/etc/init.d/archivesspace stop

 

Also, I can’t vouch for how well it works, but this might be helpful:

https://github.com/bohnelang/systemd-ezproxy-service

 

Good luck,

Tom

Tom McNeely (he/him)

IT System Administrator

Western Washington University Library

 

From: archivesspac...@lyrasislists.org <archivesspac...@lyrasislists.org> On Behalf Of David Horan
Sent: Wednesday, May 1, 2024 2:07 PM
To: Archivesspac...@lyrasislists.org
Subject: [ArchivesSpace Users Group] Configure linux systemd service start

 

You don't often get email from david...@uncp.edu. Learn why this is important

--
You received this message because you are subscribed to the Google Groups "Archivesspace_Users_Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Archivesspace_User...@lyrasislists.org.
To view this discussion on the web visit https://groups.google.com/a/lyrasislists.org/d/msgid/Archivesspace_Users_Group/SA1PR01MB8373E1A56CC3979EF2BEC98B82192%40SA1PR01MB8373.prod.exchangelabs.com.

Jeffrey Mudge

unread,
May 2, 2024, 9:21:14 AM5/2/24
to archivesspac...@lyrasislists.org

We have service files for both Solr and ArchivesSpace that are working for us.

 

Our ArchivesSpace service file is:

# Systemd Unit file for Archivesspace Service

 

[Unit

Description=Archivesspace Service 

After=syslog.target network.target 

 

[Service

Type=forking

ExecStart=/pathtoarchivesspace/archivesspace/archivesspace.sh start

ExecStop=/pathtoarchivesspace/archivesspace/archivesspace.sh stop

PIDFile=/pathotoarchivesspace/archivesspace/data/.archivesspace.pid 

User=archivesspace

Restart=on-failure 

 

[Install]

WantedBy=multi-user.target

 

 

Jeffrey Mudge

Digital Initiatives Coordinator

Wheaton College Library (IL)

630.752.5893

 

 

From: archivesspac...@lyrasislists.org <archivesspac...@lyrasislists.org> on behalf of Thomas McNeely <to...@wwu.edu>
Date: Wednesday, May 1, 2024 at 5:35
PM
To: David Horan <David...@uncp.edu>, Archivesspac...@lyrasislists.org <Archivesspac...@lyrasislists.org>
Subject: [ArchivesSpace Users Group] RE: Configure linux systemd service start

EXTERNAL MESSAGE: Use caution with replies, links, and attachments.

 

Tom Hanstra

unread,
May 2, 2024, 12:08:14 PM5/2/24
to Jeffrey Mudge, archivesspac...@lyrasislists.org
David,

I'll just chime in to say that the information which Jeffery sent is basically what we use as well. Especially of note is the service type of "forking" instead of "simple".  

Beyond that, just make sure the paths and user names are correct as every installation might have minor changes in that regard and make sure the PID file is actually where the script says it is and things should work.

Tom



--

Tom Hanstra
Sr. Systems Administrator


Reply all
Reply to author
Forward
0 new messages