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 <[email protected]> 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 . "<br>`ps aux|grep fuseki` donne > > `$psOutput`<br>"; > > return $status; > > > > } > > > > ---------------------------------------------------- > > > > > > Thanks in advance > > Vincent > > > -- --- Marco Neumann KONA
