Hi Daniel,
Thanks for the tips. I finally made time to explore this in more detail. I made some minor changes to the script you provided so that the log and data directories are subdirectories of the "standard" /var/log and /tmp directories that are shared by other apps. (Of course, I also had to change my Gremlin Server config properties files to point to the same data directory.)
Before I made these changes, the "if [ ! -d $LOG_DIR ];" test in the startup script never succeeded because the /var/log directory already existed. Consequently, the $GREMLIN_USER was not given ownership of the log and data directories, and (as you suggested) the $GREMLIN_USER did not have full access to the data directory.
I also noticed that the $GREMLIN_DATA_DIR variable was never assigned a value in the original version of the script. That was an easy fix.
It seems like it is running smoothly now.
An updated version of the complete script we are using is pasted below, in case it is helpful to you or anybody else. You will notice that it includes some hard-coded paths for our server environment and Gremlin Server configuration. It would be great to include this script with the standard distribution of Gremlin Server. I'd imagine that I would not be the only one who would appreciate using it.
Thanks!!!
Andrew
description "Gremlin Server"
env GREMLIN_USER=gremlin-user
env GREMLIN_GROUP=gremlin-group
env GREMLIN_PID_FILE=/var/run/gremlin.pid
env GREMLIN_LOG=/var/log/gremlin/gremlin-server.log
env GREMLIN_DATA_DIR=/tmp/gremlin
# uncomment the next line if you want Gremlin Server to start automatically after system reboots
start on filesystem and net-device-up IFACE=eth0
LOG_DIR=`dirname $GREMLIN_LOG`
if [ ! -d $LOG_DIR ]; then
mkdir -p $GREMLIN_DATA_DIR $LOG_DIR
chown -R $GREMLIN_USER:$GREMLIN_GROUP $GREMLIN_DATA_DIR $LOG_DIR
if [ -f /etc/default/gremlin-server ]; then . /etc/default/gremlin-server; fi
exec start-stop-daemon --start --make-pidfile --pidfile $GREMLIN_PID_FILE --chuid $GREMLIN_USER --chdir $GREMLIN_HOME --exec $GREMLIN_HOME/bin/gremlin-server.sh $GREMLIN_HOME/conf/gremlin-server-xps-http.yaml >> $GREMLIN_LOG 2>&1