Code Monkey home page Code Monkey logo

jena-docker's Introduction

Docker files for Jena

Build

This repository hosts Docker recipes for distributing Apache Jena.

Two Docker images are available:

  • jena - riot command line and friends, for use on the command line
  • fuseki - the Fuseki server with SPARQL endpoint and web interface

These are currently available from the Docker Hub as:

Note that although these Docker images are based on the official Apache Jena releases and do not alter them in any way, they do not constitute official releases from Apache Software Foundation.

Building

docker build -t jena jena
docker build -t jena-fuseki jena-fuseki

Dockerfile overview

The Dockerfiles for both images use the official eclipse-temurin:17-jre-alpine base image, which is based on the Apline:3.18.0 image; this clocks in at about 55 MB.

The ENV variables like JENA_VERSION and FUSEKI_VERSION determines which version of Jena and Fuseki are downloaded. Updating the version also requires updating the JENA_SHA512 and FUSEKI_SHA512 variables, which values should match the official Jena download .tar.gz.sha512 hashes, as approved in their release [VOTE] emails.

The ASF_MIRROR use http://www.apache.org/dyn/mirrors/mirrors.cgi that redirect to a local mirror, with a fallback to the ASF_ARCHIVE http://archive.apache.org/dist/ for older versions.

To minimize layer size, there's a single RUN with curl, sha512sum, tar zxf and mv - thus the temporary files during download and extraction are not part of the final image.

Some files from the Apache Jena distributions are stripped, e.g. javadocs and the fuseki.war file.

The Fuseki image includes some helper scripts to do tdb loading using fuseki-server.jar. In addition, Fuseki has a docker-entrypoint.sh that populates shiro.ini with the password provided as -e ADMIN_PASSWORD to Docker, or with a new randomly generated password that is printed the first time.

jena-docker's People

Contributors

adamretter avatar b2m avatar bigeyoung avatar danielbeeke avatar danmichaelo avatar danyeaw avatar javisst avatar justin2004 avatar kinow avatar kuzeko avatar mathiasvda avatar myersjustinc avatar retog avatar stain avatar syats avatar tonicebrian avatar volodymyrss avatar xgaia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jena-docker's Issues

Running Fuseki under arm32v7

Hello!
I want to run Fuseki on my SBC NanoPi NEO Air. It has arm32v7 architecture.
I think it will work if just replace the base docker image with arm32v7/openjdk:8-jre-alpine
It would be nice to create a separate branch for this.

Apache Jena 3.9.0

Hi,

would it be possible to make Apache Jena 3.7.0, 3.8.0 and 3.9.0 available via hub.docker.com? Currently, the latest version is 3.6.0.

Regards, Barry

logging

nice docker, streaming works well for the very large triple store riot conversions I'm running however it appears the default logging creates a massive -json.log file in /var/lib/docker/container/xxx logging in json format every triple processed. For now I'm force pruning after every run, but that isn't ideal, simply suppressing the (unused?) logging inside the container would be much better.

I do need to capture stdout and stderr msgs outside the container, but I hope to suppress creation of that -json.log file inside the container.

What is the best way?

Guidance on running over HTTPS

I appreciate that this may be outside the scope of this project, but I spent an entire day trying to edit this Fuseki image to run over https without making any real progress.

The official Jena guides have information on the non-ui version of Fuseki that is not applicable here (command line options that don't work), and the only relevant example that would correspond to this image's version of Fuseki (by providing an xml file for jetty) is so outdated that even lists a wrong command line option (-jetty instead of --jetty-config).

Can someone provide any guidance on editing this image to run either
i) over https with user supplied certificates or,
ii) behind an nginx that terminates SSL and does reverse proxy to Fuseki over standard http.

failed with message "SyntaxError: Unexpected token < in JSON at position 0"

Hi,

I had experienced an error message when tried to upload an rdf file, any clue ?

image

Some logs on fisuki container (I renamed /fuseki volume to /database) :

image

BTW, if I add a 'COPY inist.ttl $FUSEKI_BASE/configuration/inist.ttl' command to the Dockerfile in order to configure a Dataset on startup of Fuseki, it seems this file 'inist.ttl' is somehow not copied (or just deleted/overwritten). I had to add a 'cp "/inist.ttl" "$FUSEKI_BASE/configuration"' command to the 'docker-entrypoint.sh' file to make the Dataset appear on the jena-fuseki admin. interface !!
What am I missing ?

And here some other logs for docker command :

docker run --rm --name jena-fuseki -p 3030:3030 -e ADMIN_PASSWORD=123pw123 -e JVM_ARGS=-Xmx2g -v $(pwd)/fuseki-data:/fuseki jena-fuseki

`###################################
Initializing Apache Jena Fuseki

###################################
[2017-10-10 13:53:40] Server INFO Apache Jena Fuseki 3.4.0
[2017-10-10 13:53:40] Config INFO FUSEKI_HOME=/jena-fuseki
[2017-10-10 13:53:40] Config INFO FUSEKI_BASE=/fuseki
[2017-10-10 13:53:40] Config INFO Shiro file: file:///fuseki/shiro.ini
[2017-10-10 13:53:40] Config INFO Load configuration: file:///fuseki/configuration/inist.ttl
[2017-10-10 13:53:40] AssemblerHelp WARN ja:loadClass: Migration to Jena3: Converting com.hp.hpl.jena.tdb.TDB to org.apache.jena.tdb.TDB
[2017-10-10 13:53:40] info ERROR Does not exist: /database/databases/db1/
[2017-10-10 13:53:40] Server ERROR Exception in initialization: caught: Does not exist: /database/databases/db1/
[2017-10-10 13:53:40] WebAppContext WARN Failed startup of context o.e.j.w.WebAppContext@c1a4620{/,file:///jena-fuseki/webapp/,UNAVAILABLE}
org.apache.jena.assembler.exceptions.AssemblerException: caught: Does not exist: /database/databases/db1/
doing:
root: file:///fuseki/configuration/inist.ttl#dataset with type: http://jena.hpl.hp.com/2008/tdb#DatasetTDB assembler class: class org.apache.jena.tdb.assembler.DatasetAssemblerTDB
root: file:///fuseki/configuration/inist.ttl#text_dataset with type: http://jena.apache.org/text#TextDataset assembler class: class org.apache.jena.query.text.assembler.TextDatasetAssembler

at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:165)
at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
at org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)
at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
at org.apache.jena.query.text.assembler.TextDatasetAssembler.open(TextDatasetAssembler.java:61)
at org.apache.jena.query.text.assembler.TextDatasetAssembler.open(TextDatasetAssembler.java:42)
at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
at org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)
at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
at org.apache.jena.fuseki.build.FusekiBuilder.getDataset(FusekiBuilder.java:111)
at org.apache.jena.fuseki.build.FusekiBuilder.buildDataService(FusekiBuilder.java:70)
at org.apache.jena.fuseki.build.FusekiBuilder.buildDataAccessPoint(FusekiBuilder.java:61)
at org.apache.jena.fuseki.build.FusekiConfig.readConfiguration(FusekiConfig.java:214)
at org.apache.jena.fuseki.build.FusekiConfig.readConfigurationDirectory(FusekiConfig.java:184)
at org.apache.jena.fuseki.server.FusekiSystem.initializeDataAccessPoints(FusekiSystem.java:207)
at org.apache.jena.fuseki.server.FusekiServerListener.serverInitialization(FusekiServerListener.java:88)
at org.apache.jena.fuseki.server.FusekiServerListener.contextInitialized(FusekiServerListener.java:52)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:890)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:853)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1501)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1463)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:272)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.server.Server.start(Server.java:452)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:419)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.apache.jena.fuseki.jetty.JettyFuseki.start(JettyFuseki.java:139)
at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:367)
at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:351)
at jena.cmd.CmdMain.mainMethod(CmdMain.java:93)
at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:103)
at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67)

Caused by: org.apache.jena.tdb.TDBException: Does not exist: /database/databases/db1/
at org.apache.jena.tdb.setup.DatasetBuilderStd.error(DatasetBuilderStd.java:319)
at org.apache.jena.tdb.setup.DatasetBuilderStd.checkLocation(DatasetBuilderStd.java:147)
at org.apache.jena.tdb.setup.DatasetBuilderStd.build(DatasetBuilderStd.java:161)
at org.apache.jena.tdb.setup.DatasetBuilderStd.create(DatasetBuilderStd.java:90)
at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:213)
at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:220)
at org.apache.jena.tdb.transaction.DatasetGraphTransaction.(DatasetGraphTransaction.java:70)
at org.apache.jena.tdb.sys.TDBMaker._create(TDBMaker.java:55)
at org.apache.jena.tdb.sys.TDBMaker.createDatasetGraphTransaction(TDBMaker.java:42)
at org.apache.jena.tdb.TDBFactory._createDatasetGraph(TDBFactory.java:89)
at org.apache.jena.tdb.TDBFactory.createDatasetGraph(TDBFactory.java:71)
at org.apache.jena.tdb.assembler.DatasetAssemblerTDB.make(DatasetAssemblerTDB.java:57)
at org.apache.jena.tdb.assembler.DatasetAssemblerTDB.createDataset(DatasetAssemblerTDB.java:48)
at org.apache.jena.sparql.core.assembler.DatasetAssembler.open(DatasetAssembler.java:43)
at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
... 48 more
[2017-10-10 13:53:40] Server INFO Started 2017/10/10 13:53:40 GMT on port 3030`

