[ 
https://issues.apache.org/jira/browse/JENA-612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14258378#comment-14258378
 ] 

ASF GitHub Bot commented on JENA-612:
-------------------------------------

GitHub user kinow opened a pull request:

    https://github.com/apache/jena/pull/13

    JENA-612 log output of Fuseki service init to file

    This pull request is related to 
[JENA-612](https://issues.apache.org/jira/browse/JENA-612). This is a patch to 
log the Fuseki service init output and err to the stderrout.log, so that errors 
such as mentioned in the issue won't happen silently. 
    
    Applied to Fusekiv1 and Fusekiv2.
    
    Hope that helps,
    Thank you.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kinow/jena JENA-612

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jena/pull/13.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13
    
----
commit 4b5f45f01f4acdce689b2ddd6155288ec81f3323
Author: Bruno P. Kinoshita <brunodepau...@yahoo.com.br>
Date:   2014-12-24T17:04:00Z

    JENA-612 log output of Fuseki service init to file

----


> Fuseki does not log an error when failing to open a TDB dataset
> ---------------------------------------------------------------
>
>                 Key: JENA-612
>                 URL: https://issues.apache.org/jira/browse/JENA-612
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: Fuseki
>    Affects Versions: Fuseki 1.0.0
>            Reporter: Ian Dickinson
>            Priority: Minor
>
> Steps to recreate:
> 1. Create a TDB dataset owned by user A, with no write permission for other 
> or group.
> 2. Start fuseki via start-stop-daemon, per the fuseki init.d script provided 
> in the distribution, with $FUSEKI_USER set to be a user other than A and 
> --loc pointing to the dataset from step 1.
> 3. Fuseki starts, but then silently dies with no diagnostic.
> Analysis
> The --background flag in the start-stop-daemon call causes all stdout and 
> stderr output to get silently swallowed. Fuseki does not log the failure to 
> open the dataset to the log file, so the effect is that the daemon process 
> terminates with no obvious explanation or diagnostic.
> What I would like to happen:
> Catch the FileException and make an entry in the Fuseki log.
> Stack trace for reference:
> com.hp.hpl.jena.tdb.base.file.FileException: Failed to open: 
> /var/data-stores/transport/tdb/node2id.idn (mode=rw)
>       at 
> com.hp.hpl.jena.tdb.base.file.ChannelManager.open$(ChannelManager.java:82)
>       at 
> com.hp.hpl.jena.tdb.base.file.ChannelManager.openref$(ChannelManager.java:56)
>       at 
> com.hp.hpl.jena.tdb.base.file.ChannelManager.acquire(ChannelManager.java:45)
>       at com.hp.hpl.jena.tdb.base.file.FileBase.<init>(FileBase.java:61)
>       at com.hp.hpl.jena.tdb.base.file.FileBase.<init>(FileBase.java:50)
>       at com.hp.hpl.jena.tdb.base.file.FileBase.create(FileBase.java:45)
>       at 
> com.hp.hpl.jena.tdb.base.file.BlockAccessBase.<init>(BlockAccessBase.java:46)
>       at 
> com.hp.hpl.jena.tdb.base.file.BlockAccessMapped.<init>(BlockAccessMapped.java:63)
>       at 
> com.hp.hpl.jena.tdb.base.block.BlockMgrFactory.createMMapFile(BlockMgrFactory.java:90)
>       at 
> com.hp.hpl.jena.tdb.base.block.BlockMgrFactory.createFile(BlockMgrFactory.java:80)
>       at 
> com.hp.hpl.jena.tdb.base.block.BlockMgrFactory.create(BlockMgrFactory.java:58)
>       at 
> com.hp.hpl.jena.tdb.setup.Builder$BlockMgrBuilderStd.buildBlockMgr(Builder.java:196)
>       at 
> com.hp.hpl.jena.tdb.setup.Builder$RangeIndexBuilderStd.createBPTree(Builder.java:165)
>       at 
> com.hp.hpl.jena.tdb.setup.Builder$RangeIndexBuilderStd.buildRangeIndex(Builder.java:134)
>       at 
> com.hp.hpl.jena.tdb.setup.Builder$IndexBuilderStd.buildIndex(Builder.java:112)
>       at 
> com.hp.hpl.jena.tdb.setup.Builder$NodeTableBuilderStd.buildNodeTable(Builder.java:85)
>       at 
> com.hp.hpl.jena.tdb.setup.DatasetBuilderStd$NodeTableBuilderRecorder.buildNodeTable(DatasetBuilderStd.java:382)
>       at 
> com.hp.hpl.jena.tdb.setup.DatasetBuilderStd.makeNodeTable(DatasetBuilderStd.java:293)
>       at 
> com.hp.hpl.jena.tdb.setup.DatasetBuilderStd._build(DatasetBuilderStd.java:159)
>       at 
> com.hp.hpl.jena.tdb.setup.DatasetBuilderStd.build(DatasetBuilderStd.java:149)
>       at 
> com.hp.hpl.jena.tdb.setup.DatasetBuilderStd.build(DatasetBuilderStd.java:64)
>       at com.hp.hpl.jena.tdb.StoreConnection.make(StoreConnection.java:217)
>       at 
> com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction.<init>(DatasetGraphTransaction.java:75)
>       at com.hp.hpl.jena.tdb.sys.TDBMaker._create(TDBMaker.java:57)
>       at 
> com.hp.hpl.jena.tdb.sys.TDBMaker.createDatasetGraphTransaction(TDBMaker.java:45)
>       at 
> com.hp.hpl.jena.tdb.TDBFactory._createDatasetGraph(TDBFactory.java:104)
>       at com.hp.hpl.jena.tdb.TDBFactory.createDatasetGraph(TDBFactory.java:73)
>       at com.hp.hpl.jena.tdb.TDBFactory.createDatasetGraph(TDBFactory.java:69)
>       at 
> org.apache.jena.fuseki.FusekiCmd.processModulesAndArgs(FusekiCmd.java:266)
>       at arq.cmdline.CmdArgModule.process(CmdArgModule.java:51)
>       at arq.cmdline.CmdMain.mainMethod(CmdMain.java:100)
>       at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
>       at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
>       at org.apache.jena.fuseki.FusekiCmd.main(FusekiCmd.java:141)
> Caused by: java.io.FileNotFoundException: 
> /var/data-stores/transport/tdb/node2id.idn (Permission denied)
>       at java.io.RandomAccessFile.open(Native Method)
>       at java.io.RandomAccessFile.<init>(RandomAccessFile.java:233)
>       at java.io.RandomAccessFile.<init>(RandomAccessFile.java:118)
>       at 
> com.hp.hpl.jena.tdb.base.file.ChannelManager.open$(ChannelManager.java:79)
>       ... 33 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to