You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Erik Bijsterbosch <e....@gmail.com> on 2022/02/09 13:33:33 UTC

Configure fuseki-server with geosparql assembler

Hi,

When embedding geosparql as an assembler in my *fuseki-server *configuration
I get the following error at startup in my docker log:

 ⠿ Container fuseki-1  Removed                                0.9s
[+] Running 1/1
 ⠿ Container labs-services-fuseki-1  Created                  0.1s
Attaching to fuseki-1
fuseki-1  | /opt/java-minimal/bin/java -Xmx1048m -Xms1048m -jar
/fuseki/jena-fuseki-server-4.4.0.jar --conf=config-fuseki.ttl
fuseki-1  | the root file:///fuseki/config-fuseki.ttl#geo_ds has no most
specific type that is a subclass of ja:Object
fuseki-1 exited with code 1

I stripped config-fuseki.ttl to the bare example as follows:

PREFIX :          <#>
PREFIX fuseki:    <http://jena.apache.org/fuseki#>
PREFIX rdf:       <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:      <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ja:        <http://jena.hpl.hp.com/2005/11/Assembler#>
PREFIX tdb2:      <http://jena.apache.org/2016/tdb#>
PREFIX geosparql: <http://jena.apache.org/geosparql#>

<#service> rdf:type fuseki:Service;
           fuseki:name "dst";
           fuseki:endpoint [ fuseki:operation fuseki:query; ] ;
           fuseki:dataset <#geo_dst> .

<#geo_dst> rdf:type geosparql:geosparqlDataset ;
          geosparql:spatialIndexFile     "databases/DB2/spatial.index";
          geosparql:dataset <#baseDataset> ;
.

<#baseDataset> rdf:type tdb2:DatasetTDB2 ;
               tdb2:location "databases/DB2"

What could be wrong here and what else needs to be done for a proper
*fuseki-geosparql-server* setup?

Regards.
Erik

Re: Re: Configure fuseki-server with geosparql assembler

Posted by Erik Bijsterbosch <e....@gmail.com>.
Hi Lorenz,

When I watch the memory consumption in top java is running steady at 39g
for about 15 minutes (with -Xmx24g -Xms24g set).
With max. memory set to 43g docker exits with code 137 (out of memory),
shortly after startup (with inference=false):

This is not the behaviour when *--inference* is set (fuseki tx abort).
We have to use inference to access the alternate geometry predicates in our
dataset(s).
They don't contain the right geosparql predicate.

Andy mentioned earlier that the following error messages should/could be in
the logging, but I didn't see them:



*Should be a log line: "Inferencing Error: ..." as well or there is ajava
Throwable/Error happening e.g. OutOfMemoryError.   *


Op vr 11 feb. 2022 om 10:17 schreef Lorenz Buehmann <
buehmann@informatik.uni-leipzig.de>:

> I'm pretty sure the inference will be computed in-memory, so maybe it's
> a memory issue?
>
> On the other hand, do you really need the inferences computed for the
> GeoSPARQL schema? If not, it's possible to disable it in the assembler
> file.
>
> On 11.02.22 10:08, Erik Bijsterbosch wrote:
> > Hi Adrian,
> >
> > Thanks.
> > I noticed this repo yesterday.
> > I will check it out later.
> >
> > For now I really want to know what's happening in my implementation,
> > which works fine on my local machine with a small dataset.
> > Some more tests show that fuseki only aborts while *inferencing *my 256
> > million triple dataset.
> >
> > Maybe someone can provide me with a way to debug this...
> >
> > Regards,
> > Erik
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Op vr 11 feb. 2022 om 06:29 schreef Adrian Gschwend <ml-ktk@netlabs.org
> >:
> >
> >> On 10.02.22 22:18, Erik Bijsterbosch wrote:
> >>
> >> Hi Erik,
> >>
> >>> I pursued my attempt to set up a dockerised fuseki-server and
> >>> fuseki-geosparql combi application.
> >>> I created one image for boh services which I can start with
> >> docker-compose
> >>> arguments.
> >> You might want to try the work my colleague Ludovic did:
> >>
> >> https://github.com/zazuko/fuseki-geosparql
> >>
> >> regards
> >>
> >> Adrian
> >>
>

Re: Re: Configure fuseki-server with geosparql assembler

