fuseki webinterface does not show datasets

2019-02-25 14:03发布

I have installed fuseki and start the server with

#!/bin/sh    
cd /home/frank/localInstall/jena/apache-jena-fuseki-2.5.0
exec /home/frank/localInstall/jena/apache-jena-fuseki-2.5.0/fuseki-server -v --update --mem /testDB

The server is working and programs can store data in /testDB, but the webinterface does not show the datasets and I cannot add a dataset. When I try to query the interface says Please select a dataset.

I think I had this problem before and solved it by reinstalling the fuseki folder. I would like to understand what I did wrong and how to avoid this problem. Thank you!

the config file is the one automatically generated. It is:

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

## Fuseki Server configuration file.

@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#> .

[] rdf:type fuseki:Server ;
   # Example::
   # Server-wide query timeout.   
   # 
   # Timeout - server-wide default: milliseconds.
   # Format 1: "1000" -- 1 second timeout
   # Format 2: "10000,60000" -- 10s timeout to first result, 
   #                            then 60s timeout for the rest of query.
   #
   # See javadoc for ARQ.queryTimeout for details.
   # This can also be set on a per dataset basis in the dataset assembler.
   #
   # ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "30000" ] ;

   # Add any custom classes you want to load.
   # Must have a "public static void init()" method.
   # ja:loadClass "your.code.Class" ;   

   # End triples.
   .

How should I change it, if I want to datasets available to clients and to the webbrowser interface?

标签: jena fuseki
1条回答
狗以群分
2楼-- · 2019-02-25 14:35

The problem was not with the config file, but with the default shiro.ini file in .../apache-jena-fuseki-2.5.0/run/shiro.ini. The default values do only allow local access and my access was a server. The instructions to change are clear enough. Here the relevant parts after the change:

[users]
# Implicitly adds "iniRealm =  org.apache.shiro.realm.text.IniRealm"
admin=passXXX  ## changed 

[roles]

[urls]
## Control functions open to anyone
/$/status = anon
/$/ping   = anon

## and the rest are restricted to localhost.
##/$/** = localhostFilter  ## commented out

## If you want simple, basic authentication user/password
## on the operations, 
##    1 - set a better password in [users] above.
##    2 - comment out the "/$/** = localhost" line and use:
"/$/** = authcBasic,user[admin]"  ## enabled, removed ##

I assume that it is explained somewhere and I read it and forgot it when I moved from my localhost installation to a server. It would be helpful if the interface would indicate that permissions are not given in stead of inviting to select a dataset.

查看更多
登录 后发表回答