Thanks.

Creating a dataset and loading data into it from command line

I want to integrate the creation of a dataset and loading of data into the dataset using this Docker image:

Is there a simple and easy way to achieve something this?

./fuseki-server --file=../staging/my_triples.ttl /my_dataset

(NOTE: assuming that /staging is a mounted to a dir on the host)

This requires stopping the server and restarting it again. I would like to start it already with the command above.

Alternatively is there single command that creates a dataset and loads data into it, while the server is already running?

Thanks!

Build container with GitHub Actions?

Perhaps if we change to using GitHub Actions for test & build instead of the current "old skool" of Travis and Docker Hub, it might then be easier for other contributors to manage those?

For inspiration (if perhaps a bit complex) see how we did it in https://github.com/bioexcel/gromacs-docker/blob/dev/.github/workflows/main.yml

We could do something similar and build both jena and jena-fuseki containers in one go, or it could be two separate actions as they don't depend on each other.

issue when using a volume for data

Hi,

I have an issue with the jena-fuseki docker image.

I have the following configuration in my docker-compose file:

jena-fuseki:
image: stain/jena-fuseki:latest
expose:
- 3030
environment:
ADMIN_PASSWORD: ${JENA_FUSEKI_ADMIN_PASSWORD}
volumes:
- jena-fuseki_data:/fuseki

When I start this container for the first time, it works without any issues. When I stop the container and start it for a second time, I get the following errors in the log:

jena-fuseki_1 | [2020-04-02 11:11:25] TDB WARN Your platform does not support checking process liveness so TDB disk locations cannot be reliably locked to prevent possible corruption due to unsafe multi-JVM usage
jena-fuseki_1 | java.io.IOException: Cannot run program "ps": error=2, No such file or directory
jena-fuseki_1 | at java.base/java.lang.ProcessBuilder.start(Unknown Source)
jena-fuseki_1 | at java.base/java.lang.ProcessBuilder.start(Unknown Source)
jena-fuseki_1 | at org.apache.jena.tdb.sys.ProcessUtils.getProcessInfo(ProcessUtils.java:144)
jena-fuseki_1 | at org.apache.jena.tdb.sys.ProcessUtils.isAlive(ProcessUtils.java:85)
jena-fuseki_1 | at org.apache.jena.tdb.base.file.LocationLock.canObtain(LocationLock.java:148)
jena-fuseki_1 | at org.apache.jena.tdb.StoreConnection._makeAndCache(StoreConnection.java:280)
jena-fuseki_1 | at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:244)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.SystemState.init$(SystemState.java:89)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.SystemState.init(SystemState.java:56)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.SystemState.getDataset(SystemState.java:45)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.FusekiWebapp.initializeDataAccessPoints(FusekiWebapp.java:217)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.FusekiServerListener.serverInitialization(FusekiServerListener.java:93)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.FusekiServerListener.contextInitialized(FusekiServerListener.java:53)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:952)
jena-fuseki_1 | at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:558)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:917)
jena-fuseki_1 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:370)
jena-fuseki_1 | at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
jena-fuseki_1 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847)
jena-fuseki_1 | at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
jena-fuseki_1 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
jena-fuseki_1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
jena-fuseki_1 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
jena-fuseki_1 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:410)
jena-fuseki_1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
jena-fuseki_1 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
jena-fuseki_1 | at org.eclipse.jetty.server.Server.start(Server.java:416)
jena-fuseki_1 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
jena-fuseki_1 | at org.eclipse.jetty.server.Server.doStart(Server.java:383)
jena-fuseki_1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:138)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:372)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:356)
jena-fuseki_1 | at jena.cmd.CmdMain.mainMethod(CmdMain.java:93)
jena-fuseki_1 | at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
jena-fuseki_1 | at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:104)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67)
jena-fuseki_1 | Caused by: java.io.IOException: error=2, No such file or directory
jena-fuseki_1 | at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
jena-fuseki_1 | at java.base/java.lang.ProcessImpl.(Unknown Source)
jena-fuseki_1 | at java.base/java.lang.ProcessImpl.start(Unknown Source)
jena-fuseki_1 | ... 42 more
jena-fuseki_1 | [2020-04-02 11:11:25] Server ERROR Exception in initialization: Process ID 8 can't open database at location /fuseki/system/ because it is already locked by the process with PID 7. TDB databases do not permit concurrent usage across JVMs so in order to prevent possible data corruption you cannot open this location from the JVM that does not own the lock for the dataset
jena-fuseki_1 | [2020-04-02 11:11:25] WebAppContext WARN Failed startup of context o.e.j.w.WebAppContext@4e61e4c2{Apache Jena Fuseki Server,/,file:///jena-fuseki/webapp/,UNAVAILABLE}
jena-fuseki_1 | org.apache.jena.tdb.TDBException: Process ID 8 can't open database at location /fuseki/system/ because it is already locked by the process with PID 7. TDB databases do not permit concurrent usage across JVMs so in order to prevent possible data corruption you cannot open this location from the JVM that does not own the lock for the dataset
jena-fuseki_1 | at org.apache.jena.tdb.StoreConnection._makeAndCache(StoreConnection.java:282)
jena-fuseki_1 | at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:244)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.SystemState.init$(SystemState.java:89)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.SystemState.init(SystemState.java:56)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.SystemState.getDataset(SystemState.java:45)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.FusekiWebapp.initializeDataAccessPoints(FusekiWebapp.java:217)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.FusekiServerListener.serverInitialization(FusekiServerListener.java:93)
jena-fuseki_1 | at org.apache.jena.fuseki.webapp.FusekiServerListener.contextInitialized(FusekiServerListener.java:53)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:952)
jena-fuseki_1 | at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:558)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:917)
jena-fuseki_1 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:370)
jena-fuseki_1 | at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
jena-fuseki_1 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847)
jena-fuseki_1 | at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
jena-fuseki_1 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
jena-fuseki_1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
jena-fuseki_1 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
jena-fuseki_1 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:410)
jena-fuseki_1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
jena-fuseki_1 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
jena-fuseki_1 | at org.eclipse.jetty.server.Server.start(Server.java:416)
jena-fuseki_1 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
jena-fuseki_1 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
jena-fuseki_1 | at org.eclipse.jetty.server.Server.doStart(Server.java:383)
jena-fuseki_1 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:138)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:372)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:356)
jena-fuseki_1 | at jena.cmd.CmdMain.mainMethod(CmdMain.java:93)
jena-fuseki_1 | at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
jena-fuseki_1 | at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:104)
jena-fuseki_1 | at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67)
jena-fuseki_1 | [2020-04-02 11:11:25] Server INFO Started 2020/04/02 11:11:25 UTC on port 3030

