Re: fuseki status [get status after ./fuseki-server or java -jar]
very good Vincent, and yes Jena/Fuseki is indeed a great foundation for any LOD project. the good news is that you already use shiro by virtue of running fuseki. I highly recommend you take a look at the fuseki UI. you can simply edit the shiro.ini in the fuseki_run folder. just comment out /$/** = localhost and add /$/** = authcBasic,user[admin] and you are good to go. take a look at the features. you can load data, check the status and create new named graphs etc. I am not sure who works on the UI at the moment but I'd like to see more of it in the future. just looking at your sparql endpoint. is 346,746,619 your total number of triples at bnf? what's the public endpoint url? http://carmen1.bnf.fr:9880/sparql ? On Fri, Nov 23, 2018 at 12:13 PM Vincent Ventresque < vincent.ventres...@ens-lyon.fr> wrote: > Thanks Marco! > > My use case is very simple : I'm building a sample dataset with RDF data > from http://data.bnf.fr + a kind of "php-fuseki sandbox" where the user > will find examples of queries and php functions that show to reuse the > data. There also will be a small visualization library (developed with > javascript vis.js) that allows to explore the dataset (by drawing > networks via construct queries). > > I don't use Shiro, only a very quick install of fuseki (not even set > environment variables : the objective is to produce both a tutorial and > php code, easy to understand and to install). If you want to have a > look, I've just uploaded some files here : > https://sourceforge.net/projects/ffl-misc/files . It's still a draft of > course. A next step would be to translate the explanations into English > and ask the community if s.o. is interested to review the code : our > research project also aims at producing educational resources, and we > think that fuseki is ideal to learn LOD technologies. > > These files are adapted from my other project, which is more complex : > it's a kind of collaborative platform where users produce both archival > description and personal annotations. The platform is built on Code > Igniter and has authentication system ; here I could consider using > Shiro & admin tools. > > Best, > > Vincent > > > > > > > Le 23/11/2018 à 12:14, Marco Neumann a écrit : > > since Andy already explained the mechanics here I just wanted to add that > > > > curl -uadmin: http://localhost:3030/$/server > > > > gives you some of the information you are looking for. not sure what your > > use case is but owner of PID is not expose. > > > > > > > > On Fri, Nov 23, 2018 at 8:04 AM Vincent Ventresque < > > vincent.ventres...@ens-lyon.fr> wrote: > > > >> Hello Andy & Marco > >> > >> Can you explain `curl -u admin:` ? I've just looked at > >> > >> I get a 404 when I go there : > >> > >> http://jena.apache.org/documentation/fuseki2/admin.html > >> > >> (there's a link to this page here : > >> > http://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html) > >> > >> Thanks in advance, > >> > >> Vincent > >> > >> > >> Le 23/11/2018 à 00:44, Andy Seaborne a écrit : > >>> Do you happen to know in which version it last did work? > >>> > >>> Andy > >>> > >>> On 22/11/2018 23:23, Marco Neumann wrote: > while you are at the fuseki status here > > when accessing /$/status I am not getting no results on a Fuseki - > version > 3.8.0 instance with an enabled admin console > > curl -u admin:*** http://localhost:3030/$/status > > get's me a 404 while I can see the results and stats in the web admin. > > > -- --- Marco Neumann KONA
Re: fuseki status [get status after ./fuseki-server or java -jar]
Thanks Marco! My use case is very simple : I'm building a sample dataset with RDF data from http://data.bnf.fr + a kind of "php-fuseki sandbox" where the user will find examples of queries and php functions that show to reuse the data. There also will be a small visualization library (developed with javascript vis.js) that allows to explore the dataset (by drawing networks via construct queries). I don't use Shiro, only a very quick install of fuseki (not even set environment variables : the objective is to produce both a tutorial and php code, easy to understand and to install). If you want to have a look, I've just uploaded some files here : https://sourceforge.net/projects/ffl-misc/files . It's still a draft of course. A next step would be to translate the explanations into English and ask the community if s.o. is interested to review the code : our research project also aims at producing educational resources, and we think that fuseki is ideal to learn LOD technologies. These files are adapted from my other project, which is more complex : it's a kind of collaborative platform where users produce both archival description and personal annotations. The platform is built on Code Igniter and has authentication system ; here I could consider using Shiro & admin tools. Best, Vincent Le 23/11/2018 à 12:14, Marco Neumann a écrit : since Andy already explained the mechanics here I just wanted to add that curl -uadmin: http://localhost:3030/$/server gives you some of the information you are looking for. not sure what your use case is but owner of PID is not expose. On Fri, Nov 23, 2018 at 8:04 AM Vincent Ventresque < vincent.ventres...@ens-lyon.fr> wrote: Hello Andy & Marco Can you explain `curl -u admin:` ? I've just looked at I get a 404 when I go there : http://jena.apache.org/documentation/fuseki2/admin.html (there's a link to this page here : http://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html) Thanks in advance, Vincent Le 23/11/2018 à 00:44, Andy Seaborne a écrit : Do you happen to know in which version it last did work? Andy On 22/11/2018 23:23, Marco Neumann wrote: while you are at the fuseki status here when accessing /$/status I am not getting no results on a Fuseki - version 3.8.0 instance with an enabled admin console curl -u admin:*** http://localhost:3030/$/status get's me a 404 while I can see the results and stats in the web admin.
Re: fuseki status [get status after ./fuseki-server or java -jar]
Thanks Marco. It seems to be mapped /$/server and AFAICS has not been mapped to /$/status., only mentioned in shiro.ini. Easy enough to add a second servlet-mapping if that's what people want (the difference is that by default, /$/status is acess to anon and /$/server is accessible only to the admin UI). Thoughts? Andy On 23/11/2018 11:10, Marco Neumann wrote: just went back to 3.4 and it did not work. now upgraded to 3.9 to no avail of status. /$/stats works well though since there is no action URL mapping in the web.xml for status I presume that /$/status = anon is a typo in shiro. On Thu, Nov 22, 2018 at 11:44 PM Andy Seaborne wrote: Do you happen to know in which version it last did work? Andy On 22/11/2018 23:23, Marco Neumann wrote: while you are at the fuseki status here when accessing /$/status I am not getting no results on a Fuseki - version 3.8.0 instance with an enabled admin console curl -u admin:*** http://localhost:3030/$/status get's me a 404 while I can see the results and stats in the web admin.
Re: fuseki status [get status after ./fuseki-server or java -jar]
since Andy already explained the mechanics here I just wanted to add that curl -uadmin: http://localhost:3030/$/server gives you some of the information you are looking for. not sure what your use case is but owner of PID is not expose. On Fri, Nov 23, 2018 at 8:04 AM Vincent Ventresque < vincent.ventres...@ens-lyon.fr> wrote: > Hello Andy & Marco > > Can you explain `curl -u admin:` ? I've just looked at > > I get a 404 when I go there : > > http://jena.apache.org/documentation/fuseki2/admin.html > > (there's a link to this page here : > http://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html) > > Thanks in advance, > > Vincent > > > Le 23/11/2018 à 00:44, Andy Seaborne a écrit : > > Do you happen to know in which version it last did work? > > > > Andy > > > > On 22/11/2018 23:23, Marco Neumann wrote: > >> while you are at the fuseki status here > >> > >> when accessing /$/status I am not getting no results on a Fuseki - > >> version > >> 3.8.0 instance with an enabled admin console > >> > >> curl -u admin:*** http://localhost:3030/$/status > >> > >> get's me a 404 while I can see the results and stats in the web admin. > -- --- Marco Neumann KONA
Re: fuseki status [get status after ./fuseki-server or java -jar]
just went back to 3.4 and it did not work. now upgraded to 3.9 to no avail of status. /$/stats works well though since there is no action URL mapping in the web.xml for status I presume that /$/status = anon is a typo in shiro. On Thu, Nov 22, 2018 at 11:44 PM Andy Seaborne wrote: > Do you happen to know in which version it last did work? > > Andy > > On 22/11/2018 23:23, Marco Neumann wrote: > > while you are at the fuseki status here > > > > when accessing /$/status I am not getting no results on a Fuseki - > version > > 3.8.0 instance with an enabled admin console > > > > curl -u admin:*** http://localhost:3030/$/status > > > > get's me a 404 while I can see the results and stats in the web admin. > -- --- Marco Neumann KONA
Re: fuseki status [get status after ./fuseki-server or java -jar]
On 23/11/2018 08:03, Vincent Ventresque wrote: Hello Andy & Marco Can you explain `curl -u admin:` ? I've just looked at That's curl-speak for setting user and password for HTTP basic authentication. Marco has Fuseki (full, using Shiro) set up with user/password control. All the admin functions start /$/ I get a 404 when I go there : http://jena.apache.org/documentation/fuseki2/admin.html (there's a link to this page here : http://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html) Don't know where that's gone, if it existed. I'll go look. Thanks Andy Thanks in advance, Vincent Le 23/11/2018 à 00:44, Andy Seaborne a écrit : Do you happen to know in which version it last did work? Andy On 22/11/2018 23:23, Marco Neumann wrote: while you are at the fuseki status here when accessing /$/status I am not getting no results on a Fuseki - version 3.8.0 instance with an enabled admin console curl -u admin:*** http://localhost:3030/$/status get's me a 404 while I can see the results and stats in the web admin.
Re: fuseki status [get status after ./fuseki-server or java -jar]
Hello Andy & Marco Can you explain `curl -u admin:` ? I've just looked at I get a 404 when I go there : http://jena.apache.org/documentation/fuseki2/admin.html (there's a link to this page here : http://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html) Thanks in advance, Vincent Le 23/11/2018 à 00:44, Andy Seaborne a écrit : Do you happen to know in which version it last did work? Andy On 22/11/2018 23:23, Marco Neumann wrote: while you are at the fuseki status here when accessing /$/status I am not getting no results on a Fuseki - version 3.8.0 instance with an enabled admin console curl -u admin:*** http://localhost:3030/$/status get's me a 404 while I can see the results and stats in the web admin.
Re: fuseki status [get status after ./fuseki-server or java -jar]
Do you happen to know in which version it last did work? Andy On 22/11/2018 23:23, Marco Neumann wrote: while you are at the fuseki status here when accessing /$/status I am not getting no results on a Fuseki - version 3.8.0 instance with an enabled admin console curl -u admin:*** http://localhost:3030/$/status get's me a 404 while I can see the results and stats in the web admin.
Re: fuseki status [get status after ./fuseki-server or java -jar]
while you are at the fuseki status here when accessing /$/status I am not getting no results on a Fuseki - version 3.8.0 instance with an enabled admin console curl -u admin:*** http://localhost:3030/$/status get's me a 404 while I can see the results and stats in the web admin. On Thu, Nov 22, 2018 at 11:58 AM Andy Seaborne wrote: > Hi Vincent, > > The script "./fuseki" runs Fuseki as an OS service, and it is a wrapper > around "java -jar fuseki-server.jar". It is the script that records the > process id and makes OS tools concerned with OS services know about > Fuseki. If you run the server directly then there isn't a record of the > running service. > > To see if Fuseki is running via "java -jar" or "fuseki-server" then > you'll either have to look for the process or see if the port is in-use > with something like netstat. > > Andy > > On 22/11/2018 09:49, Vincent Ventresque wrote: > > Hello, > > > > I use Fuseki via command-line tools in a PHP project, so I made a small > > 'wrapper' to call ruby & sh scripts via php : it enables to send queries > > and process the results without using a RDF library such as EasyRDF. > > > > I'm currently writing a code for a "sandbox environment" based on the > > php project. In this sandbox, the user should be able to install fuseki, > > load sample data, run queries via a web page (php), and reuse RDF data > > in a small mashup. > > > > I tried to add a function to the wrapper so that the user can check > > fuseki status (running? pid?), but it seems that `./fuseki status` only > > works when fuseki has been started via the same script: > > > > 1) `./fuseki start` : > > > > ./fuseki status returns '[] Fuseki is running with pid: 10373' > > > > 2) `./fuseki-server` or `java -jar fuseki-server.jar` > > > > ./fuseki status returns '[] Fuseki is not running' > > > > Therefore I tried to search for fuseki process via `ps aux`. > > > > Could you tell me if this way is correct or if there's a better solution? > > > > Here is the php code. > > > > > > > > public function fusekiStatus() { > > > > //- search fuseki process > > $cmd = "ps aux|grep fuseki"; > > $process = popen($cmd, "r"); > > $psOutput = stream_get_contents($process); > > pclose($process); > > > > //- analyze ps output -- > > if (preg_match("/java/", $psOutput) == 1) { > > $status = ['running' => TRUE]; > > $msg = "Processus Fuseki ok ('running')."; > > } > > else { > > $status = ['running' => FALSE]; > > $msg = "ATTENTION, aucun processus Fuseki trouvé ('not > > running'?)."; > > } > > > > $status['msg'] = $msg . "`ps aux|grep fuseki` donne > > `$psOutput`"; > > return $status; > > > > } > > > > > > > > > > Thanks in advance > > Vincent > > > -- --- Marco Neumann KONA
Re: fuseki status [get status after ./fuseki-server or java -jar]
Hi Andy, Thanks a lot for the explanation! I'm going to have a look at the script. Anyway, since I'm not able to know how the user started the server, it seems that I have to combine ps and netstat (if netstat provides useful information about the server, it may be interesting to inform the user). Have a nice day Vincent Le 22/11/2018 à 12:58, Andy Seaborne a écrit : Hi Vincent, The script "./fuseki" runs Fuseki as an OS service, and it is a wrapper around "java -jar fuseki-server.jar". It is the script that records the process id and makes OS tools concerned with OS services know about Fuseki. If you run the server directly then there isn't a record of the running service. To see if Fuseki is running via "java -jar" or "fuseki-server" then you'll either have to look for the process or see if the port is in-use with something like netstat. Andy On 22/11/2018 09:49, Vincent Ventresque wrote: Hello, I use Fuseki via command-line tools in a PHP project, so I made a small 'wrapper' to call ruby & sh scripts via php : it enables to send queries and process the results without using a RDF library such as EasyRDF. I'm currently writing a code for a "sandbox environment" based on the php project. In this sandbox, the user should be able to install fuseki, load sample data, run queries via a web page (php), and reuse RDF data in a small mashup. I tried to add a function to the wrapper so that the user can check fuseki status (running? pid?), but it seems that `./fuseki status` only works when fuseki has been started via the same script: 1) `./fuseki start` : ./fuseki status returns '[] Fuseki is running with pid: 10373' 2) `./fuseki-server` or `java -jar fuseki-server.jar` ./fuseki status returns '[] Fuseki is not running' Therefore I tried to search for fuseki process via `ps aux`. Could you tell me if this way is correct or if there's a better solution? Here is the php code. public function fusekiStatus() { //- search fuseki process $cmd = "ps aux|grep fuseki"; $process = popen($cmd, "r"); $psOutput = stream_get_contents($process); pclose($process); //- analyze ps output -- if (preg_match("/java/", $psOutput) == 1) { $status = ['running' => TRUE]; $msg = "Processus Fuseki ok ('running')."; } else { $status = ['running' => FALSE]; $msg = "ATTENTION, aucun processus Fuseki trouvé ('not running'?)."; } $status['msg'] = $msg . "`ps aux|grep fuseki` donne `$psOutput`"; return $status; } Thanks in advance Vincent
Re: fuseki status [get status after ./fuseki-server or java -jar]
Hi Vincent, The script "./fuseki" runs Fuseki as an OS service, and it is a wrapper around "java -jar fuseki-server.jar". It is the script that records the process id and makes OS tools concerned with OS services know about Fuseki. If you run the server directly then there isn't a record of the running service. To see if Fuseki is running via "java -jar" or "fuseki-server" then you'll either have to look for the process or see if the port is in-use with something like netstat. Andy On 22/11/2018 09:49, Vincent Ventresque wrote: Hello, I use Fuseki via command-line tools in a PHP project, so I made a small 'wrapper' to call ruby & sh scripts via php : it enables to send queries and process the results without using a RDF library such as EasyRDF. I'm currently writing a code for a "sandbox environment" based on the php project. In this sandbox, the user should be able to install fuseki, load sample data, run queries via a web page (php), and reuse RDF data in a small mashup. I tried to add a function to the wrapper so that the user can check fuseki status (running? pid?), but it seems that `./fuseki status` only works when fuseki has been started via the same script: 1) `./fuseki start` : ./fuseki status returns '[] Fuseki is running with pid: 10373' 2) `./fuseki-server` or `java -jar fuseki-server.jar` ./fuseki status returns '[] Fuseki is not running' Therefore I tried to search for fuseki process via `ps aux`. Could you tell me if this way is correct or if there's a better solution? Here is the php code. public function fusekiStatus() { //- search fuseki process $cmd = "ps aux|grep fuseki"; $process = popen($cmd, "r"); $psOutput = stream_get_contents($process); pclose($process); //- analyze ps output -- if (preg_match("/java/", $psOutput) == 1) { $status = ['running' => TRUE]; $msg = "Processus Fuseki ok ('running')."; } else { $status = ['running' => FALSE]; $msg = "ATTENTION, aucun processus Fuseki trouvé ('not running'?)."; } $status['msg'] = $msg . "`ps aux|grep fuseki` donne `$psOutput`"; return $status; } Thanks in advance Vincent
fuseki status [get status after ./fuseki-server or java -jar]
Hello, I use Fuseki via command-line tools in a PHP project, so I made a small 'wrapper' to call ruby & sh scripts via php : it enables to send queries and process the results without using a RDF library such as EasyRDF. I'm currently writing a code for a "sandbox environment" based on the php project. In this sandbox, the user should be able to install fuseki, load sample data, run queries via a web page (php), and reuse RDF data in a small mashup. I tried to add a function to the wrapper so that the user can check fuseki status (running? pid?), but it seems that `./fuseki status` only works when fuseki has been started via the same script: 1) `./fuseki start` : ./fuseki status returns '[] Fuseki is running with pid: 10373' 2) `./fuseki-server` or `java -jar fuseki-server.jar` ./fuseki status returns '[] Fuseki is not running' Therefore I tried to search for fuseki process via `ps aux`. Could you tell me if this way is correct or if there's a better solution? Here is the php code. public function fusekiStatus() { //- search fuseki process $cmd = "ps aux|grep fuseki"; $process = popen($cmd, "r"); $psOutput = stream_get_contents($process); pclose($process); //- analyze ps output -- if (preg_match("/java/", $psOutput) == 1) { $status = ['running' => TRUE]; $msg = "Processus Fuseki ok ('running')."; } else { $status = ['running' => FALSE]; $msg = "ATTENTION, aucun processus Fuseki trouvé ('not running'?)."; } $status['msg'] = $msg . "`ps aux|grep fuseki` donne `$psOutput`"; return $status; } Thanks in advance Vincent --