Posted by Lorenz Buehmann <bu...@informatik.uni-leipzig.de>.
I'm pretty sure the inference will be computed in-memory, so maybe it's 
a memory issue?

On the other hand, do you really need the inferences computed for the 
GeoSPARQL schema? If not, it's possible to disable it in the assembler 
file.

On 11.02.22 10:08, Erik Bijsterbosch wrote:
> Hi Adrian,
>
> Thanks.
> I noticed this repo yesterday.
> I will check it out later.
>
> For now I really want to know what's happening in my implementation,
> which works fine on my local machine with a small dataset.
> Some more tests show that fuseki only aborts while *inferencing *my 256
> million triple dataset.
>
> Maybe someone can provide me with a way to debug this...
>
> Regards,
> Erik
>
>
>
>
>
>
>
>
>
> Op vr 11 feb. 2022 om 06:29 schreef Adrian Gschwend <ml...@netlabs.org>:
>
>> On 10.02.22 22:18, Erik Bijsterbosch wrote:
>>
>> Hi Erik,
>>
>>> I pursued my attempt to set up a dockerised fuseki-server and
>>> fuseki-geosparql combi application.
>>> I created one image for boh services which I can start with
>> docker-compose
>>> arguments.
>> You might want to try the work my colleague Ludovic did:
>>
>> https://github.com/zazuko/fuseki-geosparql
>>
>> regards
>>
>> Adrian
>>

Re: Configure fuseki-server with geosparql assembler

Posted by Erik Bijsterbosch <e....@gmail.com>.
Hi Adrian,

Thanks.
I noticed this repo yesterday.
I will check it out later.

For now I really want to know what's happening in my implementation,
which works fine on my local machine with a small dataset.
Some more tests show that fuseki only aborts while *inferencing *my 256
million triple dataset.

Maybe someone can provide me with a way to debug this...

Regards,
Erik









Op vr 11 feb. 2022 om 06:29 schreef Adrian Gschwend <ml...@netlabs.org>:

> On 10.02.22 22:18, Erik Bijsterbosch wrote:
>
> Hi Erik,
>
> > I pursued my attempt to set up a dockerised fuseki-server and
> > fuseki-geosparql combi application.
> > I created one image for boh services which I can start with
> docker-compose
> > arguments.
>
> You might want to try the work my colleague Ludovic did:
>
> https://github.com/zazuko/fuseki-geosparql
>
> regards
>
> Adrian
>

Re: Configure fuseki-server with geosparql assembler

Posted by Adrian Gschwend <ml...@netlabs.org>.
On 10.02.22 22:18, Erik Bijsterbosch wrote:

Hi Erik,

> I pursued my attempt to set up a dockerised fuseki-server and
> fuseki-geosparql combi application.
> I created one image for boh services which I can start with docker-compose
> arguments.

You might want to try the work my colleague Ludovic did:

https://github.com/zazuko/fuseki-geosparql

regards

Adrian

Re: Configure fuseki-server with geosparql assembler

Posted by Erik Bijsterbosch <e....@gmail.com>.
Hi Andy

I pursued my attempt to set up a dockerised fuseki-server and
fuseki-geosparql combi application.
I created one image for boh services which I can start with docker-compose
arguments.
On my local machine with a small geo dataset everything seems to work
properly now.
When deploying this to my server where my large dataset resides, both
fuseki server and - geosparql abort and I cannot figure out why, neither
with debug logging.
Hopefully someone can help me out.on this...