the problem seems to be the file /fuseki/system/tdb.lock. Whenever this file is present, the above error is triggered. When I remove the file, the container starts normally again.

it seems to me that on shutdown of the container, this file should be cleaned up.
Is there any fix or workaround for this issue?

about reasoner

how to get inferred result after image start?

how to config this docker-image with reasoner?

TDB concurrent usage error

Hi,

I ran into a weird error while running stain/jena-fuseki using Docker Compose. Whenever I run:

version: '3'
services:
  fuseki:
    image: stain/jena-fuseki:latest
    environment:
      - ADMIN_PASSWORD=enter1234
    ports:
      - "5050:3030" 

It works the first time, when stain/jena-fuseki cannot be found locally and has to be fetched from the internet. However, when I run it again after stopping the container/killing the docker process I get an error like this:

Server     ERROR Exception in initialization: Process ID 7 can't open database at location /fuseki/system/ because it is already locked by the process with PID 8. TDB databases do not permit concurrent usage across JVMs so in order to prevent possible data corruption you cannot open this location from the JVM that does not own the lock for the dataset
fuseki_1  | [2020-03-11 16:44:57] WebAppContext WARN  Failed startup of context o.e.j.w.WebAppContext@1a28aef1{Apache Jena Fuseki Server,/,file:///jena-fuseki/webapp/,UNAVAILABLE}
fuseki_1  | org.apache.jena.tdb.TDBException: Process ID 7 can't open database at location /fuseki/system/ because it is already locked by the process with PID 8. TDB databases do not permit concurrent usage across JVMs so in order to prevent possible data corruption you cannot open this location from the JVM that does not own the lock for the dataset

This is making me think that some processes are not cleaning up fully when they are stopped or something similar to that. Especially since when I remove all of the containers (docker rm container_id) and remove the docker image (docker rmi stain/jena-fuseki) and rerun it, it works.

More than happy to help debug the issue too! Just let me know.

Cheers,
Justin

TDBException: Can't open database as it is already locked by the process with PID

Hi,

First thanks for your contribution on jena-fuseki Dockerfile 👍

I am trying to understand the usage of TDB.dump/loader command line utility to create backups and restoring them properly.

Backups:

bash-4.3# java -cp $FUSEKI_HOME/fuseki-server.jar tdb.tdbdump --compress --loc=$FUSEKI_BASE/databases/LoterreVocabularies

capture du 2018-01-30 16-36-51

=> Is my command correct (I've seen a twin command in the javadoc named 'tdbbackup', same result)?
=> As you can see I got this JVM lock exception already talked in the FAQs. But there is no other explanation on how to proceed to avoid it and to run tdbdump properly, and the docs are poor on it... So any suggestion (already tried with the running 'fuseki-server' script) ?

Restores

I think the right command of restoring gziped nquads dumps with tdbloader is :

bash-4.3# java -cp $FUSEKI_HOME/fuseki-server.jar tdb.tdbloader --loc=$FUSEKI_BASE/databases/LoterreVocabularies $FUSEKI_BASE/backups/LoterreVocabularies_BKP.nq.gz

=> I got the same TDBException about

org.apache.jena.tdb.TDBException: Can't open database at location /database/databases/LoterreVocabularies/ as it is already locked by the process with PID 1. TDB databases do not permit concurrent usage across JVMs so in order to prevent possible data corruption you cannot open this location from the JVM that does not own the lock for the dataset

Thanks for help.

docker-entrypoint.sh having ADMIN_PASSWORD with slash

Playing around with this docker image I found that it disrupts running through to the end of a working container if the ADMIN_PASSWORD contains a backslash ;-) it then tells something like sed: -e expression #1, char 30: unknown option to 's'. The code to be responsible seems here:

sed -i "s/^admin=.*/admin=$ADMIN_PASSWORD/" "$FUSEKI_BASE/shiro.ini"

A way around this is to substitute the \ in ADMIN_PASSWORD as I found here
https://stackoverflow.com/questions/27787536/how-to-pass-a-variable-containing-slashes-to-sed/27789993#27788661
… so following this idea, this should do it (untested):

sed -i "s/^admin=.*/admin=${ADMIN_PASSWORD//\//\\/}/" "$FUSEKI_BASE/shiro.ini"

Fuseki container is not exiting cleanly anymore

Hi. Just updated jena-fuseki from 3.10.0 3.14.0 and noticed that signal handling no longer seems to be handled correctly. When stopping the container, Docker waits 10 seconds until eventually SIGKILL-ing it (exit code 137):

$ docker run --name fuseki-test -d stain/jena-fuseki:3.14.0

$ docker exec fuseki-test ps
  PID TTY          TIME CMD
   80 ?        00:00:00 ps
    1 ?        00:00:00 docker-entrypoi
   10 ?        00:00:06 java

$ time docker stop fuseki-test
fuseki-test

real	0m10.441s
user	0m0.121s
sys	0m0.066s

$ docker inspect fuseki-test --format='{{.State.ExitCode}}'
137

Here's how it used to work, with java running as PID 1:

$ docker run --name fuseki-test-3.10.0 -d stain/jena-fuseki:3.10.0
$ docker exec fuseki-test-3.10.0 ps
PID   USER     TIME   COMMAND
    1 root       0:03 /usr/lib/jvm/java-1.8-openjdk/jre/bin/java -Xmx1200M -jar /jena-fuseki/fuseki-server.jar
   39 root       0:00 ps

$ time docker stop fuseki-test-3.10.0
fuseki-test-3.10.0

real	0m0.988s
user	0m0.137s
sys	0m0.079s

$ docker inspect fuseki-test-3.10.0 --format='{{.State.ExitCode}}'
143

The cause seems to be this change. Docker sends the SIGTERM signal to PID 1, but PID 1 is now the docker-entrypoint script.

To me it seems the entrypoint script is doing to much, I don't think it should be the concern of the entrypoint script to wait for the server to be ready. @xgaia , would you be ok with replacing exec "$@" & with exec "$@" and removing everything after line 40 in the entrypoint script?

A possibility could be to add a HEALTCHECK instead. A simple version would be

HEALTHCHECK CMD curl -sS --fail 'http://localhost:3030/$/ping' || exit 1

This can also be used with docker-compose to ensure that dependants do not start before Fuseki is ready:

depends_on:
  fuseki:
    condition: service_healthy

tdb.lock causes errors when restating docker container

@stain ,

I am running jena-fuseki container on a linux server.
Anytime when I restart the container I get an error message:

fuseki             | [2020-10-01 09:17:17] Server     ERROR Exception in initialization: caught: Process ID 9 can't open database at location /fuseki/databases/ontologies/ because it is already locked by the process with PID 10. TDB databases do not permit concurrent usage across JVMs so in order to prevent possible data corruption you cannot open this location from the JVM that does not own the lock for the dataset

Accordingly, there are tdb.lock files in system and databases\ontologies folders.

The only workaround I found for restarting the container withour any errors is to manually delete tdb.lock files.
This is a bit impractical, especially if I am going to have more than one database and multiple admins of our dockers.

Is there a solution that can prevent tdb.lock to cause errors in jena-fuseki container restarts?

VOLUME /fuseki prevents derivative images from adding to /fuseki/extra

VOLUME /fuseki

After declaring VOLUME /fuseki, any subsequent changes to the directory are discarded. The official fuseki-server recommends modifying FUSEKI_BASE/extra to add additional libraries to the server. In a derived image, it is not possible to undo the VOLUME declaration. Consequently, creating a derived container that includes any additional jena/fuseki plugins requires copying this entire repository in order to remove said declaration.

For those who use this image directly, simply mounting a corresponding volume and adding the plugins on their host is a workaround, but requires that those tools be manually installed by an end user. I believe this would play more nicely with the larger docker ecosystem without the volume command, as users are not prevented from mounting that folder as a volume even without it.

Dataset SPARQL endpoint

This is likely to be me not understanding Jena and/or Docker, but I've noticed that the default SPARQL endpoint isn't available from a docker build. If I build & install Jena locally, then I can view

http://localhost:3030/<dataset>/sparql

but building via docker gives a 404 error for that URL. All the other admin functions seem to work, and I can query via GET; for example, this works:

http://localhost:3030/<dataset>/query?query=select%20(count(*)%20as%20?count)%20{?s%20?p%20?o}

I've tried both the 3.9.0 and 3.7.0 docker builds

missing tdbloader2 in docker image

checked the dockerfile and dont seem to find anywhere that copies tdbloader2 while building the image. let me know if I am missing something. thank you!

Query Issues

Hi Stain,

I tried a query on your fuseki server, but it doesn't work.

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX movie: <http://data.linkedmdb.org/resource/movie/>
PREFIX dcterms: <http://purl.org/dc/terms/>

SELECT ?film ?label ?subject WHERE {
SERVICE <http://data.linkedmdb.org/sparql> {
?film a movie:film .
?film rdfs:label ?label .
?film owl:sameAs ?dbpediaLink
FILTER(regex(str(?dbpediaLink), "dbpedia", "i"))
}
SERVICE <http://dbpedia.org/sparql> {
?dbpediaLink dcterms:subject ?subject
}
}

