Open rbhman opened 4 years ago
Can you check elasticsearch is working? If it is it could be the connection settings.
However it could be related to the analysers. Config example https://github.com/project-wildfyre/clinical-data-repository-hapi-jpa/blob/master/elasticsearch.yml
Hi Kevin,
Thanks for your quick reply on the previous issue.
I attempted at first to get the Spring Boot version running, but ran into problems with downloading certain jars. This lead me to attempt the Dockerized version, but I ran into the same problem there once you pointed out I needed the build to run first.
The build problem was due to the fact that the following jars now exist as
3.7.0.pre1-SNAPSHOT
on Nexus instead of3.7.0-SNAPSHOT
: elasticsearch, validation, resources-dstu3, resources-r4.Once I changed these in the POM, I'm now getting the following error on starting the server:
`2020-07-21 09:14:39.586 INFO 62067 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2020-07-21 09:14:39.586 INFO 62067 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4768 ms 2020-07-21 09:14:39.618 INFO 62067 --- [ main] ca.uhn.fhir.util.VersionUtil : HAPI FHIR version 3.7.0 - Rev f2560071c8 2020-07-21 09:14:40.032 INFO 62067 --- [ main] u.g.wildfyre.cdr.FhirServerConfigCommon : Server configured to allow contains searches 2020-07-21 09:14:40.032 INFO 62067 --- [ main] u.g.wildfyre.cdr.FhirServerConfigCommon : Server configured to allow multiple deletes 2020-07-21 09:14:40.032 INFO 62067 --- [ main] u.g.wildfyre.cdr.FhirServerConfigCommon : Server configured to allow external references 2020-07-21 09:14:40.032 INFO 62067 --- [ main] u.g.wildfyre.cdr.FhirServerConfigCommon : Server configured to enable expunges 2020-07-21 09:14:40.032 INFO 62067 --- [ main] u.g.wildfyre.cdr.FhirServerConfigCommon : Server configured to allow placeholder references 2020-07-21 09:14:40.032 INFO 62067 --- [ main] u.g.wildfyre.cdr.FhirServerConfigCommon : Server configured to allow overriding default search params 2020-07-21 09:14:40.748 INFO 62067 --- [ main] o.s.b.a.e.web.ServletEndpointRegistrar : Registered '/jolokia' to jolokia-actuator-endpoint 2020-07-21 09:14:40.759 INFO 62067 --- [ main] io.hawt.HawtioContextListener : Initialising hawtio services 2020-07-21 09:14:40.764 INFO 62067 --- [ main] io.hawt.system.ConfigManager : Configuration will be discovered via system properties 2020-07-21 09:14:40.766 INFO 62067 --- [ main] io.hawt.jmx.JmxTreeWatcher : Welcome to Hawtio 2.5.0 2020-07-21 09:14:40.773 INFO 62067 --- [ main] i.h.w.auth.AuthenticationConfiguration : Starting hawtio authentication filter, JAAS authentication disabled 2020-07-21 09:14:40.806 INFO 62067 --- [ main] ca.uhn.fhir.context.FhirContext : Creating new FHIR context for FHIR version [DSTU3] 2020-07-21 09:14:40.870 INFO 62067 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: HAPI_PU] 2020-07-21 09:14:40.965 INFO 62067 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.4.2.Final} 2020-07-21 09:14:41.135 INFO 62067 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final} 2020-07-21 09:14:41.391 INFO 62067 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL9Dialect 2020-07-21 09:14:42.353 INFO 62067 --- [ main] org.hibernate.search.engine.Version : HSEARCH000034: Hibernate Search 5.11.1.Final 2020-07-21 09:14:44.362 INFO 62067 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2020-07-21 09:14:44.681 WARN 62067 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [uk/gov/wildfyre/cdr/FhirServerConfigCommon.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: HAPI_PU] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.exception.SearchException: HSEARCH000103: Unable to initialize IndexManager named 'ca.uhn.fhir.jpa.entity.TermConcept' 2020-07-21 09:14:44.689 INFO 62067 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2020-07-21 09:14:44.692 INFO 62067 --- [ main] io.hawt.web.auth.AuthenticationFilter : Destroying hawtio authentication filter 2020-07-21 09:14:44.693 INFO 62067 --- [ main] io.hawt.HawtioContextListener : Destroying hawtio services 2020-07-21 09:14:44.717 INFO 62067 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-07-21 09:14:44.740 ERROR 62067 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [uk/gov/wildfyre/cdr/FhirServerConfigCommon.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: HAPI_PU] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.exception.SearchException: HSEARCH000103: Unable to initialize IndexManager named 'ca.uhn.fhir.jpa.entity.TermConcept' at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083) ~[spring-context-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:853) ~[spring-context-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE] at uk.gov.wildfyre.cdr.ClinicalDataRepositoryServer.main(ClinicalDataRepositoryServer.java:43) [classes/:na] Caused by: javax.persistence.PersistenceException: [PersistenceUnit: HAPI_PU] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.exception.SearchException: HSEARCH000103: Unable to initialize IndexManager named 'ca.uhn.fhir.jpa.entity.TermConcept' at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:402) ~[spring-orm-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:377) ~[spring-orm-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE] ... 16 common frames omitted Caused by: org.hibernate.search.exception.SearchException: HSEARCH000103: Unable to initialize IndexManager named 'ca.uhn.fhir.jpa.entity.TermConcept' at org.hibernate.search.indexes.impl.IndexManagerGroupHolder.doCreateIndexManager(IndexManagerGroupHolder.java:198) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.indexes.impl.IndexManagerGroupHolder.getOrCreateIndexManager(IndexManagerGroupHolder.java:155) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.indexes.impl.NotShardedEntityIndexBinder.bind(NotShardedEntityIndexBinder.java:34) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.indexes.impl.IndexManagerGroupHolder.bind(IndexManagerGroupHolder.java:100) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:100) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.spi.SearchIntegratorBuilder.initDocumentBuilders(SearchIntegratorBuilder.java:428) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.spi.SearchIntegratorBuilder.createNewFactoryState(SearchIntegratorBuilder.java:244) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.spi.SearchIntegratorBuilder.buildNewSearchFactory(SearchIntegratorBuilder.java:200) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.spi.SearchIntegratorBuilder.buildSearchIntegrator(SearchIntegratorBuilder.java:128) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.boot(HibernateSearchSessionFactoryObserver.java:127) ~[hibernate-search-orm-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:94) ~[hibernate-search-orm-5.11.1.Final.jar:5.11.1.Final] at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final] at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:371) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:935) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:390) ~[spring-orm-5.1.3.RELEASE.jar:5.1.3.RELEASE]
... 20 common frames omitted
Caused by: org.hibernate.search.exception.SearchException: HSEARCH400080: Failed to detect the Elasticsearch version running on the cluster.
at org.hibernate.search.elasticsearch.dialect.impl.DefaultElasticsearchDialectFactory.createDialect(DefaultElasticsearchDialectFactory.java:39) ~[hibernate-search-elasticsearch-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.elasticsearch.impl.DefaultElasticsearchService.start(DefaultElasticsearchService.java:100) ~[hibernate-search-elasticsearch-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.engine.service.impl.StandardServiceManager$ServiceWrapper.startService(StandardServiceManager.java:325) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final]
at org.hibernate.search.engine.service.impl.StandardServiceManager$ServiceWrapper.startVirtual(StandardServiceManager.java:290) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final]
at org.hibernate.search.engine.service.impl.StandardServiceManager.createAndCacheWrapper(StandardServiceManager.java:227) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final]
at org.hibernate.search.engine.service.impl.StandardServiceManager.requestService(StandardServiceManager.java:100) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final]
at org.hibernate.search.elasticsearch.impl.ElasticsearchIndexManager.initialize(ElasticsearchIndexManager.java:153) ~[hibernate-search-elasticsearch-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.indexes.impl.IndexManagerGroupHolder.doCreateIndexManager(IndexManagerGroupHolder.java:195) ~[hibernate-search-engine-5.11.1.Final.jar:5.11.1.Final]
... 37 common frames omitted
Caused by: org.hibernate.search.exception.SearchException: HSEARCH400007: Elasticsearch request failed.
Request: GET with parameters {}
Response: null
at org.hibernate.search.elasticsearch.dialect.impl.DefaultElasticsearchDialectFactory.getVersion(DefaultElasticsearchDialectFactory.java:75) ~[hibernate-search-elasticsearch-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.elasticsearch.dialect.impl.DefaultElasticsearchDialectFactory.createDialect(DefaultElasticsearchDialectFactory.java:36) ~[hibernate-search-elasticsearch-5.10.3.Final.jar:5.10.3.Final]
... 44 common frames omitted
Caused by: java.util.concurrent.CompletionException: java.net.ConnectException: Connection refused
at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326) ~[na:1.8.0_73]
at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338) ~[na:1.8.0_73]
at java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:911) ~[na:1.8.0_73]
at java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:899) ~[na:1.8.0_73]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[na:1.8.0_73]
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) ~[na:1.8.0_73]
at org.hibernate.search.elasticsearch.client.impl.DefaultElasticsearchClient$1.onFailure(DefaultElasticsearchClient.java:123) ~[hibernate-search-elasticsearch-5.10.3.Final.jar:5.10.3.Final]
at org.elasticsearch.client.RestClient$FailureTrackingResponseListener.onDefinitiveFailure(RestClient.java:844) ~[elasticsearch-rest-client-6.4.3.jar:6.4.3]
at org.elasticsearch.client.RestClient$1.retryIfPossible(RestClient.java:582) ~[elasticsearch-rest-client-6.4.3.jar:6.4.3]
at org.elasticsearch.client.RestClient$1.failed(RestClient.java:561) ~[elasticsearch-rest-client-6.4.3.jar:6.4.3]
at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:138) ~[httpcore-4.4.10.jar:4.4.10]
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.executionFailed(DefaultClientExchangeHandlerImpl.java:101) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.client.AbstractClientExchangeHandler.failed(AbstractClientExchangeHandler.java:426) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.client.AbstractClientExchangeHandler.connectionRequestFailed(AbstractClientExchangeHandler.java:348) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.client.AbstractClientExchangeHandler.access$100(AbstractClientExchangeHandler.java:62) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.client.AbstractClientExchangeHandler$1.failed(AbstractClientExchangeHandler.java:392) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:138) ~[httpcore-4.4.10.jar:4.4.10]
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager$1.failed(PoolingNHttpClientConnectionManager.java:316) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.concurrent.BasicFuture.failed(BasicFuture.java:138) ~[httpcore-4.4.10.jar:4.4.10]
at org.apache.http.nio.pool.RouteSpecificPool.failed(RouteSpecificPool.java:167) ~[httpcore-nio-4.4.10.jar:4.4.10]
at org.apache.http.nio.pool.AbstractNIOConnPool.requestFailed(AbstractNIOConnPool.java:610) ~[httpcore-nio-4.4.10.jar:4.4.10]
at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.failed(AbstractNIOConnPool.java:894) ~[httpcore-nio-4.4.10.jar:4.4.10]
at org.apache.http.impl.nio.reactor.SessionRequestImpl.failed(SessionRequestImpl.java:160) ~[httpcore-nio-4.4.10.jar:4.4.10]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:173) ~[httpcore-nio-4.4.10.jar:4.4.10]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145) ~[httpcore-nio-4.4.10.jar:4.4.10]
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) ~[httpcore-nio-4.4.10.jar:4.4.10]
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) ~[httpasyncclient-4.1.4.jar:4.1.4]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_73]
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_73]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_73]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171) ~[httpcore-nio-4.4.10.jar:4.4.10]
... 5 common frames omitted
`