[Archivesspace_Users_Group] Running archivesspace from systemd

Flannon Jackson flannon at nyu.edu
Fri Jan 26 17:16:26 EST 2018


Hi Blake,

I was able to get my issues sorted out and I've now got archivesspace 2.2.2
running on Centos 7.  I've got it set up in a vagrant box if you want to
have a look.  If you've got virtualbox and vagrant set up on your local
machine then you can get it running like this,


*  $ git clone git at github.com:NYULibraries/vagrant-archivesspace.git*

*  $ cd vagrant-archivesspace*

*  $ vagrant up*

*  $ vagrant ssh*
*  $ sudo systemctl start archivesspace.service*

It'll install archivesspace in /opt/archviesspace, and the unit file will
be at /ets/systemd/system/archivesspace.service.  All the config details,
usernames, passwords and such, can be found in

  /etc/puppetlabs/code/environments/development/data/archivesspace.yaml

Once archivesspace is up and running you'll be able to connect via your
browser at localhost:8080.  If you've already got something running on your
local machine on any of the archivesspace ports you'll need to change the
port mappings in the Vagrantfile before you run `vagrant up`.

-f



On Fri, Jan 26, 2018 at 1:49 PM, Blake Carver <blake.carver at lyrasis.org>
wrote:

> Has anyone had any luck with systemd yet?
>
>
>
> ________________________________________
> From: archivesspace_users_group-bounces at lyralists.lyrasis.org <
> archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of
> Flannon Jackson <flannon at nyu.edu>
> Sent: Monday, August 7, 2017 2:01:15 PM
> To: Archivesspace Users Group
> Subject: [Archivesspace_Users_Group] Running archivesspace from systemd
>
> 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
> results)
>
> 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]
>   WantedBy=multi-user.target
>
> 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
>   ExecStart=/opt/archivesspace/aspace-start.sh
>   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.
>
> Thanks,
>
> Flannon
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20180126/09fef6f2/attachment.html>


More information about the Archivesspace_Users_Group mailing list