If I run seperately, it works. There is a common variable "?dbpediaLink". Wouldn't fuseki join the same varible together?

cp: cannot create regular file '/fuseki/shiro.ini': Permission denied

Related to #77

Running the image with commands:

  • create volume container fuseki-data:
    $ docker run --name fuseki-data -v /fuseki busybox
  • run core image:
    $ docker run --restart always --name fuseki -p 80:80 --volumes-from fuseki-data stain/jena-fuseki

Results:

 ####################################
Initializing Apache Jena Fuseki

cp: cannot create regular file '/fuseki/shiro.ini': Permission denied

System

  • OS Alpine Linux 3.18.2
  • Docker version 23.0.6, build ef23cbc4315ae76c744e02d687c09548ede461bd

Exception in Fuseki initialization: `FUSEKI_BASE` is not writable

Related to #56 and #61

Running the image with this command:

$ sudo docker run \
    --detach \
    --publish 3030:3030 \
    --name fuseki-test \
    --env ADMIN_PASSWORD=some-password \
    --volume /some/mount/location:/fuseki \
    stain/jena-fuseki:latest \
    /jena-fuseki/fuseki-server --loc=/fuseki --update /ds

Results in the following exception:

$ docker logs fuseki-test 
/docker-entrypoint.sh: line 43: can't create /fuseki/shiro.ini.7: Permission denied
Waiting for Fuseki to finish starting up...
07:44:40 INFO  Server          :: Apache Jena Fuseki 4.8.0
07:44:41 INFO  Config          :: FUSEKI_HOME=/jena-fuseki
07:44:41 INFO  Config          :: FUSEKI_BASE=/fuseki
07:44:41 ERROR Server          :: Exception in server initialization
org.apache.jena.fuseki.FusekiConfigException: FUSEKI_BASE is not writable: /fuseki

The web interface at http://localhost:3030/ returns the same HTTP response as in the linked issues.
I'm experiencing this on Ubuntu Linux 20.04.05.

Error BlockMgrMapped.segmentAllocate

Hello,

Im trying to parse a big file. The program runs very well and all it was ok. After 17h of runing i get the following exception:

com.hp.hpl.jena.tdb.base.file.FileException: BlockMgrMapped.segmentAllocate: Segment = 62 : Offset = 520093696
at com.hp.hpl.jena.tdb.base.file.BlockAccessMapped.allocSegment(BlockAccessMapped.java:229)
at com.hp.hpl.jena.tdb.base.file.BlockAccessMapped.getByteBuffer(BlockAccessMapped.java:156)
at com.hp.hpl.jena.tdb.base.file.BlockAccessMapped.allocate(BlockAccessMapped.java:84)
at com.hp.hpl.jena.tdb.base.block.BlockMgrFileAccess.allocate(BlockMgrFileAccess.java:51)
at com.hp.hpl.jena.tdb.base.block.BlockMgrBase.allocate(BlockMgrBase.java:44)
at com.hp.hpl.jena.tdb.base.block.BlockMgrWrapper.allocate(BlockMgrWrapper.java:46)
at com.hp.hpl.jena.tdb.base.block.BlockMgrFreeChain.allocate(BlockMgrFreeChain.java:48)
at com.hp.hpl.jena.tdb.base.page.PageBlockMgr.create(PageBlockMgr.java:52)
at com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecordsMgr.create(BPTreeRecordsMgr.java:79)
at com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecords.create(BPTreeRecords.java:208)
at com.hp.hpl.jena.tdb.index.bplustree.BPTreeRecords.split(BPTreeRecords.java:182)
at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.split(BPTreeNode.java:519)
at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:455)
at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:468)
at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.internalInsert(BPTreeNode.java:468)
at com.hp.hpl.jena.tdb.index.bplustree.BPTreeNode.insert(BPTreeNode.java:212)
at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.addAndReturnOld(BPlusTree.java:327)
at com.hp.hpl.jena.tdb.index.bplustree.BPlusTree.add(BPlusTree.java:319)
at com.hp.hpl.jena.tdb.store.tupletable.TupleIndexRecord.performAdd(TupleIndexRecord.java:62)
at com.hp.hpl.jena.tdb.store.tupletable.TupleIndexBase.add(TupleIndexBase.java:64)
at com.hp.hpl.jena.tdb.store.tupletable.TupleTable.add(TupleTable.java:96)
at com.hp.hpl.jena.tdb.store.nodetupletable.NodeTupleTableConcrete.addRow(NodeTupleTableConcrete.java:88)
at com.hp.hpl.jena.tdb.store.TripleTable.add(TripleTable.java:58)
at com.hp.hpl.jena.tdb.store.DatasetGraphTDB.addToDftGraph(DatasetGraphTDB.java:99)
at com.hp.hpl.jena.sparql.core.DatasetGraphTriplesQuads.add(DatasetGraphTriplesQuads.java:47)
at com.hp.hpl.jena.sparql.core.GraphView.performAdd(GraphView.java:141)
at com.hp.hpl.jena.tdb.store.GraphTDB.performAdd(GraphTDB.java:87)
at com.hp.hpl.jena.graph.impl.GraphBase.add(GraphBase.java:202)
at org.apache.jena.riot.system.StreamRDFLib$ParserOutputGraph.triple(StreamRDFLib.java:163)
at org.apache.jena.riot.lang.LangTurtle.emit(LangTurtle.java:58)
at org.apache.jena.riot.lang.LangTurtleBase.emitTriple(LangTurtleBase.java:488)
at org.apache.jena.riot.lang.LangTurtleBase.objectList(LangTurtleBase.java:351)
at org.apache.jena.riot.lang.LangTurtleBase.predicateObjectItem(LangTurtleBase.java:288)
at org.apache.jena.riot.lang.LangTurtleBase.predicateObjectList(LangTurtleBase.java:269)
at org.apache.jena.riot.lang.LangTurtleBase.triples(LangTurtleBase.java:250)
at org.apache.jena.riot.lang.LangTurtleBase.triplesSameSubject(LangTurtleBase.java:191)
at org.apache.jena.riot.lang.LangTurtle.oneTopLevelElement(LangTurtle.java:47)
at org.apache.jena.riot.lang.LangTurtleBase.runParser(LangTurtleBase.java:90)
at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:42)
at org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:185)
at org.apache.jena.riot.RDFDataMgr.process(RDFDataMgr.java:906)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:687)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:210)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:143)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:132)
at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:283)
at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:342)
at de.dwslab.petar.walks.Connection.load_dumps(Connection.java:75)
at de.dwslab.petar.walks.Connection.(Connection.java:49)
at de.dwslab.petar.walks.SurfaceForms.main(SurfaceForms.java:285)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
at java.lang.Thread.run(Thread.java:745)

