[Dspace-tech] handle server init script anybody?

86 views
Skip to first unread message

Christian Völker

unread,
Aug 26, 2015, 9:22:51 AM8/26/15
to dspace-tech Tech
Hello,

I just moved our DSpace to a new machine. This ment moving from Debian etch to squeeze. And I believe a server is not completely configured if I cant run shutdown -r now without all services coming up again in an orderly fashion.

For tomcat and postgres, this is out of the box functionality on any decent distribution, but not so for the handle server. CNRI does not deliver something useful for this purpose together with their software and well, if you read their docs, then say clearly, this software is not ment to be ready to run, so I am on my own.

On my old machine I had tweaked something resembling an init script, called it handled and placed it in /etc/init.d/. It worked for several years. When I copied it to the new machine it ceased working. No real wonder, blame me a conman if I call myself an admin, but I admit I am not good at coding and not even at writing simple shell scripts. It happens to rarely that I have to do it in my everyday work, so it is a real teadious task for me.

If youd ask me what exactly I did in the old script, well basically I called start-handle-server as the tomcat unix user when run with start as argument. As the official way to stop the handle server is to find out the process id and kill it, I just forgot about it and made stop be an empty method. Reload was the same as start which probably would not do its job but I did not care. Thats all.
It had a description section at the start which made it possible to run update-rc.d handled default, which is the usual way to create the appropriate links within all rc?.d folders on debian. Quick and dirty you might call that but it did exactly what I was looking for.

Now, my question is, am I the only one who is looking for something like this? Am I the only one who thinks it is a weird thing to invent it myself because there are probably so many more out there who had to solve the same issue before? What is your solution, everybody?

Thanks for answers, thanks for posting a ready made init script, that safes me the headaches from fiddling myself with #!/bin/sh.

Bye, Christian

PS: Is the use of version 7.0 of handle.jar endorsed or may I stay with version 6.2 and still feel like a pro?

helix84

unread,
Aug 26, 2015, 9:22:51 AM8/26/15
to Christian Völker, dspace-tech Tech
On Tue, May 8, 2012 at 11:13 PM, Christian Völker <C.Vo...@gmx.net> wrote:
> If youd ask me what exactly I did in the old script, well basically I called start-handle-server as the tomcat unix user when run with start as argument. As the official way to stop the handle server is to find out the process id and kill it, I just forgot about it and made stop be an empty method. Reload was the same as start which probably would not do its job but I did not care. Thats all.
> It had a description section at the start which made it possible to run update-rc.d handled default, which is the usual way to create the appropriate links within all rc?.d folders on debian. Quick and dirty you might call that but it did exactly what I was looking for.

Hi Christian,

just from a quick look - it may actually not be a problem in the
script itself, but rather in the order of init scripts. Check that
your script starts only after network is available.

If it's not it, I might write a more complete reply tomorrow.

Regards,
~~helix84

Brian Freels-Stendel

unread,
Aug 26, 2015, 9:22:53 AM8/26/15
to dspac...@lists.sourceforge.net
Hi there,

One of our sys admins cobbled up a handle server start-up script. It's
also getting a little old, but it still seems to be working fine. Look
under "Dspace Handle service" on
https://wiki.duraspace.org/display/DSPACE/Dspace+1.6.x+on+Red+Hat+Enterprise+Linux+5.
It's pretty wonderful, not having to start that thing every time the
server gets rebooted.

B--




>>>>> On 5/8/2012 at 3:25 PM, in message
>>
<CAGdvKqhumOTGRuK8WHewJLSOVykhj==G6UNPXMV7...@mail.gmail.com>,
helix84
----------------------------------------------------------------------------
>>> --
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond.
Discussions
>>> will include endpoint security, mobile security and the latest in
malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

>>> _______________________________________________
>>> DSpace-tech mailing list
>>> DSpac...@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/dspace-tech

Mark H. Wood

unread,
Aug 26, 2015, 9:22:59 AM8/26/15
to dspac...@lists.sourceforge.net
On Tue, May 08, 2012 at 11:13:55PM +0200, Christian Völker wrote:
[Handle server is not very friendly toward system startup procedures]
> Now, my question is, am I the only one who is looking for something like this? Am I the only one who thinks it is a weird thing to invent it myself because there are probably so many more out there who had to solve the same issue before? What is your solution, everybody?

You are certainly not the only one who needs to have the Handle server
start at system startup, or the only one who thinks it weird that
something like the Handle server is so hard to put on a production
footing. It should implement the Commons Daemon interface so we can
start and stop it sensibly. I keep saying I want to add that -- maybe
this time I'll get it done!

I, too, rolled my own initscript for the Handle server. Unfortunately
for you we run DSpace on Gentoo Linux and our script probably won't
work on Debian (or Red Hat). But there is a wiki page:

https://wiki.duraspace.org/display/DSPACE/Handle+Service+Startup+Scripts+for+Unix+or+Linux

and it seems you may be in luck after all, because the only script
contributed so far is for Ubuntu, a Debian derivative. I will see
about contributing our Gentoo script to keep it company.

If anyone has a good Red Hat script, I'm sure it would be appreciated.

--
Mark H. Wood, Lead System Programmer mw...@IUPUI.Edu
Asking whether markets are efficient is like asking whether people are smart.

Alexandre Magaz Graça

unread,
Aug 26, 2015, 9:23:00 AM8/26/15
to Mark H. Wood, dspac...@lists.sourceforge.net
On dc 09 mai 2012 14:43:16 CEST, Mark H. Wood wrote:
> [...]
> If anyone has a good Red Hat script, I'm sure it would be appreciated.
>

Hi,

The attached script is the one I use for CentOS/Fedora. The path to the
start-handle-server script is hard-coded though.

Cheers,
Àlex
handle-server-start-script

Pottinger, Hardy J.

unread,
Aug 26, 2015, 9:23:06 AM8/26/15
to Mark H. Wood, dspac...@lists.sourceforge.net
Hi, I've posted the handle server init script we use in our RHEL-based
environment, to the wiki page that Mark linked below.
--

HARDY POTTINGER <potti...@umsystem.edu>
University of Missouri Library Systems
http://lso.umsystem.edu/~pottingerhj/
https://MOspace.umsystem.edu/
"I think I like disruptive technology because
it makes the whole world a bit fuzzy, my
normal state of mind."
-- Robert Llewellyn (aka Kryten)

Gary Browne

unread,
Aug 26, 2015, 9:23:10 AM8/26/15
to dspace-tech Tech
Hi all,

Here's another one thrown into the mix for good measure. Been used on RHEL (4,5,6) for the last 7 years or so. Probably not the most elegant, but it works.

Cheers,
Gary
handled.txt

Ray W

unread,
Jan 28, 2021, 11:12:25 AM1/28/21
to DSpace Technical Support
Hi Everyone,

Would anyone know of an updated resource for handle server startup scripts? We upgraded to 6.3 JSPUI 3 months back and our handle servers have been erroring out intermittently (handle.service: Found left-over process 30954 (sudo) in control group while starting unit. Ignoring.). It seems that the issues we're having are rooted in our handle server init script. I found this thread and was really hoping to find an updated script but alas, I noticed the wiki hasn't been updated in some time. Is anyone willing to share their script or point me to another resource?


Thank you & take care,
Rachel
Reply all
Reply to author
Forward
0 new messages