Closed planetf1 closed 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.
I have created a fix for this.
The behaviour now, when a mismatch occurs between the requested (random or otherwise) metadataCollectionId and the metadataCollecitonId found in the control vertex of the graph database, is as follows:
Mon Oct 26 17:39:04 GMT 2020 Metadata_Server2 Exception OMRS-GRAPH-REPOSITORY-0002 The OMRS Graph Database Metadata_Server2 contains a metadataCollectionId fcc0e6d9-3c8a-4135-a5a0-295393e57cb3 that does not match the requested metadataCollectionId abc0e6d9-3c8a-4135-a5a0-295393e57cb3.
Mon Oct 26 17:39:04 GMT 2020 Metadata_Server2 Exception OMRS-AUDIT-0034 The connector to the local repository failed with a org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSLogicErrorException exception and the following error message: OMRS-REPOSITORY-400-025 Local metadata repository has not initialized correctly because it has a null metadata collection.
Mon Oct 26 17:39:04 GMT 2020 Metadata_Server2 Exception OMRS-AUDIT-0034 Supplementary information: log record id 6e8fff18-c5c7-40ca-b846-f8cbc4d260a8 org.odpi.openmetadata.repositoryservices.ffdc.exception.OMRSLogicErrorException returned message of OMRS-REPOSITORY-400-025 Local metadata repository has not initialized correctly because it has a null metadata collection. and stacktrace of
OMRSRuntimeException{reportedHTTPCode=400, reportingClassName='org.odpi.openmetadata.adapters.repositoryservices.graphrepository.repositoryconnector.GraphOMRSRepositoryConnector', reportingActionDescription='setMetadataCollectionId', reportedErrorMessage='OMRS-REPOSITORY-400-025 Local metadata repository has not initialized correctly because it has a null metadata collection.', reportedErrorMessageId='OMRS-REPOSITORY-400-025', reportedErrorMessageParameters=[null], reportedSystemAction='The system is unable to process requests for this repository.', reportedUserAction='Verify that the repository connector is correctly configured in the OMAG server.', reportedCaughtException=OCFCheckedExceptionBase{reportedHTTPCode=400, reportingClassName='org.odpi.openmetadata.adapters.repositoryservices.graphrepository.repositoryconnector.GraphOMRSGraphFactory', reportingActionDescription='checkAndUpdateControlInformation', reportedErrorMessage='OMRS-GRAPH-REPOSITORY-400-022 It is not possible to open the graph database with metadataCollectionId fcc0e6d9-3c8a-4135-a5a0-295393e57cb3, because the repository connector has metadataCollectionId abc0e6d9-3c8a-4135-a5a0-295393e57cb3', reportedErrorMessageId='OMRS-GRAPH-REPOSITORY-400-022', reportedErrorMessageParameters=[fcc0e6d9-3c8a-4135-a5a0-295393e57cb3, abc0e6d9-3c8a-4135-a5a0-295393e57cb3], reportedSystemAction='The system was unable to open the graph repository graph database', reportedUserAction='Please check the configuration of the repository connection and update it if necessary.', reportedCaughtException=null, reportedCaughtExceptionClassName='null', relatedProperties=null}, reportedCaughtExceptionClassName='org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException', relatedProperties=null, errorMessage='OMRS-REPOSITORY-400-025 Local metadata repository has not initialized correctly because it has a null metadata collection.'}
at org.odpi.openmetadata.adapters.repositoryservices.graphrepository.repositoryconnector.GraphOMRSRepositoryConnector.setMetadataCollectionId(GraphOMRSRepositoryConnector.java:55)
at org.odpi.openmetadata.repositoryservices.localrepository.repositoryconnector.LocalOMRSRepositoryConnector.setMetadataCollectionId(LocalOMRSRepositoryConnector.java:352)
at org.odpi.openmetadata.repositoryservices.admin.OMRSOperationalServices.getLocalOMRSConnector(OMRSOperationalServices.java:1132)
at org.odpi.openmetadata.repositoryservices.admin.OMRSOperationalServices.initializeLocalRepository(OMRSOperationalServices.java:717)
at org.odpi.openmetadata.repositoryservices.admin.OMRSOperationalServices.initializeCohortMember(OMRSOperationalServices.java:402)
at org.odpi.openmetadata.adminservices.OMAGServerOperationalServices.activateWithSuppliedConfig(OMAGServerOperationalServices.java:318)
at org.odpi.openmetadata.adminservices.OMAGServerOperationalServices.activateWithStoredConfig(OMAGServerOperationalServices.java:153)
at org.odpi.openmetadata.adminservices.spring.OperationalServicesResource.activateWithStoredConfig(OperationalServicesResource.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: OCFCheckedExceptionBase{reportedHTTPCode=400, reportingClassName='org.odpi.openmetadata.adapters.repositoryservices.graphrepository.repositoryconnector.GraphOMRSGraphFactory', reportingActionDescription='checkAndUpdateControlInformation', reportedErrorMessage='OMRS-GRAPH-REPOSITORY-400-022 It is not possible to open the graph database with metadataCollectionId fcc0e6d9-3c8a-4135-a5a0-295393e57cb3, because the repository connector has metadataCollectionId abc0e6d9-3c8a-4135-a5a0-295393e57cb3', reportedErrorMessageId='OMRS-GRAPH-REPOSITORY-400-022', reportedErrorMessageParameters=[fcc0e6d9-3c8a-4135-a5a0-295393e57cb3, abc0e6d9-3c8a-4135-a5a0-295393e57cb3], reportedSystemAction='The system was unable to open the graph repository graph database', reportedUserAction='Please check the configuration of the repository connection and update it if necessary.', reportedCaughtException=null, reportedCaughtExceptionClassName='null', relatedProperties=null}
at org.odpi.openmetadata.adapters.repositoryservices.graphrepository.repositoryconnector.GraphOMRSGraphFactory.checkAndUpdateControlInformation(GraphOMRSGraphFactory.java:907)
at org.odpi.openmetadata.adapters.repositoryservices.graphrepository.repositoryconnector.GraphOMRSGraphFactory.open(GraphOMRSGraphFactory.java:207)
at org.odpi.openmetadata.adapters.repositoryservices.graphrepository.repositoryconnector.GraphOMRSMetadataStore.
And the server is automatically shut down...
Mon Oct 26 17:39:04 GMT 2020 Metadata_Server2 Shutdown OMAG-ADMIN-0005 The Metadata_Server2 server has begun the shutdown process
Mon Oct 26 17:39:04 GMT 2020 Metadata_Server2 Shutdown OMRS-AUDIT-0010 The Open Metadata Repository Services (OMRS) is disconnecting the open metadata repositories
Mon Oct 26 17:39:04 GMT 2020 Metadata_Server2 Shutdown OMRS-AUDIT-0021 The OMRS Topic Listener has disconnected the event bus connectors for topic
I would quite like to not include the stacktrace as there is possibly enough error reporting in the associated messages.
Created a DRAFT PR at #3963
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.
Fixed by #3963
If a server is configured with the graph repo (the only configuration done is to enable the graph repository), but it fails to start due to a preexisting metadata collection id, it still seems as if the server is started, but doesn't work properly.
From the log at https://gist.github.com/0252f24c24611fcd4946321260a9fe87
It goes wrong in startup:
but we then continue to load the types:
This works until we try and persist something and get an exception:
There are many of these.. but then finally:
At this point the server seems ready, but of course any interaction with subject area will then fail ie:
10:48:53.291 [https-jsse-nio-10443-exec-9] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause java.lang.NullPointerException: null at org.odpi.openmetadata.accessservices.subjectarea.utilities.OMRSAPIHelper.getTypeDefGUID(OMRSAPIHelper.java:911) at org.odpi.openmetadata.accessservices.subjectarea.utilities.OMRSAPIHelper.findEntitiesByPropertyValue(OMRSAPIHelper.java:813) at org.odpi.openmetadata.accessservices.subjectarea.utilities.OMRSAPIHelper.findEntitiesByPropertyValue(OMRSAPIHelper.java:788) at org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaHandler.findEntities(SubjectAreaHandler.java:109) at org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaGlossaryHandler.findGlossary(SubjectAreaGlossaryHandler.java:148) at org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaGlossaryRESTServices.findGlossary(SubjectAreaGlossaryRESTServices.java:145) at org.odpi.openmetadata.accessservices.subjectarea.server.spring.SubjectAreaGlossaryRESTResource.findGlossary(SubjectAreaGlossaryRESTResource.java:123) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:832)