Im working on a SSH linux server. Any advice it appreciated.
Thank you in advance

Error 503

Hello, every time I try to use the UI I get the 503 error. At first it works fine but for the next times I get that error. Does anyone know how to fix it?

HTTP ERROR 503

Problem accessing /. Reason:

Service Unavailable

3.7.0 Character encoding issues in Firefox 65

Running the container works, but the html pages (index, manage, etc) all lack character encoding and Firefox does not like that. Chromium seems to ignore it.

screen shot 2019-01-30 at 10 20 20 am

Adding meta declarations should fix it up (UTF-8 is an example, I'm not sure which to use):

<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<meta charset="UTF-8">

I'm not sure if this is an issue with the docker image or the project itself but I figured I'd start here.

Running Fuseki with custom TDB Assembler

First of all: very helpful Docker files.
Not really issues more like questions:

  1. How can I run the image with a custom TDB Assembler config like the ones at: https://jena.apache.org/documentation/tdb/assembler.html at start ?
  2. looking to having the option of making the tdb:location of the graph as a Volume in a specified location on the host, should I reuse the /fuseki volume or add new one?

Might have some ideas on how to do this, however wanted to see if there is already some options available, which I might be missing.

Shared volume issue

Hi,

I am trying to run stain/jena-fuseki with a shared volume [1] and run into a weird issue.

[1] https://hub.docker.com/r/stain/jena-fuseki/#data-persistence

First, I start fresh:

[[
mkdir /Users/mtraul/Projects/fuseki-test/
]]

Then I start the container:

[[
docker run -it -p 3030:3030 -e ADMIN_PASSWORD=12345 -v /Users/mtraul/Projects/fuseki-test:/fuseki --rm stain/jena-fuseki
]]

Then when I try to create a dataset from the web interface, I get the following error :

[[

Initializing Apache Jena Fuseki

[2015-09-28 22:55:30] Server INFO Fuseki 2.3.0 2015-07-25T17:11:28+0000
[2015-09-28 22:55:30] Config INFO FUSEKI_HOME=/jena-fuseki
[2015-09-28 22:55:30] Config INFO FUSEKI_BASE=/fuseki
[2015-09-28 22:55:30] Servlet INFO Initializing Shiro environment
[2015-09-28 22:55:30] Config INFO Shiro file: file:///fuseki/shiro.ini
[2015-09-28 22:55:31] Server INFO Started 2015/09/28 22:55:31 GMT on port 3030
[2015-09-28 22:55:38] Admin INFO [1] GET http://192.168.99.100:3030/$/server
[2015-09-28 22:55:38] Admin INFO [1] 200 OK (15 ms)
[2015-09-28 22:55:44] Admin INFO [2] POST http://192.168.99.100:3030/$/datasets
[2015-09-28 22:55:44] Admin INFO [2] Create database : name = /foobar
[2015-09-28 22:55:45] Admin WARN [2] RC = 500 : caught: BlockMgrMapped.segmentAllocate: Segment = 0
org.apache.jena.assembler.exceptions.AssemblerException: caught: BlockMgrMapped.segmentAllocate: Segment = 0
doing:
root: http://base/#tdb_dataset_readwrite with type: http://jena.hpl.hp.com/2008/tdb#DatasetTDB assembler class: class org.apache.jena.tdb.assembler.DatasetAssemblerTDB

at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:138)
at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:117)
at org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:37)
at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:33)
at org.apache.jena.fuseki.build.Builder.buildDataService(Builder.java:74)
at org.apache.jena.fuseki.build.Builder.buildDataAccessPoint(Builder.java:59)
at org.apache.jena.fuseki.mgt.ActionDatasets.execPostContainer(ActionDatasets.java:188)
at org.apache.jena.fuseki.mgt.ActionContainerItem.execPost(ActionContainerItem.java:87)
at org.apache.jena.fuseki.mgt.ActionContainerItem.perform(ActionContainerItem.java:62)
at org.apache.jena.fuseki.mgt.ActionCtl.executeLifecycle(ActionCtl.java:76)
at org.apache.jena.fuseki.mgt.ActionCtl.executeAction(ActionCtl.java:67)
at org.apache.jena.fuseki.mgt.ActionCtl.execCommonWorker(ActionCtl.java:57)
at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:79)
at org.apache.jena.fuseki.mgt.ActionContainerItem.doPost(ActionContainerItem.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:717)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1644)
at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:80)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1632)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1624)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:479)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:459)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:281)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)
at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
at java.lang.Thread.run(Thread.java:745)

