Hi, thanks for the reply.

I could be mistaken, but I looked through the scripts, and I don’t think I’m 
having Fuseki generate a PIDfile since I’m using `systemd`.

Here is my `fuseki.service` file:

[Unit]
Description=Apache Jena Fuseki

[Service]
Restart=on-abort
Type=simple
ExecStart=/srv/data-tier/fuseki/fuseki-server 
--conf=/srv/data-tier/database/config.ttl --port=31457
User=fuseki
SupplementaryGroups=prte_database
Environment='FUSEKI_BASE=/srv/data-tier/database' 
'FUSEKI_HOME=/srv/data-tier/fuseki' 'JVM_ARGS=-Xmx1500m'

[Install]
WantedBy=multi-user.target
The `fuseki` user owns `/srv/data-tier/database` and has read/write/execute 
permissions on it.

According to the `systemd` docs 
<https://www.freedesktop.org/software/systemd/man/systemd.service.html#PIDFile=>,
 if I set `Type=simple` on a service, it shouldn’t be using PIDfiles.

Is that the problem? Should I have `Type` set to something else?


Best wishes,
Noah G.


On Mon, Jun 20, 2022, at 07:37, Sorin Gheorghiu wrote:
> Hi,
> 
> could it be related to the file permissions for fuseki.pid? It defaults 
> first available of /var/run, /usr/var/run, and /tmp if not set.
> 
> Cheers,
> Sorin
> 
> 
> Am 20.06.2022 um 15:46 schrieb Noah from ProvocaTeach:
> > Hi all,
> >
> > I am trying to run Fuseki as a `systemd` service. The service is up and 
> > running, but every time I try to query the SPARQL endpoint from 
> > `localhost`, I get a 503 Service Unavailable error.
> >
> > $ curl -iX POST http://localhost:31457/reality/query --data "CONSTRUCT 
> > WHERE {?s ?p ?o}"
> > HTTP/1.1 503 Service Unavailable
> > Cache-Control: must-revalidate,no-cache,no-store
> > Content-Type: text/html;charset=iso-8859-1
> > Content-Length: 400
> >
> > % an HTML error page
> >
> > When I check the logs, I find a bunch of error messages:
> >
> > Jun 20 04:42:15 numberphile systemd[1]: Started fuseki.service - Apache 
> > Jena Fuseki.
> > Jun 20 04:42:25 numberphile fuseki-server[611]: 04:42:25 INFO  Server       
> >    :: Apache Jena Fuseki 4.5.0
> > Jun 20 04:42:27 numberphile fuseki-server[611]: 04:42:27 INFO  Config       
> >    :: FUSEKI_HOME=/srv/data-tier/fuseki
> > Jun 20 04:42:27 numberphile fuseki-server[611]: 04:42:27 INFO  Config       
> >    :: FUSEKI_BASE=/srv/data-tier/database
> > Jun 20 04:42:27 numberphile fuseki-server[611]: 04:42:27 INFO  Config       
> >    :: Shiro file: file:///srv/data-tier/database/shiro.ini
> > Jun 20 04:42:32 numberphile fuseki-server[611]: 04:42:32 ERROR Server       
> >    :: Exception in initialization: caught: java.io.IOException: No such 
> > file or directory
> > Jun 20 04:42:32 numberphile fuseki-server[611]: 04:42:32 WARN  
> > WebAppContext   :: Failed startup of context 
> > o.e.j.w.WebAppContext@32f96bba{Apache Jena Fuseki 
> > Server,/,file:///srv/data-tier/fuseki/webapp/,UNAVAILABLE}
> > Jun 20 04:42:32 numberphile fuseki-server[611]: 
> > org.apache.jena.assembler.exceptions.AssemblerException: caught: 
> > java.io.IOException: No such file or directory
> >
> > % Many lines later…
> >
> > Jun 20 04:42:32 numberphile fuseki-server[611]: Caused by: 
> > org.apache.jena.atlas.RuntimeIOException: java.io.IOException: No such file 
> > or directory
> > Jun 20 04:42:32 numberphile fuseki-server[611]:         at 
> > org.apache.jena.atlas.io.IO.exception(IO.java:336) 
> > ~[fuseki-server.jar:4.5.0]
> > Jun 20 04:42:32 numberphile fuseki-server[611]:         at 
> > org.apache.jena.tdb2.sys.DatabaseConnection.lockForLocation(DatabaseConnection.java:129)
> >  ~[fuseki-server.jar:4.5.0]
> >
> > % Many lines later…
> >
> > Jun 20 04:42:32 numberphile fuseki-server[611]: Caused by: 
> > java.io.IOException: No such file or directory
> > Jun 20 04:42:32 numberphile fuseki-server[611]:         at 
> > java.io.UnixFileSystem.createFileExclusively(Native Method) ~[?:?]
> > Jun 20 04:42:32 numberphile fuseki-server[611]:         at 
> > java.io.File.createNewFile(File.java:1043) ~[?:?]
> >
> > % Many lines later…
> >
> > Jun 20 04:42:32 numberphile fuseki-server[611]: 04:42:32 INFO  Server       
> >    :: Started 2022/06/20 04:42:32 PDT on port 31457
> >
> > Any idea what might be causing these errors? I have not loaded anything 
> > into the database yet. I am new to server administration, but I *think* I 
> > set all the permissions correctly and edited the `fuseki.service` file 
> > appropriately…
> >
> >
> >
> > Best wishes,
> > Noah G.
> >
> >
> >
> 

Reply via email to