I'm able to get the fuseki endpoint up and I can connect on reboot now. I used crontab @reboot cd /app/fuseki && /app/fuseki/launchFuseki.sh
/app/fuseki/launchFuseki.sh looks like export JENA=/app/jena export FUSEKI=/app/fuseki export JENAROOT=/app/jena export PATH=$PATH:$JENAROOT/bin export FusekiInstallDir=/app/fuseki export FUSEKI_HOME=/app/fuseki /app/fuseki/fuseki start The path statements are not working on reboot and unable to access SPARQL from my other server. It may have to do with puppet over writing the paths, I'm checking on that now. Thanks again for all the help. -----Original Message----- From: Stian Soiland-Reyes [mailto:[email protected]] Sent: Wednesday, February 04, 2015 7:13 AM To: [email protected] Cc: [email protected] Subject: Re: Jena setup The non-root bug is a known issue with a patch: https://issues.apache.org/jira/browse/JENA-789 To run as a non-root user: Edit /etc/default/fuseki to contain: [root@b89e7dda506f /]# cat /etc/default/fuseki FUSEKI_HOME=/opt/jena-fuseki FUSEKI_DATA_DIR=/var/lib/fuseki FUSEKI_LOGS=/var/log/fuseki FUSEKI_USER=fuseki [root@b89e7dda506f /]# source /etc/default/fuseki [root@b89e7dda506f /]# adduser fuseki [root@b89e7dda506f /]# service fuseki stop [root@b89e7dda506f /]# chown -R $FUSEKI_USER $FUSEKI_DATA_DIR $FUSEKI_LOGS [root@b89e7dda506f /]# wget https://issues.apache.org/jira/secure/attachment/12671074/jena-789.patch [root@b89e7dda506f /]# yum install -y patch [root@b89e7dda506f /]# patch /opt/jena-fuseki/fuseki jena-789.patch [root@b89e7dda506f /]# service fuseki start [root@b89e7dda506f /]# cat /var/log/fuseki/stderrout.log 12:11:19 INFO TDB dataset: directory=/var/lib/fuseki 12:11:20 INFO Dataset path = /ds 12:11:20 INFO Fuseki 1.1.1 2014-10-02T16:36:17+0100 12:11:20 INFO Started 2015/02/04 12:11:20 UTC on port 3030 On 4 February 2015 at 12:01, Stian Soiland-Reyes <[email protected]> wrote: > My apologies for confusing you.. Redhat-based distros has chkconfig now. > > Here's how I suggest you install it: > > [root@b89e7dda506f tmp]# cd /tmp > [root@b89e7dda506f tmp]# wget > http://mirror.catn.com/pub/apache//jena/binaries/jena-fuseki-1.1.1-dis > tribution.tar.gz [root@b89e7dda506f tmp]# tar zxfv > jena-fuseki-1.1.1-distribution.tar.gz > [root@b89e7dda506f tmp]# mv jena-fuseki-1.1.1 /opt/jena-fuseki > [root@b89e7dda506f tmp]# ln -s /opt/jena-fuseki/fuseki /etc/init.d/ > [root@b89e7dda506f tmp]# chkconfig fuseki on [root@b89e7dda506f tmp]# > chkconfig --list fuseki > fuseki 0:off 1:off 2:on 3:on 4:on 5:on 6:off > > This would mean it should start on startup. To start it right away: > > [root@b89e7dda506f tmp]# service fuseki start Starting Fuseki: > Redirecting Fuseki stderr/stdout to /opt/jena-fuseki/log/stderrout.log > STARTED Fuseki Wed Feb 4 11:42:35 UTC 2015 > PID=265 > > [root@b89e7dda506f tmp]# ps -ef > UID PID PPID C STIME TTY TIME CMD > root 1 0 0 11:23 ? 00:00:00 bash > root 265 1 8 11:42 ? 00:00:06 java -Xmx1200M -jar > /opt/jena-fuseki/fuseki-server.jar --update --loc=/opt/jena-fuseki/DB > /ds > > > These settings make it more unix-like installation: > > [root@b89e7dda506f tmp]# cat /etc/default/fuseki > FUSEKI_DATA_DIR=/var/lib/fuseki FUSEKI_LOGS=/var/log/fuseki > > See /etc/init.d/fuseki for other variables you can set. > > > > Note that setting FUSEKI_USER does not seem to work very well (at > least for me) - it's not passing along the remaining variables - so > unfortunately your Fuseki would run as the root user with the security > implications this entails. > > > > On 4 February 2015 at 00:02, Legault, Phillip [ITSUS] > <[email protected]> wrote: >> Thanks >> Joshua and Stian >> I will give this a try in the morning >> >> -----Original Message----- >> From: Stian Soiland-Reyes [mailto:[email protected]] >> Sent: Tuesday, February 03, 2015 6:01 PM >> To: [email protected]; [email protected] >> Subject: Re: Jena setup >> >> You would also want to run update-rc.d for the runlevels so that it is >> started on reboot. >> >> I'm afraid I don't remember the exact syntax. >> >> Note that the init script from Jena Fuseki uses /etc/fuseki for both >> configuration and data storage. You can either edit the init script or >> create a symlink to use a different folder. >> On 3 Feb 2015 22:49, "Joshua TAYLOR" <[email protected]> wrote: >> >>> "How to start Fuseki when OS starts?" [1] may be of interest to you: >>> >>> "Fuseki comes with a script that does exactly the kinds of things >>> you're asking for. It's just a matter of putting the fuseki script >>> in an init.d directory" >>> >>> I've not used Red Hat/Fedora in a while, but I imagine it must have >>> some of the same kinds of init.d scripts. >>> >>> [1] http://stackoverflow.com/q/26589016/1281433 >>> >>> On Tue, Feb 3, 2015 at 5:21 PM, Legault, Phillip [ITSUS] >>> <[email protected]> wrote: >>> > >>> > I'm new to Jena Fuseki and I hope someone can help me. I'm trying >>> > to get >>> the fuseki server running on redhat @ reboot. >>> > I'm able to get it running at the command line and the test data worked. >>> > export JENAROOT=/app/jena >>> > PATH=$PATH:$JENAROOT/bin >>> > ./fuseki-server --update --loc=DB --port=8080 /ds >>> > >>> > I'm setting this up to use with a Semantic MediaWiiki server >>> > >>> > How do I get this to start on reboot with the env vars? >>> > >>> > I tried starting it with crontab and could not get it to work. >>> > >>> > >>> > >>> > >>> >>> >>> >>> -- >>> Joshua Taylor, http://www.cs.rpi.edu/~tayloj/ >>> > > > > -- > Stian Soiland-Reyes, eScience Lab > School of Computer Science > The University of Manchester > http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718 -- Stian Soiland-Reyes, myGrid team School of Computer Science The University of Manchester http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718