Caused by: org.apache.jena.tdb.base.file.FileException: BlockMgrMapped.segmentAllocate: Segment = 0
at org.apache.jena.tdb.base.file.BlockAccessMapped.allocSegment(BlockAccessMapped.java:231)
at org.apache.jena.tdb.base.file.BlockAccessMapped.getByteBuffer(BlockAccessMapped.java:157)
at org.apache.jena.tdb.base.file.BlockAccessMapped.allocate(BlockAccessMapped.java:85)
at org.apache.jena.tdb.base.block.BlockMgrFileAccess.allocate(BlockMgrFileAccess.java:50)
at org.apache.jena.tdb.base.block.BlockMgrBase.allocate(BlockMgrBase.java:44)
at org.apache.jena.tdb.base.block.BlockMgrWrapper.allocate(BlockMgrWrapper.java:46)
at org.apache.jena.tdb.base.block.BlockMgrFreeChain.allocate(BlockMgrFreeChain.java:48)
at org.apache.jena.tdb.base.page.PageBlockMgr.create(PageBlockMgr.java:51)
at org.apache.jena.tdb.index.bplustree.BPTreeRecordsMgr.create(BPTreeRecordsMgr.java:79)
at org.apache.jena.tdb.index.bplustree.BPTreeNodeMgr.createEmptyBPT(BPTreeNodeMgr.java:52)
at org.apache.jena.tdb.index.bplustree.BPlusTree.createIfAbsent(BPlusTree.java:213)
at org.apache.jena.tdb.index.bplustree.BPlusTree.create(BPlusTree.java:139)
at org.apache.jena.tdb.index.BuilderStdIndex$RangeIndexBuilderStd.createBPTree(BuilderStdIndex.java:94)
at org.apache.jena.tdb.index.BuilderStdIndex$RangeIndexBuilderStd.buildRangeIndex(BuilderStdIndex.java:65)
at org.apache.jena.tdb.index.BuilderStdIndex$IndexBuilderStd.buildIndex(BuilderStdIndex.java:47)
at org.apache.jena.tdb.setup.BuilderStdDB$NodeTableBuilderStd.buildNodeTable(BuilderStdDB.java:72)
at org.apache.jena.tdb.setup.DatasetBuilderStd$NodeTableBuilderRecorder.buildNodeTable(DatasetBuilderStd.java:423)
at org.apache.jena.tdb.setup.DatasetBuilderStd.makeNodeTable(DatasetBuilderStd.java:323)
at org.apache.jena.tdb.setup.DatasetBuilderStd.buildWorker(DatasetBuilderStd.java:204)
at org.apache.jena.tdb.setup.DatasetBuilderStd._build(DatasetBuilderStd.java:198)
at org.apache.jena.tdb.setup.DatasetBuilderStd.build(DatasetBuilderStd.java:187)
at org.apache.jena.tdb.setup.DatasetBuilderStd.create(DatasetBuilderStd.java:91)
at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:228)
at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:235)
at org.apache.jena.tdb.transaction.DatasetGraphTransaction.(DatasetGraphTransaction.java:73)
at org.apache.jena.tdb.sys.TDBMaker._create(TDBMaker.java:58)
at org.apache.jena.tdb.sys.TDBMaker.createDatasetGraphTransaction(TDBMaker.java:46)
at org.apache.jena.tdb.TDBFactory._createDatasetGraph(TDBFactory.java:82)
at org.apache.jena.tdb.TDBFactory.createDatasetGraph(TDBFactory.java:64)
at org.apache.jena.tdb.assembler.DatasetAssemblerTDB.make(DatasetAssemblerTDB.java:57)
at org.apache.jena.tdb.assembler.DatasetAssemblerTDB.createDataset(DatasetAssemblerTDB.java:48)
at org.apache.jena.sparql.core.assembler.DatasetAssembler.open(DatasetAssembler.java:45)
at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:130)
... 54 more
Caused by: java.io.IOException: Invalid argument
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:925)
at org.apache.jena.tdb.base.file.BlockAccessMapped.allocSegment(BlockAccessMapped.java:223)
... 86 more
[2015-09-28 22:55:45] Admin INFO [2] 500 caught: BlockMgrMapped.segmentAllocate: Segment = 0 (625 ms)
]]

The same operation works ok when using fuseki outside of the container.

Note: I have the same problem when using stain/jena-fuseki:devel.

Anybody has an idea of what's going on?

Thanks

tdbloader2: command not found

This is the docker-compose.yml:

version: '3.3'

services:
  virtuoso:
    image: stain/jena-fuseki:latest

    container_name: fuseki

    ports:
      - 3030:3030

    volumes:
      - ./data:/fuseki

    environment:
      - ADMIN_PASSWORD=secret
      - TBD=2
      - JVM_ARGS=-Xmx2g

Starting up and testing tdbloader2:

$ docker-compose up -d
Starting fuseki ... done

$ docker ps
CONTAINER ID   IMAGE                                   COMMAND                  CREATED          STATUS         PORTS                                                                                  NAMES
df9b246004e8   stain/jena-fuseki:latest                "/docker-entrypoint.…"   13 minutes ago   Up 7 seconds   0.0.0.0:3030->3030/tcp, :::3030->3030/tcp                                              fuseki

$ docker exec -it fuseki /bin/bash -c 'tdbloader2'
/bin/bash: tdbloader2: command not found

There is always the UI to load knowledge graphs, but the command line is more convenient. Thank you for reading.

lucene indexing guide

So I am new to the Jena ecosystem for a triple store (coming from virtuoso, blaze and some others).

I'm really interested in combining Jena with Lucene. Is Lucene a part of this Docker image? Is lucene part of Jena in general now?

If so I was curious if there was a guide on how to activate lucene on a database and connect various predicates to the index.

Thanks.. any help or guidance appreciated..
Doug

Tag major semver releases on docker hub

Please add tags for the major semver releases so we can automate updates in production system. This is also considered best practice. Using :latest tag would break an automated update process in the future if this project were to follow next major fuseki version.

For example, please add the tag stain/jena-fuseki:3.

Dataset creation isn't working with 4.0.0 container

I've used this config to bring up my fuseki container:

fuseki:
    image: stain/jena-fuseki:4.0.0
    network_mode: bridge
    expose:
      - 3030
    volumes:
      - db-data:/fuseki:rw
    env_file: .env
    environment:
      - FUSEKI_DATASET_1=test
      - FUSEKI_DATASET_2=test2

and included ADMIN_PASSWORD=1234567890 in the .env file and also specified db-data as a named volume.

When the container is started, the webpage shows no created datasets and docker logs shows no warnings or errors.

Run as non-root user

After trying a few things it seems that this image cannot be run as non-root without rebuilding it.

Would you accept a PR to make it so that a non-root user (i.e. userid and groupid != 0) runs jena?

If this is possible with the current image (without rebuilding it) it would be much appreciated if you can let me know how to do it.

File locking error on externally bound volume

I am using a bound volume on the Docker host to externalize the state of the TDB2 database, so I can destroy the jena-fuseki container, and recreate it, but still use the original datasets/models. Sometimes I encountered an intermittent problem with a TDBException on successive restarts. It said that the current server PID was not the same as the PID that locked the database, and so the server stopped. I think this is a safety feature build into TDB2 to stop multi-process updates.

Just above the fatal exception there was a warning, that it could not execute the "PS" command, and this appear to be associated with the lock checking process. I tried issuing the PS command from inside the container's BASH shell, but it did not recognize it.

I added a fix to the Dockerfile so that the "procps" package was installed:

change:
bash curl ca-certificates findutils coreutils pwgen \

to:
bash curl ca-certificates findutils coreutils pwgen procps \

and this appeared to fix the problem, but I need to do more testing.

Update huge data (in jena-fuseki) ~ the recommended way?

How is the recommended way to import huge data on an existing SPARQL endpoint?

From understanding README with load.sh (version Jun 12, 2022), I think this is meant to import data only for creation, not for updating. Right?

