I'm trying to use Vaadin-CDI 11.0.0.rc1 with Karaf 4.2.5 . When trying to install the bundle directly, it throws me an error :
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle mvn:com.vaadin/vaadin-cdi/11.0.0.rc1:
org.osgi.framework.BundleException: OSGi R3 bundle not supported
And when I try installing it from a feature.xml inside my-project I get a different error :
karaf#root()> feature:install com.my-project.feature
org.apache.karaf.features.internal.util.MultiException: Error:
Unable to create resource for bundle mvn:com.vaadin/vaadin-cdi/11.0.0.rc1
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:91)
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:457)
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:452)
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:224)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1058)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:994)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Suppressed: java.lang.Exception: Unable to create resource for bundle mvn:com.vaadin/vaadin-cdi/11.0.0.rc1
at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:824)
at org.apache.karaf.features.internal.region.Subsystem.lambda$downloadBundles$1(Subsystem.java:499)
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.lambda$download$0(MavenDownloadManager.java:138)
at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:350)
at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListeners(DefaultFuture.java:335)
at org.apache.karaf.features.internal.download.impl.DefaultFuture.setValue(DefaultFuture.java:259)
at org.apache.karaf.features.internal.download.impl.AbstractDownloadTask.setFile(AbstractDownloadTask.java:61)
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:61)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
... 3 more
Caused by: org.osgi.framework.BundleException: Unable to build resource for mvn:com.vaadin/vaadin-cdi/11.0.0.rc1: Unsupported 'Bundle-ManifestVersion' value: 1
at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:82)
at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:71)
at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:822)
... 13 more
Caused by: org.osgi.framework.BundleException: Unsupported 'Bundle-ManifestVersion' value: 1
at org.apache.felix.utils.resource.ResourceBuilder.doBuild(ResourceBuilder.java:90)
at org.apache.felix.utils.resource.ResourceBuilder.build(ResourceBuilder.java:80)
... 15 more
Error executing command: Error:
Unable to create resource for bundle mvn:com.vaadin/vaadin-cdi/11.0.0.rc1
So I headed to the MANIFEST.MF of Vaadin-CDI and discovered that there is no Bundle-ManifestVersion inside it.
Is it normal ? If not, how do I fix it ?
EDIT :
I tried cloning vaadin-cdi in my project and then I replaced VaadinServlet with CdiVaadinServlet, the build goes smoothly, and when I install it in Karaf there's no problem until I go in the logs in which I see there's a NullPointerException :
java.lang.NullPointerException: null
at com.project.pax.vaadin.cdi.BeanLookup.lookupOrElseGet(BeanLookup.java:87) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.cdi.BeanLookup.lookup(BeanLookup.java:105) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.cdi.CdiVaadinServletService.lookup(CdiVaadinServletService.java:170) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.cdi.CdiVaadinServletService.init(CdiVaadinServletService.java:123) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.cdi.CdiVaadinServlet.createServletService(CdiVaadinServlet.java:91) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.vaadin.flow.server.VaadinServlet.createServletService(VaadinServlet.java:186) ~[65:com.vaadin.flow.server:2.0.0.rc2]
at com.vaadin.flow.server.VaadinServlet.init(VaadinServlet.java:73) ~[65:com.vaadin.flow.server:2.0.0.rc2]
at com.project.pax.vaadin.cdi.CdiVaadinServlet.init(CdiVaadinServlet.java:54) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at com.project.pax.vaadin.osgi.VaadinServletRegistration$FixedVaadinServlet.init(VaadinServletRegistration.java:31) ~[49:com.project.pax.vaadin:0.1.0.SNAPSHOT]
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:670) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:427) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:414) ~[145:org.ops4j.pax.web.pax-web-jetty:7.2.8]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847) ~[118:org.eclipse.jetty.server:9.4.12.v20180830]
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287) ~[119:org.eclipse.jetty.servlet:9.4.12.v20180830]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:267) ~[145:org.ops4j.pax.web.pax-web-jetty:7.2.8]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[121:org.eclipse.jetty.util:9.4.12.v20180830]
at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:329) ~[145:org.ops4j.pax.web.pax-web-jetty:7.2.8]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:252) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:392) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:504) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:102) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElements(WebApplication.java:371) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerHttpContext(WebApplication.java:283) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:232) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:68) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService.bind(ReplaceableService.java:86) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService$Customizer.addingService(ReplaceableService.java:105) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:426) ~[?:?]
at org.ops4j.pax.web.service.internal.Activator.lambda$scheduleUpdateFactory$1(Activator.java:344) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
15:16:57.159 ERROR [paxweb-config-1-thread-1] Could not start the servlet context for context path []
javax.servlet.ServletException: org.ops4j.pax.web.service.spi.model.ServletModel-2#378be0fa==com.project.pax.vaadin.osgi.VaadinServletRegistration$FixedVaadinServlet,jsp=null,order=-1,inst=false
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:691) ~[?:?]
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:427) ~[?:?]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760) ~[?:?]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:414) ~[?:?]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847) ~[?:?]
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:267) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:329) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:252) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:392) ~[?:?]
at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:504) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:102) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElements(WebApplication.java:371) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerHttpContext(WebApplication.java:283) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:232) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:68) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService.bind(ReplaceableService.java:86) ~[?:?]
at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService$Customizer.addingService(ReplaceableService.java:105) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) ~[?:?]
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[?:?]
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[?:?]
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) ~[?:?]
at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?]
at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?]
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595) ~[?:?]
at org.apache.felix.framework.Felix.registerService(Felix.java:3587) ~[?:?]
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348) ~[?:?]
at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:426) ~[?:?]
at org.ops4j.pax.web.service.internal.Activator.lambda$scheduleUpdateFactory$1(Activator.java:344) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
at com.project.pax.vaadin.cdi.BeanLookup.lookupOrElseGet(BeanLookup.java:87) ~[?:?]
at com.project.pax.vaadin.cdi.BeanLookup.lookup(BeanLookup.java:105) ~[?:?]
at com.project.pax.vaadin.cdi.CdiVaadinServletService.lookup(CdiVaadinServletService.java:170) ~[?:?]
at com.project.pax.vaadin.cdi.CdiVaadinServletService.init(CdiVaadinServletService.java:123) ~[?:?]
at com.project.pax.vaadin.cdi.CdiVaadinServlet.createServletService(CdiVaadinServlet.java:91) ~[?:?]
at com.vaadin.flow.server.VaadinServlet.createServletService(VaadinServlet.java:186) ~[?:?]
at com.vaadin.flow.server.VaadinServlet.init(VaadinServlet.java:73) ~[?:?]
at com.project.pax.vaadin.cdi.CdiVaadinServlet.init(CdiVaadinServlet.java:54) ~[?:?]
at com.project.pax.vaadin.osgi.VaadinServletRegistration$FixedVaadinServlet.init(VaadinServletRegistration.java:31) ~[?:?]
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:670) ~[?:?]
... 38 more
It seems to be related to the context-path but I'm not sure what file I should modify or add to handle that.
Related
My VPS was upgraded to change to a different type of SSD last night, however I did not take a backup of the database prior to the shut down and restart.
After this point in time I have been unable to restart the database. The error log begins to show a failure when attempting to open a specific index as shown below.
I have attempted to bypass this index by renaming the directory it is stored in but this was not effective. Is there any other way of removing the offending index so that I can restart the database in the browser and then re-add the index later?
[neo4j/21dafb04] [ Store versions ]
[neo4j/21dafb04] --------------------------------------------------------------------------------
[neo4j/21dafb04] ArrayPropertyStore[neostore.nodestore.db.labels] AF4.3.0
[neo4j/21dafb04] NodeStore[neostore.nodestore.db] AF4.3.0
[neo4j/21dafb04] StringPropertyStore[neostore.propertystore.db.index.keys] AF4.3.0
[neo4j/21dafb04] PropertyIndexStore[neostore.propertystore.db.index] AF4.3.0
[neo4j/21dafb04] StringPropertyStore[neostore.propertystore.db.strings] AF4.3.0
[neo4j/21dafb04] ArrayPropertyStore[neostore.propertystore.db.arrays] AF4.3.0
[neo4j/21dafb04] PropertyStore[neostore.propertystore.db] AF4.3.0
[neo4j/21dafb04] RelationshipStore[neostore.relationshipstore.db] AF4.3.0
[neo4j/21dafb04] StringPropertyStore[neostore.relationshiptypestore.db.names] AF4.3.0
[neo4j/21dafb04] RelationshipTypeStore[neostore.relationshiptypestore.db] AF4.3.0
[neo4j/21dafb04] StringPropertyStore[neostore.labeltokenstore.db.names] AF4.3.0
[neo4j/21dafb04] LabelTokenStore[neostore.labeltokenstore.db] AF4.3.0
[neo4j/21dafb04] SchemaStore[neostore.schemastore.db] AF4.3.0
[neo4j/21dafb04] RelationshipGroupStore[neostore.relationshipgroupstore.db] AF4.3.0
[neo4j/21dafb04] NeoStore[neostore] AF4.3.0
[neo4j/21dafb04]
2022-01-24 14:34:34.901+0000 WARN [o.n.k.i.i.s.GenericNativeIndexProvider] [neo4j/21dafb04] Failed to open index:13. Requesting re-population. Cause: /var/lib/neo4j/data/databases/neo4j/schema/index/native-btree-1.0/13/index-13: /var/lib/neo4j/data/databases/neo4j/schema/index/native-btree-1.0/13/index-13 | GBPTree[file:/var/lib/neo4j/data/databases/neo4j/schema/index/native-btree-1.0/13/index-13]
2022-01-24 14:34:34.903+0000 INFO [o.n.k.i.a.i.IndexingService] [neo4j/21dafb04] IndexingService.init: index 13 on (:Role {roleId}) is POPULATING
2022-01-24 14:34:34.903+0000 INFO [o.n.k.i.a.i.IndexingService] [neo4j/21dafb04] IndexingService.init: indexes not specifically mentioned above are ONLINE
2022-01-24 14:34:34.904+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] [neo4j/21dafb04] Requirement `Database unavailable` makes database neo4j unavailable.
2022-01-24 14:34:34.905+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] [neo4j/21dafb04] DatabaseId{21dafb04[neo4j]} is unavailable.
2022-01-24 14:34:35.045+0000 WARN [o.n.k.d.Database] [neo4j/21dafb04] Exception occurred while starting the database. Trying to stop already started components.
org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.log.files.TransactionLogFile#74aaf34e' was successfully initialized, but failed to start. Please see the attached cause exception "/var/lib/neo4j/data/transactions/neo4j/neostore.transaction.db.7".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogFiles.start(TransactionLogFiles.java:66) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.database.Database.start(Database.java:514) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:197) ~[neo4j-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:153) ~[neo4j-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.DefaultDatabaseManager.initialiseDefaultDatabase(DefaultDatabaseManager.java:64) ~[neo4j-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.DefaultDatabaseInitializer.start0(DefaultDatabaseInitializer.java:39) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.SafeLifecycle.transition(SafeLifecycle.java:124) [neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.SafeLifecycle.start(SafeLifecycle.java:138) [neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) [neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) [neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:181) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:142) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:95) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:34) [neo4j-4.4.0.jar:4.4.0]
Caused by: java.nio.file.AccessDeniedException: /var/lib/neo4j/data/transactions/neo4j/neostore.transaction.db.7
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182) ~[?:?]
at java.nio.channels.FileChannel.open(FileChannel.java:292) ~[?:?]
at org.neo4j.io.fs.DefaultFileSystemAbstraction.open(DefaultFileSystemAbstraction.java:76) ~[neo4j-io-4.4.0.jar:4.4.0]
at org.neo4j.io.fs.DefaultFileSystemAbstraction.write(DefaultFileSystemAbstraction.java:107) ~[neo4j-io-4.4.0.jar:4.4.0]
at org.neo4j.io.fs.DefaultFileSystemAbstraction.write(DefaultFileSystemAbstraction.java:58) ~[neo4j-io-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogChannelAllocator.allocateFile(TransactionLogChannelAllocator.java:151) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogChannelAllocator.createLogChannel(TransactionLogChannelAllocator.java:64) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogFile.createLogChannelForVersion(TransactionLogFile.java:186) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogFile.start(TransactionLogFile.java:140) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.4.0.jar:4.4.0]
... 19 more
2022-01-24 14:34:35.051+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] [neo4j/21dafb04] Checkpoint triggered by "Database shutdown" # txId: 719312 checkpoint started...
2022-01-24 14:34:35.085+0000 WARN [o.n.k.i.t.l.c.DetachedCheckpointAppender] [neo4j/21dafb04] Checkpoint was attempted while appender is not started. No checkpoint record will be appended.
2022-01-24 14:34:35.087+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] [neo4j/21dafb04] Checkpoint triggered by "Database shutdown" # txId: 719312 checkpoint completed in 33ms
2022-01-24 14:34:35.093+0000 INFO [o.n.k.i.t.l.p.LogPruningImpl] [neo4j/21dafb04] No log version pruned. The strategy used was '1 days'.
2022-01-24 14:34:35.115+0000 ERROR [o.n.d.d.DefaultDatabaseManager] Failed to start DatabaseId{21dafb04[neo4j]}
org.neo4j.dbms.api.DatabaseManagementException: An error occurred! Unable to start `DatabaseId{21dafb04[neo4j]}`.
at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:201) ~[neo4j-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:153) ~[neo4j-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.DefaultDatabaseManager.initialiseDefaultDatabase(DefaultDatabaseManager.java:64) ~[neo4j-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.DefaultDatabaseInitializer.start0(DefaultDatabaseInitializer.java:39) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.SafeLifecycle.transition(SafeLifecycle.java:124) [neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.SafeLifecycle.start(SafeLifecycle.java:138) [neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) [neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) [neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:181) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:142) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:95) [neo4j-4.4.0.jar:4.4.0]
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:34) [neo4j-4.4.0.jar:4.4.0]
Caused by: java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.log.files.TransactionLogFile#74aaf34e' was successfully initialized, but failed to start. Please see the attached cause exception "/var/lib/neo4j/data/transactions/neo4j/neostore.transaction.db.7".
at org.neo4j.kernel.database.Database.handleStartupFailure(Database.java:638) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.database.Database.start(Database.java:532) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:197) ~[neo4j-4.4.0.jar:4.4.0]
... 13 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.log.files.TransactionLogFile#74aaf34e' was successfully initialized, but failed to start. Please see the attached cause exception "/var/lib/neo4j/data/transactions/neo4j/neostore.transaction.db.7".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogFiles.start(TransactionLogFiles.java:66) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.database.Database.start(Database.java:514) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:197) ~[neo4j-4.4.0.jar:4.4.0]
... 13 more
Caused by: java.nio.file.AccessDeniedException: /var/lib/neo4j/data/transactions/neo4j/neostore.transaction.db.7
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182) ~[?:?]
at java.nio.channels.FileChannel.open(FileChannel.java:292) ~[?:?]
at org.neo4j.io.fs.DefaultFileSystemAbstraction.open(DefaultFileSystemAbstraction.java:76) ~[neo4j-io-4.4.0.jar:4.4.0]
at org.neo4j.io.fs.DefaultFileSystemAbstraction.write(DefaultFileSystemAbstraction.java:107) ~[neo4j-io-4.4.0.jar:4.4.0]
at org.neo4j.io.fs.DefaultFileSystemAbstraction.write(DefaultFileSystemAbstraction.java:58) ~[neo4j-io-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogChannelAllocator.allocateFile(TransactionLogChannelAllocator.java:151) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogChannelAllocator.createLogChannel(TransactionLogChannelAllocator.java:64) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogFile.createLogChannelForVersion(TransactionLogFile.java:186) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogFile.start(TransactionLogFile.java:140) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.impl.transaction.log.files.TransactionLogFiles.start(TransactionLogFiles.java:66) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
at org.neo4j.kernel.database.Database.start(Database.java:514) ~[neo4j-kernel-4.4.0.jar:4.4.0]
at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:197) ~[neo4j-4.4.0.jar:4.4.0]
... 13 more
2022-01-24 14:34:35.186+0000 INFO [o.n.b.BoltServer] Bolt enabled on [0:0:0:0:0:0:0:0%0]:7687.
2022-01-24 14:34:35.187+0000 INFO [o.n.s.AbstractNeoWebServer$ServerComponentsLifecycleAdapter] Starting web server
2022-01-24 14:34:36.091+0000 INFO [o.n.s.CommunityNeoWebServer] Remote interface available at http://localhost:7474/
2022-01-24 14:34:36.091+0000 INFO [o.n.s.AbstractNeoWebServer$ServerComponentsLifecycleAdapter] Web server started.
2022-01-24 14:34:36.095+0000 INFO [o.n.g.f.DatabaseManagementServiceFactory] id: E5F568A8DED63307B74CB58935A9D6A6E1F7EADD2CF22433E0040FED4ECBEC2E
2022-01-24 14:34:36.095+0000 INFO [o.n.g.f.DatabaseManagementServiceFactory] name: system
2022-01-24 14:34:36.095+0000 INFO [o.n.g.f.DatabaseManagementServiceFactory] creationDate: 2021-03-12T13:08:07.119Z
I have run the following:
sudo neo4j-admin check-consistency --database=neo4j --check-indexes=true
and can see the indexes appear fine (if this is what is being checked?)
Selecting JVM - Version:11.0.13+8-Ubuntu-0ubuntu1.20.04, Name:OpenJDK 64-Bit Server VM, Vendor:Ubuntu
2022-01-24 22:17:20.020+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Selected RecordFormat:PageAlignedV4_3[AF4.3.0] record format from store /var/lib/neo4j/data/databases/neo4j
2022-01-24 22:17:20.022+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Format not configured for store /var/lib/neo4j/data/databases/neo4j. Selected format from the store files: RecordFormat:PageAlignedV4_3[AF4.3.0]
Index structure consistency check
.................... 10%
.................... 20%
.................... 30%
.................... 40%
.................... 50%
.................... 60%
.................... 70%
.................... 80%
.................... 90%
.................... 100%
Consistency check
.................... 10%
.................... 20%
.................... 30%
.................... 40%
.................... 50%
.................... 60%
.................... 70%
.................... 80%
.................... 90%
.................... 100%
Answer found here:
https://community.neo4j.com/t/database-offline-and-will-not-restart/27914/5
The index issue seems to have disappeared as part of this solution. For some reason the neo4j system account no longer had access to write to the log files or anything else in the data folder. This was resolved using:
sudo chown neo4j -R /var/lib/neo4j/data/
I'm trying to install jena (as a requirement of Islandora), running Karaf 4.2.11, however when I run the command to install, /opt/karaf/bin/client feature:install jena, an error is returned. I got the full text of the error, located below, from the Karaf log.
2021-09-14T11:10:00,610 | ERROR | Thread-57 | ShellUtil | 38 - org.apache.karaf.shell.core - 4.2.11 | Exception caught while executing command
org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=jena; type=karaf.feature; version="[4.1.0,4.1.0]"; filter:="(&(osgi.identity=jena)(type=karaf.feature)(version>=4.1.0)(version<=4.1.0))" [caused by: Unable to resolve jena/4.1.0: missing requirement [jena/4.1.0] osgi.identity; osgi.identity=org.apache.jena.osgi; type=osgi.bundle; version="[4.1.0,4.1.0]"; resolution:=mandatory [caused by: Unable to resolve org.apache.jena.osgi/4.1.0: missing requirement [org.apache.jena.osgi/4.1.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"]]
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392) ~[?:?]
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378) ~[?:?]
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332) ~[?:?]
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257) ~[?:?]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:401) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1063) ~[?:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_292]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve jena/4.1.0: missing requirement [jena/4.1.0] osgi.identity; osgi.identity=org.apache.jena.osgi; type=osgi.bundle; version="[4.1.0,4.1.0]"; resolution:=mandatory [caused by: Unable to resolve org.apache.jena.osgi/4.1.0: missing requirement [org.apache.jena.osgi/4.1.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"]
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
... 12 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.apache.jena.osgi/4.1.0: missing requirement [org.apache.jena.osgi/4.1.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
... 12 more
I've not used Karaf before, but I've looked through a lot of issues and can't seem to decipher the error, though I think it has to do with the Java version? I'm running version 11.0.11 of openJDK. It seems to me like that's the version it's asking for, though. Is there some configuration I'm missing?
I'm happy to supply any other troubleshooting info, I just can't find where to go from here, not having worked with Karaf before.
The issue here is that Karaf is being run with Java 8. You can see evidence of that in the line:
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
(The execution environment is Java 1.8.0_292)
Jena 4.x requires Java 11+
In order to use Java 11, be sure to set the JAVA_HOME environment value to point to the correct installation. On linux-based environments, this can often be handled with the update-alternatives --config java command
So I'm not really sure what happened. Yesterday I was running my logstash instance locally using docker and had no issues.
Now all of my docker containers are running into this same error message when I try to run it. I can confirm that yesterday this was not an issue whatsoever:
/usr/share/logstash/logstash-core-plugin-api/lib/logstash-core-plugin-api/version.rb:22: warning: The Psych YAML extension failed to load.
Check your env for conflicting versions of SnakeYAML
See https://github.com/jruby/jruby/wiki/FAQs#why-does-the-psych-yaml-extension-fail-to-load-in-my-environment
[FATAL] 2021-08-10 14:41:28.832 [main] Logstash - Logstash stopped processing because of an error: (GemspecError)
[!] There was an error while loading `logstash-core-plugin-api.gemspec`: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.
# from /usr/share/logstash/logstash-core-plugin-api/logstash-core-plugin-api.gemspec:23
# -------------------------------------------
#
> require "logstash-core-plugin-api/version"
#
# -------------------------------------------
org.jruby.exceptions.StandardError: (GemspecError)
[!] There was an error while loading `logstash-core-plugin-api.gemspec`: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.
# from /usr/share/logstash/logstash-core-plugin-api/logstash-core-plugin-api.gemspec:23
# -------------------------------------------
#
> require "logstash-core-plugin-api/version"
#
# -------------------------------------------
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.eval_gemspec(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:530) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.load_gemspec_uncached(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:459) ~[?:?]
at org.jruby.RubyDir.chdir(org/jruby/RubyDir.java:439) ~[jruby-complete-9.2.13.0.jar:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.shared_helpers.chdir(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:65) ~[?:?]
at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.monitor.mon_synchronize(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:235) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.shared_helpers.chdir(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:64) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.load_gemspec_uncached(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:458) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.load_gemspec(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:444) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.load_gemspec(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:151) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.load_spec_files(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:166) ~[?:?]
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1809) ~[jruby-complete-9.2.13.0.jar:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.load_spec_files(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:165) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.local_specs(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:100) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.source.path.specs(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/source/path.rb:108) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.specs_for_source_changed?(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:594) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.specs_changed?(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:579) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.converge_paths(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:623) ~[?:?]
at org.jruby.RubyArray.any?(org/jruby/RubyArray.java:4493) ~[jruby-complete-9.2.13.0.jar:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.converge_paths(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:622) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.initialize(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:119) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.dsl.to_definition(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/dsl.rb:234) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.dsl.evaluate(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/dsl.rb:13) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition.build(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:34) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.definition(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:135) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_1_dot_17_dot_3.lib.bundler.setup(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:101) ~[?:?]
at usr.share.logstash.lib.bootstrap.bundler.setup!(/usr/share/logstash/lib/bootstrap/bundler.rb:77) ~[?:?]
at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:84) ~[?:?]
I haven't changed any code for this to happen so I'm really confused.
Any reason for this? Or at the very least how can I remove this error as it is blocking me from debugging our project.
Thanks
So I found out the reason. I haven't been pruning my old docker images and it was adding up every time I built.
A simple command: docker image prune cleared the old images and everything worked again
I might need to change the title to refer to pax logging.
Phenomenon observed:
log entry
... 2 more
Desired outcome:
log entry
log entry
log entry
Notice that the entries in the desired outcome have not been curtailed.
Background
When using Apache Karaf, which uses the log4j 2 interface, there is a properties file
etc/org.ops4j.pax.logging.cfg where I can setup what gets logged and how. How do stop it from curtailing log entries as shown above?
org.ops4j.pax.logging.cfg
################################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
# Colors for log level rendering
color.fatal = bright red
color.error = bright red
color.warn = bright yellow
color.info = bright green
color.debug = cyan
color.trace = cyan
# Common pattern layout for appenders
log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
log4j2.out.pattern = \u001b[90m%d{HH:mm:ss\.SSS}\u001b[0m %highlight{%-5level}{FATAL=${color.fatal}, ERROR=${color.error}, WARN=${color.warn}, INFO=${color.info}, DEBUG=${color.debug}, TRACE=${color.trace}} \u001b[90m[%t]\u001b[0m %msg%n%throwable
# Root logger
log4j2.rootLogger.level = INFO
# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
#log4j2.rootLogger.type = asyncRoot
#log4j2.rootLogger.includeLocation = false
log4j2.rootLogger.appenderRef.RollingFile.ref = RollingFile
log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi
log4j2.rootLogger.appenderRef.Console.ref = Console
log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-FINEST}
# Loggers configuration
# SSHD logger
log4j2.logger.sshd.name = org.apache.sshd
log4j2.logger.sshd.level = INFO
# Spifly logger
log4j2.logger.spifly.name = org.apache.aries.spifly
log4j2.logger.spifly.level = WARN
# Security audit logger
log4j2.logger.audit.name = audit
log4j2.logger.audit.level = TRACE
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRef.AuditRollingFile.ref = AuditRollingFile
# Appenders configuration
# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
log4j2.appender.console.type = Console
log4j2.appender.console.name = Console
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = ${log4j2.out.pattern}
# Rolling file appender
log4j2.appender.rolling.type = RollingRandomAccessFile
log4j2.appender.rolling.name = RollingFile
log4j2.appender.rolling.fileName = ${karaf.log}/karaf.log
log4j2.appender.rolling.filePattern = ${karaf.log}/karaf.log.%i
# uncomment to not force a disk flush
#log4j2.appender.rolling.immediateFlush = false
log4j2.appender.rolling.append = true
log4j2.appender.rolling.layout.type = PatternLayout
log4j2.appender.rolling.layout.pattern = ${log4j2.pattern}
log4j2.appender.rolling.policies.type = Policies
log4j2.appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.rolling.policies.size.size = 16MB
# Audit file appender
log4j2.appender.audit.type = RollingRandomAccessFile
log4j2.appender.audit.name = AuditRollingFile
log4j2.appender.audit.fileName = ${karaf.log}/security.log
log4j2.appender.audit.filePattern = ${karaf.log}/security-%i.log
log4j2.appender.audit.append = true
log4j2.appender.audit.layout.type = PatternLayout
log4j2.appender.audit.layout.pattern = %m%n
log4j2.appender.audit.policies.type = Policies
log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.audit.policies.size.size = 8MB
# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = PaxOsgi
log4j2.appender.osgi.filter = *
# help with identification of maven-related problems with pax-url-aether
#log4j2.logger.aether.name = shaded.org.eclipse.aether
#log4j2.logger.aether.level = TRACE
#log4j2.logger.http-headers.name = shaded.org.apache.http.headers
#log4j2.logger.http-headers.level = DEBUG
#log4j2.logger.maven.name = org.ops4j.pax.url.mvn
#log4j2.logger.maven.level = TRACE
Steps to reproduce
Install Karaf 4.2.4
Make new Java project
mvn archetype:generate \
-DinteractiveMode=false \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DgroupId=com.testproject \
-DartifactId=karaftest
Add a dependency that Karaf is unaware of. Do not add a features.xml. I used a pom.xml to make this easier.
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>2.22.2</version>
<scope>provided</scope>
</dependency>
Main.class:
import org.apache.camel.blueprint.BlueprintCamelContext;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
BlueprintCamelContext blueprintCamelContext = new BlueprintCamelContext();
System.out.println( "Hello World!" );
}
}
Make a bundle. I maven's pom.xml and swapped out the packaging value and added the maven-bundle-plugin to the build command.
<packaging>bundle</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>2.4.0</version>
</plugin>
</plugins>
</build>
Build it
mvn clean install
Place bundle's jar into Karaf's deploy folder.
Karaf will not start the bundle. Start the bundle start 45 (Default bundle id on a fresh install will probably be 45.)
Run log:set debug and log:display. Look for an OSGI osgi.wiring.package error, because I did import the dependency in the MANIFEST.MF (add in the pom.xml)
Exception caught while executing command
Karaf Log Contains
11:24:05.970 ERROR [Karaf local console user karaf] Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error executing command on bundles:
Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:70) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Suppressed: java.lang.Exception: Error starting bundle 45: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:67) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55) ~[?:?]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.osgi.framework.BundleException: Unable to resolve com.testproject.karaftest [45](R 45.0): missing requirement [com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0))) Unresolved requirements: [[com.testproject.karaftest [45](R 45.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.camel.blueprint)(version>=2.22.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38) ~[?:?]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:65) ~[?:?]
... 14 more
Related: How do I stop stacktraces truncating in logs
The description of jclouds is given in the below link.
https://jclouds.apache.org/guides/openstack/. I have packstack installed in the machine.
java -classpath ".:lib/*" JCloudsNova
Exception in thread "main" java.util.ServiceConfigurationError: org.jclouds.apis.ApiMetadata: Provider org.jclouds.openstack.neutron.v2.NeutronApiMetadata could not be instantiated at java.util.ServiceLoader.fail(ServiceLoader.java:232) at java.util.ServiceLoader.access$100(ServiceLoader.java:185) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:281)at com.google.common.collect.ImmutableCollection$ArrayBasedBuilder.addAll(ImmutableCollection.java:360) at com.google.common.collect.ImmutableSet$Builder.addAll(ImmutableSet.java:508) at org.jclouds.apis.Apis.all(Apis.java:72) at org.jclouds.apis.Apis.withId(Apis.java:88) at org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:169) at JCloudsNova.(JCloudsNova.java:39)
at JCloudsNova.main(JCloudsNova.java:19)
Caused by: java.lang.NoClassDefFoundError: org/jclouds/openstack/keystone/v2_0/config/AuthenticationApiModule at org.jclouds.openstack.neutron.v2.NeutronApiMetadata$Builder.(NeutronApiMetadata.java:78) at org.jclouds.openstack.neutron.v2.NeutronApiMetadata.(NeutronApiMetadata.java:51) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380) ... 10 more
Caused by: java.lang.ClassNotFoundException: org.jclouds.openstack.keystone.v2_0.config.AuthenticationApiModule at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 18 more