Spatial index problem crashes server without recovery option

We have run into a issue where enabling a spatial index on a database causes the server to crash, restarting the server causes a immediate crash again.

ERROR 2017-07-26 11:24:37,547 [Stardog.Executor-0]  com.complexible.stardog.spatial.io.RDFGeospatialSource:lambda$parse$19(142): Failed to parse unknown/malformed shape: <http://www.opengis.net/def/crs/EPSG/0/28992> POINT(132569 517118)

I’ve tried moving the database directory outside the stardog data directory, the server complains about a missing database and stops as well.

WARN  2017-07-26 11:28:02,233 [main] com.complexible.stardog.db.DatabaseFactoryImpl:read(141): Database inspire is invalid and the repair failed: File (/home/stardog/data/inspire) is not a directory, could not find an index at this location
INFO  2017-07-26 11:28:02,234 [main] com.complexible.stardog.StardogKernel:initDatabases(2263): Database inspire will not be available because there was an error initializing the database: The index directory does not exist
ERROR 2017-07-26 11:28:02,986 [main] com.complexible.stardog.Stardog:initKernel(224): There was an error during kernel init
com.complexible.stardog.security.ResourceNotFoundException: Permission does not exist.
        at com.complexible.stardog.security.index.IndexAuthorizationManager.assertExists(IndexAuthorizationManager.java:203) ~[stardog-core-security-5.0.jar:?]
        at com.complexible.stardog.security.index.IndexAuthorizationManager.delete(IndexAuthorizationManager.java:312) ~[stardog-core-security-5.0.jar:?]
        at com.complexible.stardog.security.impl.SystemSecurityManagerImpl.delete(SystemSecurityManagerImpl.java:389) ~[stardog-core-security-5.0.jar:?]
        at com.complexible.stardog.security.index.IndexBackedSystemSecurityManager.delete(IndexBackedSystemSecurityManager.java:205) ~[stardog-core-security-5.0.jar:?]
        at com.complexible.stardog.security.StardogSecurityManagerImpl.delete(StardogSecurityManagerImpl.java:638) ~[stardog-5.0.jar:?]
        at com.complexible.stardog.security.StardogSecurityManagerImpl.deleteUserPerm(StardogSecurityManagerImpl.java:123) ~[stardog-5.0.jar:?]
        at com.complexible.stardog.StardogKernel.lambda$dbPermissions$20(StardogKernel.java:1992) ~[stardog-5.0.jar:?]
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) ~[shiro-core-1.2.3.jar:1.2.3]
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) ~[shiro-core-1.2.3.jar:1.2.3]
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) ~[shiro-core-1.2.3.jar:1.2.3]
        at com.complexible.stardog.StardogKernel.dbPermissions(StardogKernel.java:1987) ~[stardog-5.0.jar:?]
        at com.complexible.stardog.StardogKernel.handleUnusableIndex(StardogKernel.java:2311) ~[stardog-5.0.jar:?]
        at com.complexible.stardog.StardogKernel.initDatabases(StardogKernel.java:2272) ~[stardog-5.0.jar:?]
        at com.complexible.stardog.StardogKernel.start(StardogKernel.java:2199) ~[stardog-5.0.jar:?]
        at com.complexible.stardog.StardogKernel.initialize(StardogKernel.java:739) ~[stardog-5.0.jar:?]
        at com.complexible.stardog.Stardog.initKernel(Stardog.java:219) [stardog-5.0.jar:?]
        at com.complexible.stardog.Stardog.<init>(Stardog.java:211) [stardog-5.0.jar:?]
        at com.complexible.stardog.Stardog.<init>(Stardog.java:65) [stardog-5.0.jar:?]
        at com.complexible.stardog.Stardog$StardogBuilder.create(Stardog.java:560) [stardog-5.0.jar:?]
        at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:145) [stardog-cli-5.0.jar:?]
        at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:44) [stardog-cli-5.0.jar:?]
        at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:55) [stardog-cli-5.0.jar:?]
        at com.complexible.stardog.cli.admin.CLI.main(CLI.java:182) [stardog-cli-5.0.jar:?]
Stardog could not be initialized: Permission does not exist.
Permission does not exist.
Waiting for running tasks to complete....done. Executor service has been shut down.

Can I disable the spatial index from command line ?

Any help greatly appreciated!

Bart

You should be able to disable the spatial index from the command line but it requires that Stardog to be running so that you can take the database offline. I don’t know when it’s crashing during startup but you might be able to Start Stardog and take the db offline in a single command so hopeefully it gets taken offline before it reaches the point where it crashes.

stardog-admin server start && stardog-admin db offline --timeout 0 myDb

then disable the index

stardog-admin metadata set -o spatial.enabled=false -- myDb

I’m sure the Stardog folks would be very interested to see what’s in the logs during the parse error.

You are very correct about that!

@semanticfire You can move the database directory outside of your STARDOG_HOME, just create an empty directory to replace it and you can avoid the server complaints.

Hi Bart,

Can you share with us the stack trace of how Stardog is crashing and unable to restart?
Is it related to that Failed to parse unknown/malformed shape error log?

where can I send you the logfile ?

Send it to my email: pedro@stardog.com
Thanks!

done

BTW, it is still 5.0 I haven’t had the time to test 5.0.1 due to travel and holidays