I tried out successfully:

  • SOH - SPARQL over HTTP (https://jena.apache.org/documentation/fuseki2/soh.html, needs package ruby-full inside the docker container to use s-post (appending data), s-put (overwriting everything) aso.). This works on a running Fuseki server, but it is slow; I recommend to import smaller sized files of triple files, e.g. 200-50MB uncompressed depending on processing power
  • tdbloader2 wrapper for creating a dataset structure; I used files of split data of 4GB uncompressed triple files; it is much faster but complicate to ensure to decouple the Fuseki server from the data set that is worked on

Using tdbloader2 to update an existing database I have not tested yet, and I do not know how to switch off the Fuseki server successfully and keep the container running. When I stopped the Fuseki server process ID from within the docker container, the whole container was shut down and it was not possible to reach the tdbloader2 that way.

After trying out several possibilities—with a public SPARQL endpoint to keep intact— the safest recreation of an entire data set could be (in theory):

  • have the old/broken dataset (i.e. SPARQL database) still running with the public SPARQL endpoint
  • create in parallel a new dataset structure using wrapper tdbloader2 and create all anew but to a different database location place (tdbloader2 --loc '…')
    • when this is done, switch the configuration of the public SPARQL endpoint manually to read from the new dataset structure

Recreate all backup data

I had to recreate the entire data because of a data indexing error (see lists.apache.org thread “MOVE GRAPH … TO GRAPH … ~  Server Error 500 Iterator: started at 5, now 6 (SPARQL Update)”)—and one solution I came up with, is to use the tdbloader2 wrapper for creating the first data structure (I think, in theory, it should work also on an existing data structure but with fuseki server switched off, which is the problem to get fuseki server switched off while having the docker container keep running).

In my case I had to reimport the entire backup of 8GB zipped triple data (about 1,300,000,000 triples), to recreate the data structure properly; it failed to import the whole 8GB of zipped data, but splitting the triple data into smaller pieces succeeded. What I did the wrong way, after backup the data first, was to delete the public SPARQL endpoint (it was intended to delete the data structure, but would be better to run the SPARQL endpoint on some data until the update or new creation is finished). What I did, was:

  1. backup all data using Fuseki UI (8GB gzipped, 1,300,000,000 triple data)
  2. split backup file (backup was split into equal sizes of ~4GB unzipped data and became 52 files of unzipped triple data files)
  3. I did it wrong: delete intentionally the SPARQL end point with the old data
  4. let wrapper tdbloader2 run on these split files—it took 4 days 7 hours to complete all indexing of 1,3 bn triples
  5. create the corresponding data set name (persistent TDB2 – dataset, i.e. actually the database configuration file *.ttl) with the Fuseki UI, it will link the data to the SPARQL endpoint

Comments to step 2. (splitting):

BACKUPPATH=/opt/jena-fuseki/import-sandbox/backups

cd "${BACKUPPATH}"
  
# using real backup data to split into unzipped 4GB partial files
# append extension: ….nq  
# compress the split files
gunzip < backup_20230123.nq.gz | \
  split --line-bytes=4G \
  --additional-suffix=.nq \
  --filter='echo -n compress $FILE; gzip --verbose > $FILE.gz' \
  - backup_20230123_split-

Comments to step 4. (tdbloader2):

The setup was something like #70 (comment), i.e.

  • one docker container managing the data (fuseki-data)
  • one docker container (fuseki-app) with linked volumes for running the Fuseki server

And the command to run tdbloader2 was something like:

DATASET=CETAF-IDs
# in the docker container “fuseki-app” the /fuseki/databases/${DATASET} was made empty

# run the wrapper tdbloader2 on the running docker container fuseki-app
docker exec -it fuseki-app  /bin/bash -c "/jena-fuseki/tdbloader2 --loc /fuseki/databases/${DATASET} \
 /container-path-to-data-backups/{backup_20230123_split-aa.nq.gz,backup_20230123_split-ab.nq.gz\
,backup_20230123_split-ac.nq.gz,backup_20230123_split-ad.nq.gz\
,backup_20230123_split-ae.nq.gz,backup_20230123_split-af.nq.gz\
,backup_20230123_split-ag.nq.gz,backup_20230123_split-ah.nq.gz\
,backup_20230123_split-ai.nq.gz,backup_20230123_split-aj.nq.gz\
,backup_20230123_split-ak.nq.gz,backup_20230123_split-al.nq.gz\
,backup_20230123_split-am.nq.gz,backup_20230123_split-an.nq.gz\
,backup_20230123_split-ao.nq.gz,backup_20230123_split-ap.nq.gz\
,backup_20230123_split-aq.nq.gz,backup_20230123_split-ar.nq.gz\
,backup_20230123_split-as.nq.gz,backup_20230123_split-at.nq.gz\
,backup_20230123_split-au.nq.gz,backup_20230123_split-av.nq.gz\
,backup_20230123_split-aw.nq.gz,backup_20230123_split-ax.nq.gz\
,backup_20230123_split-ay.nq.gz,backup_20230123_split-az.nq.gz\
,backup_20230123_split-ba.nq.gz,backup_20230123_split-bb.nq.gz\
,backup_20230123_split-bc.nq.gz,backup_20230123_split-bd.nq.gz\
,backup_20230123_split-be.nq.gz,backup_20230123_split-bf.nq.gz\
,backup_20230123_split-bg.nq.gz,backup_20230123_split-bh.nq.gz\
,backup_20230123_split-bi.nq.gz,backup_20230123_split-bj.nq.gz\
,backup_20230123_split-bk.nq.gz,backup_20230123_split-bl.nq.gz\
,backup_20230123_split-bm.nq.gz,backup_20230123_split-bn.nq.gz\
,backup_20230123_split-bo.nq.gz,backup_20230123_split-bp.nq.gz\
,backup_20230123_split-bq.nq.gz,backup_20230123_split-br.nq.gz\
,backup_20230123_split-bs.nq.gz,backup_20230123_split-bt.nq.gz\
,backup_20230123_split-bu.nq.gz,backup_20230123_split-bv.nq.gz\
,backup_20230123_split-bw.nq.gz,backup_20230123_split-bx.nq.gz\
,backup_20230123_split-by.nq.gz,backup_20230123_split-bz.nq.gz}" \
 | tee --append /opt/jena-fuseki/import-sandbox/import_backup_${DATASET}_$(date '+%Y%m%d-%H%M')_split.nq.gz.log

Error 503 : Service unavailable

Hello,

Every time I am running the image, it works fine the first time, but if I stop the container and restart it, I get:


HTTP ERROR 503

Problem accessing /. Reason:

    Service Unavailable

Do you know why it is happening?

Understanding documentation, loading and creating datasets

Hi,

I found, that it does not create the dataset, the documentation is documenting, I guess it is not FUSEKI_DATASET1 but FUSEKI_DATASET_1 … ;-) see

docker run -d --name fuseki -p 3030:3030 \
  -e FUSEKI_DATASET_1=mydataset \
  -e FUSEKI_DATASET_2=otherdataset \
  stain/jena-fuseki

The other thing I have a hard time to figure it out, is how to use volumes and to load data into that empty created database from before. I have no clue yet. I try to load just rdfs into mydataset.

  • Can one run and create empty datasets of the fuseki and load data at the same time?
  • Can you kindly provide a complete minimum example from scratch for loading data via command line into the before created empty dataset please? I do not understand how container fuseki-data gets to know about the empty created database at start up, in which I want to load my data via command line.

Thank you

Question about external volumes and docker-compose

Hi Stian,

currently trying to configure your image with Freebase and docker-compose (instead of your docker run cmds).

Ok, so my setup:

docker-compose

version: '2'
services:
  web:
    build: .
    volumes:
      - ./freebase:/freebase
    ports:
      - "80:80"
    tty: true

