Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 410919

Summary: Error initializing metadata store on startup
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ServerAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: simon_kaegi, Szymon.Brandys
Version: 3.0Flags: Szymon.Brandys: review+
simon_kaegi: review+
Target Milestone: 3.0 RC3   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Better logging none

Description John Arthorne CLA 2013-06-17 09:22:50 EDT
Found in log on orionhub.org when starting freshly deployed 3.0 RC2:

2013-06-17 09:20:03.920 [Worker-0] INFO  org.eclipse.orion.server.config - Initializing server metadata store
2013-06-17 09:20:03.920 [Worker-0] ERROR org.eclipse.orion.server.config - Invalid server configuration. Failed                            to initialize a metadata store
2013-06-17 09:20:05.096 [Component Resolve Thread (Bundle 48)] INFO  org.eclipse.orion.server.config - Initializ                           ing server metadata store
2013-06-17 09:20:05.097 [Component Resolve Thread (Bundle 48)] INFO  org.eclipse.orion.server.config - Found met                           astore service: {org.eclipse.orion.server.core.metastore.IMetaStore}={service.id=55}
Comment 1 John Arthorne CLA 2013-06-18 11:05:18 EDT
This is going to be a race condition similar to bug 407869. I haven't been able to reproduce it so far.
Comment 2 John Arthorne CLA 2013-06-18 11:14:03 EDT
Created attachment 232505 [details]
Better logging
Comment 3 Simon Kaegi CLA 2013-06-18 12:01:09 EDT
I'm fine with better logging and the patch is teensy so go ahead.
Comment 4 John Arthorne CLA 2013-06-19 14:40:03 EDT
Here is the log output from last night's deployment. Based on this I think it is not harmful but I would like to consider silencing the error for 3.0:

java.lang.IllegalStateException: Invalid server configuration. Failed to initialize a metadata store
        at org.eclipse.orion.internal.server.core.Activator.getMetastore(Activator.java:96) ~[org.eclipse.orion.server.core_1.0.0.v20130618-1545.jar:na]
        at org.eclipse.orion.server.core.OrionConfiguration.getMetaStore(OrionConfiguration.java:30) [org.eclipse.orion.server.core_1.0.0.v20130618-1545.jar:na]
        at org.eclipse.orion.internal.server.search.Indexer.run(Indexer.java:272) [org.eclipse.orion.server.search_1.0.0.v20130530-2047.jar:na]
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) [org.eclipse.core.jobs_3.5.300.v20130429-1813.jar:na]
Comment 5 John Arthorne CLA 2013-06-19 14:41:24 EDT
Cleaner stack:

org.eclipse.orion.internal.server.core.Activator.getMetastore(Activator.java:96)
org.eclipse.orion.server.core.OrionConfiguration.getMetaStore(OrionConfiguration.java:30)
org.eclipse.orion.internal.server.search.Indexer.run(Indexer.java:272) 
org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Comment 6 John Arthorne CLA 2013-06-19 16:37:26 EDT
From the stack I can see that this is precisely the scenario in bug 407869. We are catching the exception and handling it higher in the stack, so there is actually no problem here. However the message is scary and I would like to change the log level so this message is only shown when additional logging is enabled.