You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Frans Knibbe <fr...@geodan.nl> on 2016/04/15 14:26:19 UTC

Fuseki: how to configure direct dereferencing?

Hello,

Being new to Jena and Fuseki, I am trying to use Fuseki as both a SPARQL
server and a means to directy access data with HTTP GET.

I have got Fuseki (version 1.3.1) running on http://localhost:3030. I want
data to be accessible to the outside world on http://www.example.com (well,
not really, but this is an example). In my Apache web server I have set

ServerName www.example.com
ProxyPass / http://localhost:3030/
ProxyPassReverse / http://localhost:3030/

I have started Fuseki like this:
./fuseki-server -v --update --mem /mydataset

And I loaded small sample dataset like this:

s-put -v http://www.example.com/mydataset/data
http://www.example.com/mydataset/data mydataset.ttl

Getting the data out via s-get works. What does not work is getting the
data via HTTP:

curl -g -H "Accept: text/turtle" http://www.example.com/mydataset/data

This results in Fuseki reporting the following error:

Error 404: No such graph: <http://localhost:3030/mydataset/data>

How could this problem be resolved? Could I change something in my web
server configuration or in my Fuseki settings to make this work?

Regards,
Frans

Re: Fuseki: how to configure direct dereferencing?

Posted by Paul Hermans <pa...@proxml.be>.
Hi Frans,

We always put something in front of Fuseki for the dereferencing way of publishing.
In our case the highly configurable NetKernel LOD edition. 
Have also a look at Graphity.


Kind Regards,
Paul Hermans













On 22/04/16 12:05, "Frans Knibbe" <fr...@geodan.nl> wrote:

>Hello,
>
>I am sorry to have to return to this question. It seems I am still having
>problems with dereferencing URIs. In my first message I described loading
>Fuseki with a sample RDF dataset and then trying dereferencing the URIs in
>that dataset. I managed to get it working for the URI of the dataset itself
>(http://www.example.com/mydataset/data in the example), but a test with an
>individual resource in the dataset, for example http://www.example.com/
>mydataset/data/something, failed.
>
>It could be that I am trying to get something out of Fuseki for which it
>was not intended. So I wonder: Is dereferencing URIs of RDF-data (not just
>graphs) stored in some kind of Jena data store supported by Fuseki (or
>perhaps another Jena component) by configuration only?
>
>Regards,
>Frans
>
>2016-04-15 15:10 GMT+02:00 Frans Knibbe <fr...@geodan.nl>:
>
>> Hello again,
>>
>> By coincidence I seem to have just stumbled across the answer to my
>> question. In another Apache HTTPD configuration file I noticed the
>> ProxyPreserveHost directive. The default setting is Off, but when enabled
>> (ProxyPreserveHost On), the original host name will be sent to the Fuseki
>> server. And that does the trick.
>>
>> I am glad it is working now, and that I did not have to resort to
>> mod_rewrite.
>>
>> Regards,
>> Frans
>>
>>
>>
>> 2016-04-15 14:26 GMT+02:00 Frans Knibbe <fr...@geodan.nl>:
>>
>>> Hello,
>>>
>>> Being new to Jena and Fuseki, I am trying to use Fuseki as both a SPARQL
>>> server and a means to directy access data with HTTP GET.
>>>
>>> I have got Fuseki (version 1.3.1) running on http://localhost:3030. I
>>> want data to be accessible to the outside world on http://www.example.com
>>> (well, not really, but this is an example). In my Apache web server I have
>>> set
>>>
>>> ServerName www.example.com
>>> ProxyPass / http://localhost:3030/
>>> ProxyPassReverse / http://localhost:3030/
>>>
>>> I have started Fuseki like this:
>>> ./fuseki-server -v --update --mem /mydataset
>>>
>>> And I loaded small sample dataset like this:
>>>
>>> s-put -v http://www.example.com/mydataset/data
>>> http://www.example.com/mydataset/data mydataset.ttl
>>>
>>> Getting the data out via s-get works. What does not work is getting the
>>> data via HTTP:
>>>
>>> curl -g -H "Accept: text/turtle" http://www.example.com/mydataset/data
>>>
>>> This results in Fuseki reporting the following error:
>>>
>>> Error 404: No such graph: <http://localhost:3030/mydataset/data>
>>>
>>> How could this problem be resolved? Could I change something in my web
>>> server configuration or in my Fuseki settings to make this work?
>>>
>>> Regards,
>>> Frans
>>>
>>>
>>

Re: Fuseki: how to configure direct dereferencing?

Posted by Andy Seaborne <an...@apache.org>.
Fuseki does not support much for dereferencing inside a dataset.  The 
question is what should be returned?

1/
A simple case is "DESCRIBE <uri>" (that can be done by a reverse proxy 
rewrite (I think).

2/
Graph Store Protocol : Fuseki support both direct and indirect naming.

A direct name is

http://www.example.com/mydataset/path/resource

(caution - service names take precedence - 
http://www.example.com/mydataset/sparql for example).

That names a graph in the dataset and you get back the whole graph. So 
to use it for dereferencing a URI, the graph naming needs to correspond 
to resources.



What did you want back from a dereference request? (what are the limits 
on the RDF?)

There seem to be a lot of choices on what to return (include lists?) so 
a front end dereference service might be the ideal set up.

     Andy

rdfs:seeAlso Pubby ?

On 22/04/16 11:05, Frans Knibbe wrote:
> Hello,
>
> I am sorry to have to return to this question. It seems I am still having
> problems with dereferencing URIs. In my first message I described loading
> Fuseki with a sample RDF dataset and then trying dereferencing the URIs in
> that dataset. I managed to get it working for the URI of the dataset itself
> (http://www.example.com/mydataset/data in the example), but a test with an
> individual resource in the dataset, for example http://www.example.com/
> mydataset/data/something, failed.
>
> It could be that I am trying to get something out of Fuseki for which it
> was not intended. So I wonder: Is dereferencing URIs of RDF-data (not just
> graphs) stored in some kind of Jena data store supported by Fuseki (or
> perhaps another Jena component) by configuration only?
>
> Regards,
> Frans
>
> 2016-04-15 15:10 GMT+02:00 Frans Knibbe <fr...@geodan.nl>:
>
>> Hello again,
>>
>> By coincidence I seem to have just stumbled across the answer to my
>> question. In another Apache HTTPD configuration file I noticed the
>> ProxyPreserveHost directive. The default setting is Off, but when enabled
>> (ProxyPreserveHost On), the original host name will be sent to the Fuseki
>> server. And that does the trick.
>>
>> I am glad it is working now, and that I did not have to resort to
>> mod_rewrite.
>>
>> Regards,
>> Frans
>>
>>
>>
>> 2016-04-15 14:26 GMT+02:00 Frans Knibbe <fr...@geodan.nl>:
>>
>>> Hello,
>>>
>>> Being new to Jena and Fuseki, I am trying to use Fuseki as both a SPARQL
>>> server and a means to directy access data with HTTP GET.
>>>
>>> I have got Fuseki (version 1.3.1) running on http://localhost:3030. I
>>> want data to be accessible to the outside world on http://www.example.com
>>> (well, not really, but this is an example). In my Apache web server I have
>>> set
>>>
>>> ServerName www.example.com
>>> ProxyPass / http://localhost:3030/
>>> ProxyPassReverse / http://localhost:3030/
>>>
>>> I have started Fuseki like this:
>>> ./fuseki-server -v --update --mem /mydataset
>>>
>>> And I loaded small sample dataset like this:
>>>
>>> s-put -v http://www.example.com/mydataset/data
>>> http://www.example.com/mydataset/data mydataset.ttl
>>>
>>> Getting the data out via s-get works. What does not work is getting the
>>> data via HTTP:
>>>
>>> curl -g -H "Accept: text/turtle" http://www.example.com/mydataset/data
>>>
>>> This results in Fuseki reporting the following error:
>>>
>>> Error 404: No such graph: <http://localhost:3030/mydataset/data>
>>>
>>> How could this problem be resolved? Could I change something in my web
>>> server configuration or in my Fuseki settings to make this work?
>>>
>>> Regards,
>>> Frans
>>>
>>>
>>
>


Re: Fuseki: how to configure direct dereferencing?

Posted by Frans Knibbe <fr...@geodan.nl>.
Hello,

I am sorry to have to return to this question. It seems I am still having
problems with dereferencing URIs. In my first message I described loading
Fuseki with a sample RDF dataset and then trying dereferencing the URIs in
that dataset. I managed to get it working for the URI of the dataset itself
(http://www.example.com/mydataset/data in the example), but a test with an
individual resource in the dataset, for example http://www.example.com/
mydataset/data/something, failed.

It could be that I am trying to get something out of Fuseki for which it
was not intended. So I wonder: Is dereferencing URIs of RDF-data (not just
graphs) stored in some kind of Jena data store supported by Fuseki (or
perhaps another Jena component) by configuration only?

Regards,
Frans

2016-04-15 15:10 GMT+02:00 Frans Knibbe <fr...@geodan.nl>:

> Hello again,
>
> By coincidence I seem to have just stumbled across the answer to my
> question. In another Apache HTTPD configuration file I noticed the
> ProxyPreserveHost directive. The default setting is Off, but when enabled
> (ProxyPreserveHost On), the original host name will be sent to the Fuseki
> server. And that does the trick.
>
> I am glad it is working now, and that I did not have to resort to
> mod_rewrite.
>
> Regards,
> Frans
>
>
>
> 2016-04-15 14:26 GMT+02:00 Frans Knibbe <fr...@geodan.nl>:
>
>> Hello,
>>
>> Being new to Jena and Fuseki, I am trying to use Fuseki as both a SPARQL
>> server and a means to directy access data with HTTP GET.
>>
>> I have got Fuseki (version 1.3.1) running on http://localhost:3030. I
>> want data to be accessible to the outside world on http://www.example.com
>> (well, not really, but this is an example). In my Apache web server I have
>> set
>>
>> ServerName www.example.com
>> ProxyPass / http://localhost:3030/
>> ProxyPassReverse / http://localhost:3030/
>>
>> I have started Fuseki like this:
>> ./fuseki-server -v --update --mem /mydataset
>>
>> And I loaded small sample dataset like this:
>>
>> s-put -v http://www.example.com/mydataset/data
>> http://www.example.com/mydataset/data mydataset.ttl
>>
>> Getting the data out via s-get works. What does not work is getting the
>> data via HTTP:
>>
>> curl -g -H "Accept: text/turtle" http://www.example.com/mydataset/data
>>
>> This results in Fuseki reporting the following error:
>>
>> Error 404: No such graph: <http://localhost:3030/mydataset/data>
>>
>> How could this problem be resolved? Could I change something in my web
>> server configuration or in my Fuseki settings to make this work?
>>
>> Regards,
>> Frans
>>
>>
>

Re: Fuseki: how to configure direct dereferencing?

Posted by Frans Knibbe <fr...@geodan.nl>.
Hello again,

By coincidence I seem to have just stumbled across the answer to my
question. In another Apache HTTPD configuration file I noticed the
ProxyPreserveHost directive. The default setting is Off, but when enabled
(ProxyPreserveHost On), the original host name will be sent to the Fuseki
server. And that does the trick.

I am glad it is working now, and that I did not have to resort to
mod_rewrite.

Regards,
Frans



2016-04-15 14:26 GMT+02:00 Frans Knibbe <fr...@geodan.nl>:

> Hello,
>
> Being new to Jena and Fuseki, I am trying to use Fuseki as both a SPARQL
> server and a means to directy access data with HTTP GET.
>
> I have got Fuseki (version 1.3.1) running on http://localhost:3030. I
> want data to be accessible to the outside world on http://www.example.com
> (well, not really, but this is an example). In my Apache web server I have
> set
>
> ServerName www.example.com
> ProxyPass / http://localhost:3030/
> ProxyPassReverse / http://localhost:3030/
>
> I have started Fuseki like this:
> ./fuseki-server -v --update --mem /mydataset
>
> And I loaded small sample dataset like this:
>
> s-put -v http://www.example.com/mydataset/data
> http://www.example.com/mydataset/data mydataset.ttl
>
> Getting the data out via s-get works. What does not work is getting the
> data via HTTP:
>
> curl -g -H "Accept: text/turtle" http://www.example.com/mydataset/data
>
> This results in Fuseki reporting the following error:
>
> Error 404: No such graph: <http://localhost:3030/mydataset/data>
>
> How could this problem be resolved? Could I change something in my web
> server configuration or in my Fuseki settings to make this work?
>
> Regards,
> Frans
>
>