where freebase is a folder in the project folder, which is in .dockerignore and which is mounted as a volume as you can see

Dockerfile

FROM stain/jena-fuseki
COPY ./deploy.sh ./deploy.sh
COPY ./entrypoint.sh ./entrypoint.sh
ENTRYPOINT ["/bin/sh", "entrypoint.sh"]

entrypoint.sh

#!/bin/sh
if [ -n "$(find freebase/ -prune -empty -type d 2>/dev/null)" ]
then
  echo "Folder freebase is empty, start deployment."
  sh ./deploy.sh
  sh ./load.sh
else
  sh ./load.sh  
fi

deploy.sh

#!/bin/sh
echo "Starting download of Freebase"
wget http://commondatastorage.googleapis.com/freebase-public/rdf/freebase-rdf-latest.gz
echo "Extracting, this could take a while ..."
gunzip freebase-rdf-latest.gz
/jena-fuseki/tdbloader -loc /freebase/ freebase-rdf-latest

My problem is that my container is getting an exited with code 0. Also did --verbose up but I am not getting anything useful (I think): compose.cli.verbose_proxy.proxy_callable: docker wait -> 0 is the last entry before the exit code 0. I don't have anything running on port 3030 and the rdf loading was successful.

I'm also not sure if the pattern matcher is finding /freebase, which is mounted as a volume by docker-compose.

tdbloader2 requires GNU find and sort

tdbloader2 throws some errors because the BusyBox versions of find and quit are missing some options:

See full output below.

After I did apk update && apk add coreutils findutils it ran without errors.

bash-4.3# /jena/bin/tdbloader2 --loc /fuseki/databases/ds /staging/bibbi-aut.ttl
 13:05:13 INFO -- TDB Bulk Loader Start
find: unrecognized: -quit
BusyBox v1.24.2 (2017-01-18 14:13:46 GMT) multi-call binary.

Usage: find [-HL] [PATH]... [OPTIONS] [ACTIONS]

Search for files and perform actions on them.
First failed action stops processing of current file.
Defaults: PATH is current directory, action is '-print'

        -L,-follow      Follow symlinks
        -H              ...on command line only
        -xdev           Don't descend directories on other filesystems
        -maxdepth N     Descend at most N levels. -maxdepth 0 applies
                        actions to command line arguments only
        -mindepth N     Don't act on first N levels
        -depth          Act on directory *after* traversing it

Actions:
        ( ACTIONS )     Group actions for -o / -a
        ! ACT           Invert ACT's success/failure
        ACT1 [-a] ACT2  If ACT1 fails, stop, else do ACT2
        ACT1 -o ACT2    If ACT1 succeeds, stop, else do ACT2
                        Note: -a has higher priority than -o
        -name PATTERN   Match file name (w/o directory name) to PATTERN
        -iname PATTERN  Case insensitive -name
        -path PATTERN   Match path to PATTERN
        -ipath PATTERN  Case insensitive -path
        -regex PATTERN  Match path to regex PATTERN
        -type X         File type is X (one of: f,d,l,b,c,...)
        -perm MASK      At least one mask bit (+MASK), all bits (-MASK),
                        or exactly MASK bits are set in file's mode
        -mtime DAYS     mtime is greater than (+N), less than (-N),
                        or exactly N days in the past
        -mmin MINS      mtime is greater than (+N), less than (-N),
                        or exactly N minutes in the past
        -newer FILE     mtime is more recent than FILE's
        -inum N         File has inode number N
        -user NAME/ID   File is owned by given user
        -group NAME/ID  File is owned by given group
        -size N[bck]    File size is N (c:bytes,k:kbytes,b:512 bytes(def.))
                        +/-N: file size is bigger/smaller than N
        -links N        Number of links is greater than (+N), less than (-N),
                        or exactly N
        -prune          If current file is directory, don't descend into it
If none of the following actions is specified, -print is assumed
        -print          Print file name
        -print0         Print file name, NUL terminated
        -exec CMD ARG ; Run CMD with all instances of {} replaced by
                        file name. Fails if CMD exits with nonzero
        -exec CMD ARG + Run CMD with {} replaced by list of file names
        -delete         Delete current file/directory. Turns on -depth option
 13:05:13 INFO Data Load Phase
 13:05:13 INFO Got 1 data files to load
 13:05:13 INFO Data file 1: /staging/bibbi-aut.ttl
INFO  Load: /staging/bibbi-aut.ttl -- 2019/10/31 13:05:14 GMT
INFO  Add: 50,000 Data (Batch: 40,584 / Avg: 40,584)
INFO  Add: 100,000 Data (Batch: 81,967 / Avg: 54,288)
INFO  Add: 150,000 Data (Batch: 133,689 / Avg: 67,689)
INFO  Add: 200,000 Data (Batch: 76,452 / Avg: 69,686)
INFO  Add: 250,000 Data (Batch: 110,132 / Avg: 75,210)
INFO  Add: 300,000 Data (Batch: 140,449 / Avg: 81,521)
INFO  Total: 334,010 tuples : 4.08 seconds : 81,925.43 tuples/sec [2019/10/31 13:05:18 GMT]
 13:05:18 INFO Data Load Phase Completed
 13:05:18 INFO Index Building Phase
 13:05:18 INFO Creating Index SPO
 13:05:18 INFO Sort SPO
sort: unrecognized option: buffer-size=50%
BusyBox v1.24.2 (2017-01-18 14:13:46 GMT) multi-call binary.

Usage: sort [-nrugMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR] [FILE]...

Sort lines of text

        -b      Ignore leading blanks
        -c      Check whether input is sorted
        -d      Dictionary order (blank or alphanumeric only)
        -f      Ignore case
        -g      General numerical sort
        -i      Ignore unprintable characters
        -M      Sort month
        -n      Sort numbers
        -o      Output to file
        -t CHAR Field separator
        -k N[,M] Sort by Nth field
        -r      Reverse sort order
        -s      Stable (don't sort ties alphabetically)
        -u      Suppress duplicate lines
        -z      Lines are terminated by NUL, not newline
        -mST    Ignored for GNU compatibility
 13:05:18 ERROR Failed during data phase

Is it possible to add a new dataset from the command line?

Thanks for posting this Docker image for Fuseki! It works great. I'm trying to automate a system which spins up a new container, adds all the data to it, and adds a new dataset. The instructions you provide, in the section "recognizing the data set in Fuseki," explain how to do this using the web GUI interface, but I'd like to be able to automate this using a Dockerfile, eventually. Do you know if there is a way to add a new dataset to fuseki on the command line? I've been trying things like docker run --name fuseki -p 3030:3030 --volumes-from fuseki-data stain/jena-fuseki ./fuseki-server --loc=gut /gut where gut is the name of the dataset, but it fails, saying "directory not found."

Thanks in advance for any help you might be able to provide!

Character set issue

I loaded data that came from YAGO4 in n-triple format.
When I run the query below, I got a list in image and more.
scr xcOUn3

SELECT ?subject ?predicate ?object
WHERE {
  ?subject ?predicate ?object
}
LIMIT 25

My issue is that the character "�" is not contained in original data but faced in return data.
I think it happened in strings which contain some accented character in it.
scr DDVBkn

What has caused it?

Update to new fuseki versions?

Hej hej

is it possible to update the Dockerfile to the current fuseki version(s)? Or is it not regarded as important to update ?

There is also the ps command error in the new docker environment (triggered by fuseki) that should better be fixed see comment #33 (comment)

Kind regards
Infinite-dao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.