Closed planetf1 closed 5 years ago
Have confirmed that asset catalog OMAS is returning data for example:
GET http://egeriadev.eu-gb.containers.appdomain.cloud:30080/servers/myserver/open-metadata/access-services/asset-catalog/users/myuser/asset-summary/b1c497ce.6e83759b.89rmi5f47.9erfgvl.flqn91.tnpvjcq64tusc3pt862ja
responds with
{
"relatedHTTPCode": 200,
"assetDescriptionList": [
{
"guid": "b1c497ce.6e83759b.89rmi5f47.9erfgvl.flqn91.tnpvjcq64tusc3pt862ja",
"metadataCollectionId": "905ff8e8-6106-4193-9d91-7027de26a5e7",
"createdBy": "Administrator IIS",
"createTime": "2019-02-22T15:47:53.000+0000",
"updatedBy": "Administrator IIS",
"updateTime": "2019-02-22T15:47:53.000+0000",
"version": 1550850473000,
"status": "ACTIVE",
"typeDefName": "Database",
"typeDefDescription": "A data store containing relational data.",
"url": "https://158.176.66.119:9446/ibm/iis/igc-rest/v1/assets/b1c497ce.6e83759b.89rmi5f47.9erfgvl.flqn91.tnpvjcq64tusc3pt862ja"
}
]
}
Note that in this latter case I was issuing the request from an external environment (VIA POSTMAN) , so the target port differs
Issuing the request from within the UI container, this time using the internal port:ip results in the same result:
root@lunging-eagle-vdc-ui-deployment-6c99d5cd54-kcxjs:~/egeria/open-metadata-distribution/open-metadata-assemblies/target/egeria-1.1-SNAPSHOT-omag-server/servers/omag-server-1.1-SNAPSHOT#
http --auth admin:admin ${OMAS_SERVER_URL}/servers/myserver/open-metadata/access-services/asset-catalog/users/myuser/asset-summary/b1c497ce.6e83759b.89rmi5f47.9erfgvl.flqn91.tnpvjcq64tusc3pt862ja
HTTP/1.1 200
Content-Disposition: inline;filename=f.txt
Content-Type: application/json;charset=UTF-8
Date: Fri, 22 Feb 2019 17:14:09 GMT
Transfer-Encoding: chunked
{
"assetDescriptionList": [
{
"createTime": "2019-02-22T15:47:53.000+0000",
"createdBy": "Administrator IIS",
"guid": "b1c497ce.6e83759b.89rmi5f47.9erfgvl.flqn91.tnpvjcq64tusc3pt862ja",
"metadataCollectionId": "905ff8e8-6106-4193-9d91-7027de26a5e7",
"status": "ACTIVE",
"typeDefDescription": "A data store containing relational data.",
"typeDefName": "Database",
"updateTime": "2019-02-22T15:47:53.000+0000",
"updatedBy": "Administrator IIS",
"url": "https://158.176.66.119:9446/ibm/iis/igc-rest/v1/assets/b1c497ce.6e83759b.89rmi5f47.9erfgvl.flqn91.tnpvjcq64tusc3pt862ja",
"version": 1550850473000
}
],
"relatedHTTPCode": 200
}
OMAS_SERVER_URL should be interpreted as overriding the omas.server.url spring property as per https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html
This technique has been used in, for example, the igc connector successfully. It requires no change to the code.
Two example runs of the UI.
In both cases run locally using 'master'
In each case I just entered the search string 'Database' (I am unsure what is valid)
Full console log: https://gist.github.com/585d2a63d48fba331b18ec7bfd10ac36
From the debugger - as par as callPostAssetDescriptionResponse url = /servers/{0}/open-metadata/access-services/asset-catalog/users/{1}/search-asset/{2} params= .. seemingly defaults with most values 0/null, status=ACTIVE, excludeDeleted=true
Did you get any response from the search-asset call ?
What are you searching for in the UI ?
I tried search for FNAME, EMPLOYEE, First - all produce same error
UI webapp exception remains as:
2019-03-03 12:36:10.380 ERROR 1 --- [nio-8443-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 null] with root cause
org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 null
at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:79) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:124) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:102) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:777) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:735) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:669) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:413) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.odpi.openmetadata.accessservices.assetcatalog.client.AssetCatalog.callPostAssetDescriptionResponse(AssetCatalog.java:453) ~[asset-catalog-client-1.1-SNAPSHOT.jar!/:na]
Concurrently the server i raising an exception:
2019-03-03 12:36:10.373 ERROR 6 --- [nio-8080-exec-7] o.a.c.c.C.[Tomcat].[localhost] : Exception Processing ErrorPage[errorCode=0, location=/error]
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.springframework.http.MediaType.isPresentIn(Ljava/util/Collection;)Z
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1053) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
This would explain the 500 error from the client. The 'class not found' error is odd as I am running against the server chassis & OMAS/OMRS are generally working. Perhaps something specific to asset catalog, a dependency not being pulled in, or wrong version libraries.
Looking at our Nexus IQ run I can see we have mixed spring versions
I suspect the fix here is to consolidate on a single version.
I would suggest we switch from using 'properties' to DependencyManagement to better address transitive dependencies, and that we encode 5.1.4 as the preferred level in the top level pom. Other poms will not need & should not refer to specific versions.
Springboot looks more consistent at 2.1.2, though there are a few additional spring components at different versions (perhaps correctly).
This would explain something like a classNotFound -- though I do not know why you do not see the error. Perhaps you have different spring libraries in the classpath or have something different in the build @bogdan-sava ?
I'm happy to create a PR encompassing the above suggestion, and try it out. We know we have inconsistencies with versions which even if it doesn't fix this issue, is a problem that should be addressed.
cc: @mandy-chessell @grahamwallis does this change seem reasonable?
Please do ...
Agreed - it would be good to introduce DepMgt anyway - whether it fixes this problem or not.
delegated consolidation of spring versions to https://github.com/odpi/egeria/issues/807 Will revisit this issue once above is incorporated into master & built into docker images.
Following #807 the UI now appears to function, and a search for FNAME returns correct results with no exceptions.
I conclude the cause was mismatched libraries. cc: @bogdan-sava
Closing this
When VDC is deployed, the UI is launched via
cd /root/egeria/open-metadata-implementation/user-interfaces/access-services-user-interface/target/ && java -jar access-services-user-interface-1.1-SNAPSHOT.jar
This code was rebuilt todayThe environment includes:
which represent the correct servername for egeria, and a valid (within the k8s cluster) endpoint
But when trying to perform a search on the UI the following exception occurs:
The cluster contains the Coco pharma sample data, which has been loaded into IGC, and through the connector/event mapper has also been replicated into atlas. An OMAG server is also present in the cohort to support OMAS requests.
See full egeria log at https://gist.github.com/0f2846747c46ceb806a65d72b4786685