Attempting to get Stardog working on an Amazon EC2 instance for both Ubuntu 16.04 and Redhat Linux and encountering the same issue on both.
Steps to Reproduce:
Using Ubuntu 16.04
Installed Java 8 and added as export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_141/
Set export STARDOG_HOME=/data/stardog
Unpacked the stardog-5.0.2.zip into /data/stardog.
Moved the license into /data/stardog.
Set ownership of /data/stardog to user running start command
Using Redhat Linux 7.4
Installed Java 8 and added as export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_141/
Set export STARDOG_HOME=/data/stardog
Unpacked the stardog-5.0.2.zip into /data/stardog.
Moved the license into /data/stardog.
Set ownership of /data/stardog to user running start command
When I attempt to run stardog-admin server start I get the same error in both instances. I am attaching the entire error log as a text file.
There was an error initializing Stardog; one or more dependencies could not be satisfied. Please verify your classpath is correct.
The initialization errors were:
Error in custom provider, java.lang.RuntimeException: Could not load system index: system
com.complexible.stardog.BaseStardogModule.configure(BaseStardogModule.java:132) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
com.complexible.stardog.security.SecurityModule.configure(SecurityModule.java:63) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.security.SecurityModule -> com.google.inject.multibindings.Multibinder$RealMultibinder)
com.complexible.stardog.KernelDatabaseService.()
com.complexible.stardog.BaseStardogModule.getSecurityManager() (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
com.complexible.stardog.plan.eval.service.DefaultServiceRegistry.()
com.complexible.stardog.security.ldap.LDAPRealmFactory.()
com.complexible.stardog.versioning.VersioningModule.configure(VersioningModule.java:31) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.versioning.VersioningModule -> com.google.inject.multibindings.Multibinder$RealMultibinder)
com.complexible.stardog.db.DatabaseFactoryImpl
com.complexible.stardog.plan.eval.service.DefaultServiceRegistry
com.complexible.stardog.StardogKernel
com.complexible.stardog.security.DefaultNamedGraphSecurityManager
com.complexible.stardog.BaseStardogModule.getSystemSecurityManager() (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
com.complexible.stardog.security.SecurityModule.configure(SecurityModule.java:51) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.security.SecurityModule)
com.complexible.stardog.db.DatabaseFactoryImpl.()
com.complexible.stardog.BaseStardogModule.configure(BaseStardogModule.java:133) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
com.complexible.stardog.BaseStardogModule.getSecurityManager()
com.complexible.stardog.security.StardogSecurityManagerImpl
com.complexible.stardog.security.DefaultNamedGraphSecurityManager.()
com.complexible.stardog.StardogKernel.()
com.complexible.stardog.KernelDatabaseService
com.complexible.stardog.security.ldap.LDAPRealmFactory
com.complexible.stardog.BaseStardogModule.getSystemIndex() (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
com.complexible.stardog.security.StardogSecurityManagerImpl.()
Caused by:
java.lang.RuntimeException: Could not load system index: system
at com.complexible.stardog.BaseStardogModule.getSystemIndex(BaseStardogModule.java:372)
at com.complexible.stardog.BaseStardogModule$$FastClassByGuice$$920e5968.invoke()
at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:272)
at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:172)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.complexible.stardog.KernelDatabaseService.(KernelDatabaseService.java:51)
at com.complexible.stardog.KernelDatabaseService$$FastClassByGuice$$b5397140.newInstance()
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:375)
at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:258)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at com.complexible.stardog.Stardog.initKernel(Stardog.java:218)
at com.complexible.stardog.Stardog.(Stardog.java:211)
at com.complexible.stardog.Stardog.(Stardog.java:65)
at com.complexible.stardog.Stardog$StardogBuilder.create(Stardog.java:560)
at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:145)
at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:44)
at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:55)
at com.complexible.stardog.cli.admin.CLI.main(CLI.java:182)
Caused by: java.lang.NullPointerException
at com.complexible.stardog.metadata.Metadata.setAll(Metadata.java:167)
at com.complexible.stardog.BaseStardogModule.getSystemIndex(BaseStardogModule.java:359)
… 77 more
Unable to provision, see the following errors:
Error in custom provider, java.lang.RuntimeException: Could not load system index: system
at com.complexible.stardog.BaseStardogModule.getSystemIndex(BaseStardogModule.java:309) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
at com.complexible.stardog.BaseStardogModule.getSystemIndex(BaseStardogModule.java:309) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
while locating com.complexible.stardog.index.Index annotated with @com.google.inject.name.Named(value=system.index)
at com.complexible.stardog.KernelDatabaseService.(KernelDatabaseService.java:50)
while locating com.complexible.stardog.KernelDatabaseService
at com.complexible.stardog.BaseStardogModule.configure(BaseStardogModule.java:133) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
while locating com.complexible.stardog.plan.eval.service.Service annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=15, type=MULTIBINDER, keyType=)
at com.complexible.stardog.versioning.VersioningModule.configure(VersioningModule.java:31) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.versioning.VersioningModule -> com.google.inject.multibindings.Multibinder$RealMultibinder)
while locating java.util.Set<com.complexible.stardog.plan.eval.service.Service>
for parameter 0 at com.complexible.stardog.plan.eval.service.DefaultServiceRegistry.(DefaultServiceRegistry.java:23)
while locating com.complexible.stardog.plan.eval.service.DefaultServiceRegistry
at com.complexible.stardog.BaseStardogModule.configure(BaseStardogModule.java:132) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
while locating com.complexible.stardog.plan.eval.service.ServiceRegistry
for parameter 6 at com.complexible.stardog.db.DatabaseFactoryImpl.(DatabaseFactoryImpl.java:85)
while locating com.complexible.stardog.db.DatabaseFactoryImpl
while locating com.complexible.stardog.db.DatabaseFactory
for parameter 0 at com.complexible.stardog.StardogKernel.(StardogKernel.java:242)
at com.complexible.stardog.StardogKernel.class(StardogKernel.java:242)
while locating com.complexible.stardog.StardogKernel
while locating com.complexible.stardog.Kernel
Caused by: java.lang.RuntimeException: Could not load system index: system
at com.complexible.stardog.BaseStardogModule.getSystemIndex(BaseStardogModule.java:372)
at com.complexible.stardog.BaseStardogModule$$FastClassByGuice$$920e5968.invoke()
at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:272)
at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:172)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.complexible.stardog.KernelDatabaseService.(KernelDatabaseService.java:51)
at com.complexible.stardog.KernelDatabaseService$$FastClassByGuice$$b5397140.newInstance()
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:375)
at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:258)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at com.complexible.stardog.Stardog.initKernel(Stardog.java:218)
at com.complexible.stardog.Stardog.(Stardog.java:211)
at com.complexible.stardog.Stardog.(Stardog.java:65)
at com.complexible.stardog.Stardog$StardogBuilder.create(Stardog.java:560)
at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:145)
at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:44)
at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:55)
at com.complexible.stardog.cli.admin.CLI.main(CLI.java:182)
Caused by: java.lang.NullPointerException
at com.complexible.stardog.metadata.Metadata.setAll(Metadata.java:167)
at com.complexible.stardog.BaseStardogModule.getSystemIndex(BaseStardogModule.java:359)
… 77 more
This is most likely because you are trying to run Stardog on a machine with less memory than Stardog is setup to use by default. The default memory allocation for Stardog is a 2Gb heap and 1Gb offheap and can be changed by setting the following environment variable.