*docker logs*
Starting dst_fuseki_1 ... done
Attaching to  dst_fuseki_1
fuseki_1            | /opt/java-minimal/bin/java -Xmx24g -Xms24g -cp
/fuseki/*:/fuseki/databases/SIS/apache-sis-1.1/data/../lib/*
org.apache.jena.fuseki.main.cmds.FusekiMainCmd --conf=config-fuseki.ttl
fuseki_1            | SLF4J: Class path contains multiple SLF4J bindings.
fuseki_1            | SLF4J: Found binding in
[jar:file:/fuseki/jena-fuseki-server-4.4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
fuseki_1            | SLF4J: Found binding in
[jar:file:/fuseki/jena-fuseki-geosparql-4.4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
fuseki_1            | SLF4J: See
http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
fuseki_1            | SLF4J: Actual binding is of type
[org.apache.logging.slf4j.Log4jLoggerFactory]
fuseki_1            | [2022-02-10 15:29:04] INFO  GeoSPARQLOperations ::
Applying hasDefaultGeometry - Completed
fuseki_1            | [2022-02-10 15:29:04] INFO  GeoSPARQLOperations ::
Applying GeoSPARQL Schema - Started
fuseki_1            | [2022-02-10 15:29:04] INFO  GeoSPARQLOperations ::
GeoSPARQL schema not applied to empty graph: default
fuseki_1            | Write transaction with no commit() or abort() before
end() - forced abort

*config-fuseki.ttl*
## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0

PREFIX :          <#>
PREFIX fuseki:    <http://jena.apache.org/fuseki#>
PREFIX rdf:       <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:      <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ja:        <http://jena.hpl.hp.com/2005/11/Assembler#>
PREFIX tdb2:      <http://jena.apache.org/2016/tdb#>
PREFIX geosparql: <http://jena.apache.org/geosparql#>

[] rdf:type fuseki:Server ;
   fuseki:passwd  "pwfile.txt" ;
   fuseki:auth    "digest" ;
   fuseki:services (
       :service
   ) .

## Service description for "/dst"
## with a TDB2 dataset

:service rdf:type fuseki:Service ;
         fuseki:name "dst" ;
         fuseki:endpoint [
             fuseki:operation fuseki:query ;
             fuseki:name "sparql" ;
             ## Set default-union-graph for this endpoint.
             ja:context [ ja:cxtName "tdb2:unionDefaultGraph" ;
ja:cxtValue true ] ;
         ] ;
         fuseki:endpoint [
             fuseki:operation fuseki:query ;
             fuseki:name "query"
         ] ;
         fuseki:endpoint [
             fuseki:operation fuseki:update ;
             fuseki:name "update"
         ] ;
         fuseki:endpoint [
             fuseki:operation fuseki:gsp-r ;
             fuseki:name "get"
         ] ;
         fuseki:endpoint [
             fuseki:operation fuseki:gsp-rw ;
             fuseki:name "data"
         ] ;
         fuseki:endpoint [
             fuseki:operation fuseki:upload ;
             fuseki:name "upload"
         ] ;
         fuseki:dataset :geo_ds
.

:geo_ds rdf:type geosparql:geosparqlDataset ;
        geosparql:spatialIndexFile     "/fuseki/databases/DB2/spatial.index";
        geosparql:dataset :dataset_tdb2 ;

        ## Custom settings.
        geosparql:applyDefaultGeometry true ;
.

:dataset_tdb2 rdf:type  tdb2:DatasetTDB2 ;
              tdb2:location "databases/DB2" ;
.









Op wo 9 feb. 2022 om 21:17 schreef Andy Seaborne <an...@apache.org>:

> Hi Erik,
>
> The jena-geosparql code isn't there by default.
>
> Unfortuately, just adding it to the standard build is messy.
>
> All users will see there will be several start-up warnings even if the
> GeoSPARQL code isn't being used.
>
> At the moment, add jena-geosparql and also the dependencies it needs.
> Setting up maven/gradle is the the robust way to do it because it only
> needs jena-geosparql else it needs:
>
> io.github.galbiston:expiring-map
> javax.xml.bind:jaxb-api
> org.apache.sis.core:sis-referencing
> org.slf4j:jul-to-slf4j
> org.locationtech.jts:jts-core
> org.jdom:jdom2
> org.apache.commons:commons-collections4
>
>
> We hope to have a version of the Fuseki UI for query and data upload,
> without the admin controls, which can be added to any Fuseki Main based
> server (jena-fuseki-geosparql is Fuseki Main based). That is work to be
> done.
>
>      Andy
>
> On 09/02/2022 13:33, Erik Bijsterbosch wrote:
> > Hi,
> >
> > When embedding geosparql as an assembler in my *fuseki-server
> *configuration
> > I get the following error at startup in my docker log:
> >
> >   ⠿ Container fuseki-1  Removed                                0.9s
> > [+] Running 1/1
> >   ⠿ Container labs-services-fuseki-1  Created                  0.1s
> > Attaching to fuseki-1
> > fuseki-1  | /opt/java-minimal/bin/java -Xmx1048m -Xms1048m -jar
> > /fuseki/jena-fuseki-server-4.4.0.jar --conf=config-fuseki.ttl
> > fuseki-1  | the root file:///fuseki/config-fuseki.ttl#geo_ds has no most
> > specific type that is a subclass of ja:Object
> > fuseki-1 exited with code 1
> >
> > I stripped config-fuseki.ttl to the bare example as follows:
> >
> > PREFIX :          <#>
> > PREFIX fuseki:    <http://jena.apache.org/fuseki#>
> > PREFIX rdf:       <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> > PREFIX rdfs:      <http://www.w3.org/2000/01/rdf-schema#>
> > PREFIX ja:        <http://jena.hpl.hp.com/2005/11/Assembler#>
> > PREFIX tdb2:      <http://jena.apache.org/2016/tdb#>
> > PREFIX geosparql: <http://jena.apache.org/geosparql#>
> >
> > <#service> rdf:type fuseki:Service;
> >             fuseki:name "dst";
> >             fuseki:endpoint [ fuseki:operation fuseki:query; ] ;
> >             fuseki:dataset <#geo_dst> .
> >
> > <#geo_dst> rdf:type geosparql:geosparqlDataset ;
> >            geosparql:spatialIndexFile     "databases/DB2/spatial.index";
> >            geosparql:dataset <#baseDataset> ;
> > .
> >
> > <#baseDataset> rdf:type tdb2:DatasetTDB2 ;
> >                 tdb2:location "databases/DB2"
> >
> > What could be wrong here and what else needs to be done for a proper
> > *fuseki-geosparql-server* setup?
> >
> > Regards.
> > Erik
> >
>

Re: Configure fuseki-server with geosparql assembler

Posted by Andy Seaborne <an...@apache.org>.
Hi Erik,

The jena-geosparql code isn't there by default.

Unfortuately, just adding it to the standard build is messy.

All users will see there will be several start-up warnings even if the 
GeoSPARQL code isn't being used.

At the moment, add jena-geosparql and also the dependencies it needs. 
Setting up maven/gradle is the the robust way to do it because it only 
needs jena-geosparql else it needs:

io.github.galbiston:expiring-map
javax.xml.bind:jaxb-api
org.apache.sis.core:sis-referencing
org.slf4j:jul-to-slf4j
org.locationtech.jts:jts-core
org.jdom:jdom2
org.apache.commons:commons-collections4


We hope to have a version of the Fuseki UI for query and data upload, 
without the admin controls, which can be added to any Fuseki Main based 
server (jena-fuseki-geosparql is Fuseki Main based). That is work to be 
done.

     Andy

On 09/02/2022 13:33, Erik Bijsterbosch wrote:
> Hi,
> 
> When embedding geosparql as an assembler in my *fuseki-server *configuration
> I get the following error at startup in my docker log:
> 
>   ⠿ Container fuseki-1  Removed                                0.9s
> [+] Running 1/1
>   ⠿ Container labs-services-fuseki-1  Created                  0.1s
> Attaching to fuseki-1
> fuseki-1  | /opt/java-minimal/bin/java -Xmx1048m -Xms1048m -jar
> /fuseki/jena-fuseki-server-4.4.0.jar --conf=config-fuseki.ttl
> fuseki-1  | the root file:///fuseki/config-fuseki.ttl#geo_ds has no most
> specific type that is a subclass of ja:Object
> fuseki-1 exited with code 1
> 
> I stripped config-fuseki.ttl to the bare example as follows:
> 
> PREFIX :          <#>
> PREFIX fuseki:    <http://jena.apache.org/fuseki#>
> PREFIX rdf:       <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX rdfs:      <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX ja:        <http://jena.hpl.hp.com/2005/11/Assembler#>
> PREFIX tdb2:      <http://jena.apache.org/2016/tdb#>
> PREFIX geosparql: <http://jena.apache.org/geosparql#>
> 
> <#service> rdf:type fuseki:Service;
>             fuseki:name "dst";
>             fuseki:endpoint [ fuseki:operation fuseki:query; ] ;
>             fuseki:dataset <#geo_dst> .
> 
> <#geo_dst> rdf:type geosparql:geosparqlDataset ;
>            geosparql:spatialIndexFile     "databases/DB2/spatial.index";
>            geosparql:dataset <#baseDataset> ;
> .
> 
> <#baseDataset> rdf:type tdb2:DatasetTDB2 ;
>                 tdb2:location "databases/DB2"
> 
> What could be wrong here and what else needs to be done for a proper
> *fuseki-geosparql-server* setup?
> 
> Regards.
> Erik
>