LinuxForHealth / FHIR

The LinuxForHealth FHIR® Server and related projects
https://linuxforhealth.github.io/FHIR
Apache License 2.0
326 stars 157 forks source link

description length over ~ 1035 of ValueSets or CodeSystems is throwing an FHIRPersistenceDataAccessException #4158

Closed Nik-xT closed 1 year ago

Nik-xT commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

The length of the description of some terminologies is a problem. If you shorten them to 1035 characters or less, no FHIRPersistenceDataAccessException from the API is thrown. Stacktrace of server log can be found below. Our issue can be found at https://gitlab.com/elga-gmbh/termgit-dev/-/issues/16.

Environment Which version of LinuxForHealth FHIR Server?

We are using the official helm chart v0.8.2 that is using the application version 5.0.0 for our Dev-NS in k8s. We are also running our Prod-NS with helm version 0.4.0 and Application version 4.7.1. There the length of the description is no issue.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Try to upload one of the terminologies where a FHIRPersistenceDataAccessException is thrown in our CI/CD: https://gitlab.com/elga-gmbh/termgit-dev/-/jobs/3558026270 like https://termgit.elga.gv.at/ValueSet-elga-practicesetting.html .

Expected behavior A clear and concise description of what you expected to happen.

No error, like in v 4.7.1 of the application.

Additional context Add any other context about the problem here.

Stack trace of the server log: {"type":"liberty_message","host":"devlfhfhir-fhir-server-6b6bb796ff-nf6js","ibm_userDir":"\/opt\/ol\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"Received request: tenantId:[default] dsId:[default] user:[fhiruser] method:[PUT] uri:[https:\/\/dev-tergi.elga.gv.at\/fhir-server\/api\/v4\/CodeSystem\/elga-practicesetting]","ibm_threadId":"0000023f","ibm_datetime":"2023-01-13T14:19:45.436+0000","module":"org.linuxforhealth.fhir.server.filter.rest.FHIRRestServletFilter","level":"INFO","ibm_sequence":"1673619585436_000000002368B","ext_appName":"fhir-server-webapp","ext_thread":"Default Executor-thread-503"} {"type":"liberty_message","host":"devlfhfhir-fhir-server-6b6bb796ff-nf6js","ibm_userDir":"\/opt\/ol\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"Failed persisting parameter transaction data. Marking transaction for rollback","ibm_threadId":"0000023f","ibm_datetime":"2023-01-13T14:19:45.466+0000","module":"org.linuxforhealth.fhir.persistence.jdbc.impl.ParameterTransactionDataImpl","level":"SEVERE","ibm_sequence":"1673619585466_000000002368C","ibm_exceptionName":"org.linuxforhealth.fhir.persistence.exception.FHIRPersistenceException","ibm_stackTrace":"org.linuxforhealth.fhir.persistence.exception.FHIRPersistenceException: pushBatch failed for 'CodeSystem' [probeId=c0-a8-6b-8-99f8dc9f-6bc4-40cd-bafd-8596f5e8dd99]\n\tat org.linuxforhealth.fhir.persistence.params.database.PlainBatchParameterProcessor.pushBatch(PlainBatchParameterProcessor.java:117)\n\tat org.linuxforhealth.fhir.persistence.params.database.PlainParamValueProcessor.pushBatch(PlainParamValueProcessor.java:110)\n\tat org.linuxforhealth.fhir.persistence.jdbc.impl.FHIRPersistenceJDBCImpl.flush(FHIRPersistenceJDBCImpl.java:3081)\n\tat org.linuxforhealth.fhir.persistence.jdbc.impl.FHIRPersistenceJDBCImpl.onCommit(FHIRPersistenceJDBCImpl.java:3112)\n\tat org.linuxforhealth.fhir.persistence.jdbc.impl.ParameterTransactionDataImpl.persist(ParameterTransactionDataImpl.java:70)\n\tat org.linuxforhealth.fhir.persistence.jdbc.dao.impl.TransactionDataImpl.lambda$persist$0(TransactionDataImpl.java:46)\n\tat java.base\/java.util.HashMap$Values.forEach(HashMap.java:977)\n\tat org.linuxforhealth.fhir.persistence.jdbc.dao.impl.TransactionDataImpl.persist(TransactionDataImpl.java:46)\n\tat org.linuxforhealth.fhir.persistence.jdbc.impl.CacheTransactionSync.beforeCompletion(CacheTransactionSync.java:74)\n\tat com.ibm.tx.jta.impl.RegisteredSyncs.coreDistributeBefore(RegisteredSyncs.java:238)\n\tat com.ibm.tx.jta.impl.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:146)\n\tat com.ibm.tx.jta.impl.TransactionImpl.prePrepare(TransactionImpl.java:1404)\n\tat com.ibm.tx.jta.impl.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:814)\n\tat com.ibm.tx.jta.impl.TransactionImpl.processCommit(TransactionImpl.java:770)\n\tat com.ibm.tx.jta.impl.TransactionImpl.commit(TransactionImpl.java:713)\n\tat com.ibm.tx.jta.impl.TranManagerImpl.commit(TranManagerImpl.java:153)\n\tat com.ibm.tx.jta.impl.TranManagerSet.commit(TranManagerSet.java:110)\n\tat com.ibm.tx.jta.impl.UserTransactionImpl.commit(UserTransactionImpl.java:145)\n\tat com.ibm.tx.jta.embeddable.impl.EmbeddableUserTransactionImpl.commit(EmbeddableUserTransactionImpl.java:101)\n\tat com.ibm.ws.transaction.services.UserTransactionService.commit(UserTransactionService.java:72)\n\tat org.linuxforhealth.fhir.persistence.jdbc.connection.FHIRUserTransactionAdapter.end(FHIRUserTransactionAdapter.java:140)\n\tat org.linuxforhealth.fhir.persistence.helper.FHIRTransactionHelper.commit(FHIRTransactionHelper.java:43)\n\tat org.linuxforhealth.fhir.server.util.FHIRRestHelper.doPatchOrUpdate(FHIRRestHelper.java:502)\n\tat org.linuxforhealth.fhir.server.util.FHIRRestHelper.doUpdate(FHIRRestHelper.java:453)\n\tat org.linuxforhealth.fhir.server.spi.operation.FHIRResourceHelpers.doUpdate(FHIRResourceHelpers.java:225)\n\tat org.linuxforhealth.fhir.server.resources.Update.update(Update.java:76)\n\tat org.linuxforhealth.fhir.server.resources.Update$Proxy$_$$_WeldClientProxy.update(Unknown Source)\n\tat jdk.internal.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)\n\tat java.base\/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base\/java.lang.reflect.Method.invoke(Method.java:566)\n\tat com.ibm.ws.jaxrs20.cdi.component.JaxRsFactoryImplicitBeanCDICustomizer.serviceInvoke(JaxRsFactoryImplicitBeanCDICustomizer.java:350)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsServerFactoryBean.performInvocation(LibertyJaxRsServerFactoryBean.java:641)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.performInvocation(LibertyJaxRsInvoker.java:160)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:101)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.invoke(LibertyJaxRsInvoker.java:273)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:213)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.invoke(LibertyJaxRsInvoker.java:444)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:112)\n\tat org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)\n\tat org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)\n\tat org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)\n\tat org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)\n\tat org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:277)\n\tat com.ibm.ws.jaxrs20.endpoint.AbstractJaxRsWebEndpoint.invoke(AbstractJaxRsWebEndpoint.java:137)\n\tat com.ibm.websphere.jaxrs.server.IBMRestServlet.handleRequest(IBMRestServlet.java:146)\n\tat com.ibm.websphere.jaxrs.server.IBMRestServlet.doPut(IBMRestServlet.java:136)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:709)\n\tat com.ibm.websphere.jaxrs.server.IBMRestServlet.service(IBMRestServlet.java:96)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1258)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:746)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:193)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:98)\n\tat org.linuxforhealth.fhir.server.filter.rest.FHIRRestServletFilter.doFilter(FHIRRestServletFilter.java:170)\n\tat javax.servlet.http.HttpFilter.doFilter(HttpFilter.java:127)\n\tat com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)\n\tat com.ibm.ws.security.jaspi.JaspiServletFilter.doFilter(JaspiServletFilter.java:56)\n\tat com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1002)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1140)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1011)\n\tat com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:75)\n\tat com.ibm.ws.webcontainer40.servlet.CacheServletWrapper40.handleRequest(CacheServletWrapper40.java:85)\n\tat com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:938)\n\tat com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:281)\n\tat com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:1184)\n\tat com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:453)\n\tat com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:412)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:566)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:500)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:360)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:327)\n\tat com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:167)\n\tat com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:75)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:514)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:584)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:968)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1057)\n\tat com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:245)\n\tat java.base\/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base\/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base\/java.lang.Thread.run(Thread.java:840)\n","ext_appName":"fhir-server-webapp","ext_thread":"Default Executor-thread-503"} {"type":"liberty_message","host":"devlfhfhir-fhir-server-6b6bb796ff-nf6js","ibm_userDir":"\/opt\/ol\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"Transaction failed - afterCompletion(status = STATUS_ROLLEDBACK)","ibm_threadId":"0000023f","ibm_datetime":"2023-01-13T14:19:45.468+0000","module":"org.linuxforhealth.fhir.persistence.jdbc.impl.CacheTransactionSync","level":"INFO","ibm_sequence":"1673619585468_000000002368D","ext_appName":"fhir-server-webapp","ext_thread":"Default Executor-thread-503"} {"type":"liberty_message","host":"devlfhfhir-fhir-server-6b6bb796ff-nf6js","ibm_userDir":"\/opt\/ol\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"failed to commit transaction","ibm_threadId":"0000023f","ibm_datetime":"2023-01-13T14:19:45.468+0000","module":"org.linuxforhealth.fhir.persistence.jdbc.connection.FHIRUserTransactionAdapter","level":"SEVERE","ibm_sequence":"1673619585468_000000002368E","ibm_exceptionName":"javax.transaction.RollbackException","ibm_stackTrace":"javax.transaction.RollbackException\n\tat com.ibm.tx.jta.impl.TransactionImpl.stage3CommitProcessing(TransactionImpl.java:999)\n\tat com.ibm.tx.jta.impl.TransactionImpl.processCommit(TransactionImpl.java:799)\n\tat com.ibm.tx.jta.impl.TransactionImpl.commit(TransactionImpl.java:713)\n\tat com.ibm.tx.jta.impl.TranManagerImpl.commit(TranManagerImpl.java:153)\n\tat com.ibm.tx.jta.impl.TranManagerSet.commit(TranManagerSet.java:110)\n\tat com.ibm.tx.jta.impl.UserTransactionImpl.commit(UserTransactionImpl.java:145)\n\tat com.ibm.tx.jta.embeddable.impl.EmbeddableUserTransactionImpl.commit(EmbeddableUserTransactionImpl.java:101)\n\tat com.ibm.ws.transaction.services.UserTransactionService.commit(UserTransactionService.java:72)\n\tat org.linuxforhealth.fhir.persistence.jdbc.connection.FHIRUserTransactionAdapter.end(FHIRUserTransactionAdapter.java:140)\n\tat org.linuxforhealth.fhir.persistence.helper.FHIRTransactionHelper.commit(FHIRTransactionHelper.java:43)\n\tat org.linuxforhealth.fhir.server.util.FHIRRestHelper.doPatchOrUpdate(FHIRRestHelper.java:502)\n\tat org.linuxforhealth.fhir.server.util.FHIRRestHelper.doUpdate(FHIRRestHelper.java:453)\n\tat org.linuxforhealth.fhir.server.spi.operation.FHIRResourceHelpers.doUpdate(FHIRResourceHelpers.java:225)\n\tat org.linuxforhealth.fhir.server.resources.Update.update(Update.java:76)\n\tat org.linuxforhealth.fhir.server.resources.Update$Proxy$_$$_WeldClientProxy.update(Unknown Source)\n\tat jdk.internal.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)\n\tat java.base\/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base\/java.lang.reflect.Method.invoke(Method.java:566)\n\tat com.ibm.ws.jaxrs20.cdi.component.JaxRsFactoryImplicitBeanCDICustomizer.serviceInvoke(JaxRsFactoryImplicitBeanCDICustomizer.java:350)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsServerFactoryBean.performInvocation(LibertyJaxRsServerFactoryBean.java:641)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.performInvocation(LibertyJaxRsInvoker.java:160)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:101)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.invoke(LibertyJaxRsInvoker.java:273)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:213)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.invoke(LibertyJaxRsInvoker.java:444)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:112)\n\tat org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)\n\tat org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)\n\tat org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)\n\tat org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)\n\tat org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:277)\n\tat com.ibm.ws.jaxrs20.endpoint.AbstractJaxRsWebEndpoint.invoke(AbstractJaxRsWebEndpoint.java:137)\n\tat com.ibm.websphere.jaxrs.server.IBMRestServlet.handleRequest(IBMRestServlet.java:146)\n\tat com.ibm.websphere.jaxrs.server.IBMRestServlet.doPut(IBMRestServlet.java:136)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:709)\n\tat com.ibm.websphere.jaxrs.server.IBMRestServlet.service(IBMRestServlet.java:96)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1258)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:746)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:193)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:98)\n\tat org.linuxforhealth.fhir.server.filter.rest.FHIRRestServletFilter.doFilter(FHIRRestServletFilter.java:170)\n\tat javax.servlet.http.HttpFilter.doFilter(HttpFilter.java:127)\n\tat com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)\n\tat com.ibm.ws.security.jaspi.JaspiServletFilter.doFilter(JaspiServletFilter.java:56)\n\tat com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1002)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1140)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1011)\n\tat com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:75)\n\tat com.ibm.ws.webcontainer40.servlet.CacheServletWrapper40.handleRequest(CacheServletWrapper40.java:85)\n\tat com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:938)\n\tat com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:281)\n\tat com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:1184)\n\tat com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:453)\n\tat com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:412)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:566)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:500)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:360)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:327)\n\tat com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:167)\n\tat com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:75)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:514)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:584)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:968)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1057)\n\tat com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:245)\n\tat java.base\/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base\/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base\/java.lang.Thread.run(Thread.java:840)\n","ext_appName":"fhir-server-webapp","ext_thread":"Default Executor-thread-503"} {"type":"liberty_message","host":"devlfhfhir-fhir-server-6b6bb796ff-nf6js","ibm_userDir":"\/opt\/ol\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"Commit global transaction failed. See server log for details","ibm_threadId":"0000023f","ibm_datetime":"2023-01-13T14:19:45.469+0000","module":"org.linuxforhealth.fhir.server.resources.FHIRResource","level":"SEVERE","ibm_sequence":"1673619585469_000000002368F","ibm_exceptionName":"org.linuxforhealth.fhir.persistence.exception.FHIRPersistenceDataAccessException","ibm_stackTrace":"org.linuxforhealth.fhir.persistence.exception.FHIRPersistenceDataAccessException: Commit global transaction failed. See server log for details [probeId=c0-a8-6b-8-325962b0-146d-4ba3-bb83-4e15e221e7ff]\n\tat org.linuxforhealth.fhir.persistence.jdbc.connection.FHIRUserTransactionAdapter.end(FHIRUserTransactionAdapter.java:143)\n\tat org.linuxforhealth.fhir.persistence.helper.FHIRTransactionHelper.commit(FHIRTransactionHelper.java:43)\n\tat org.linuxforhealth.fhir.server.util.FHIRRestHelper.doPatchOrUpdate(FHIRRestHelper.java:502)\n\tat org.linuxforhealth.fhir.server.util.FHIRRestHelper.doUpdate(FHIRRestHelper.java:453)\n\tat org.linuxforhealth.fhir.server.spi.operation.FHIRResourceHelpers.doUpdate(FHIRResourceHelpers.java:225)\n\tat org.linuxforhealth.fhir.server.resources.Update.update(Update.java:76)\n\tat org.linuxforhealth.fhir.server.resources.Update$Proxy$_$$_WeldClientProxy.update(Unknown Source)\n\tat jdk.internal.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)\n\tat java.base\/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base\/java.lang.reflect.Method.invoke(Method.java:566)\n\tat com.ibm.ws.jaxrs20.cdi.component.JaxRsFactoryImplicitBeanCDICustomizer.serviceInvoke(JaxRsFactoryImplicitBeanCDICustomizer.java:350)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsServerFactoryBean.performInvocation(LibertyJaxRsServerFactoryBean.java:641)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.performInvocation(LibertyJaxRsInvoker.java:160)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:101)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.invoke(LibertyJaxRsInvoker.java:273)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:213)\n\tat com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.invoke(LibertyJaxRsInvoker.java:444)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:112)\n\tat org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)\n\tat org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)\n\tat org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)\n\tat org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)\n\tat org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:277)\n\tat com.ibm.ws.jaxrs20.endpoint.AbstractJaxRsWebEndpoint.invoke(AbstractJaxRsWebEndpoint.java:137)\n\tat com.ibm.websphere.jaxrs.server.IBMRestServlet.handleRequest(IBMRestServlet.java:146)\n\tat com.ibm.websphere.jaxrs.server.IBMRestServlet.doPut(IBMRestServlet.java:136)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:709)\n\tat com.ibm.websphere.jaxrs.server.IBMRestServlet.service(IBMRestServlet.java:96)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1258)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:746)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:193)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:98)\n\tat org.linuxforhealth.fhir.server.filter.rest.FHIRRestServletFilter.doFilter(FHIRRestServletFilter.java:170)\n\tat javax.servlet.http.HttpFilter.doFilter(HttpFilter.java:127)\n\tat com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)\n\tat com.ibm.ws.security.jaspi.JaspiServletFilter.doFilter(JaspiServletFilter.java:56)\n\tat com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1002)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1140)\n\tat com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1011)\n\tat com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:75)\n\tat com.ibm.ws.webcontainer40.servlet.CacheServletWrapper40.handleRequest(CacheServletWrapper40.java:85)\n\tat com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:938)\n\tat com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:281)\n\tat com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:1184)\n\tat com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:453)\n\tat com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:412)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:566)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:500)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:360)\n\tat com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:327)\n\tat com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:167)\n\tat com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:75)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:514)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:584)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:968)\n\tat com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1057)\n\tat com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:245)\n\tat java.base\/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base\/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base\/java.lang.Thread.run(Thread.java:840)\n","ext_appName":"fhir-server-webapp","ext_thread":"Default Executor-thread-503"} {"type":"liberty_message","host":"devlfhfhir-fhir-server-6b6bb796ff-nf6js","ibm_userDir":"\/opt\/ol\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"Completed request[0.03460074 secs]: tenantId:[default] dsId:[default] user:[fhiruser] method:[PUT] uri:[https:\/\/dev-tergi.elga.gv.at\/fhir-server\/api\/v4\/CodeSystem\/elga-practicesetting] status:[500]","ibm_threadId":"0000023f","ibm_datetime":"2023-01-13T14:19:45.471+0000","module":"org.linuxforhealth.fhir.server.filter.rest.FHIRRestServletFilter","level":"INFO","ibm_sequence":"1673619585471_0000000023690","ext_appName":"fhir-server-webapp","ext_thread":"Default Executor-thread-503"} {"type":"liberty_message","host":"devlfhfhir-fhir-server-6b6bb796ff-nf6js","ibm_userDir":"\/opt\/ol\/wlp\/usr\/","ibm_serverName":"defaultServer","message":"Received request: tenantId:[default] dsId:[default] user:[fhiruser] method:[GET] uri:[https:\/\/localhost:9443\/fhir-server\/api\/v4\/$healthcheck]","ibm_threadId":"00000242","ibm_datetime":"2023-01-13T14:19:48.819+0000","module":"org.linuxforhealth.fhir.server.filter.rest.FHIRRestServletFilter","level":"INFO","ibm_sequence":"1673619588819_0000000023691","ext_appName":"fhir-server-webapp","ext_thread":"Default Executor-thread-506"}
lmsurpre commented 1 year ago

I believe its already fix in 5.1.0, but I'm delinquent in updating the helm chart to point at the latest fhir server release (which is now 5.1.1). will use this as the needed kick-in-butt to get that updated, thanks.

Nik-xT commented 1 year ago

Thank you, we are happy to offer ourselves as testers of the new helm chart.

lmsurpre commented 1 year ago

great, the proposed changes are at https://github.com/LinuxForHealth/lfh-helm/pull/3 ...it was a bigger change than I was hoping but I think it will be good. feedback welcome. otherwise i'll plan to merge it later today and then "0.9.0" will be the published version of the chart

Nik-xT commented 1 year ago

We had some spare time today to test the chart and do have some troubles: PS C:\Users\ntanjga.ELGA> helm install devlfhfhir linuxforhealth/fhir-server --namespace devfhir --set tolerations[0].key=forTestsOnly,tolerations[0].operator=Exists,nodeSelector.perform=onlyTests,postgresql.postgresqlPassword=[enter-password-here],ingress.enabled=false,exposeHttpEndpoint=true leads to Error: template: fhir-server/templates/schematool.yaml:88:27: executing "fhir-server/templates/schematool.yaml" at <include "fhir.database.adminPasswordKey" $>: error calling include: template: fhir-server/templates/_helpers.tpl:120:56: executing "fhir.database.adminPasswordKey" at <.Subcharts.postgresql>: nil pointer evaluating interface {}.postgresql

With helm install devlfhfhir linuxforhealth/fhir-server --namespace devfhir --set tolerations[0].key=forTestsOnly,tolerations[0].operator=Exists,nodeSelector.perform=onlyTests,postgresql.postgresqlPassword=[enter-password-here],ingress.enabled=false,exposeHttpEndpoint=true --version 0.8.2 everything works fine.

Is adminPasswordKey the new postgresqlPassword? What do we miss?

lmsurpre commented 1 year ago

Shoot, I tried to summarize the changes in https://github.com/LinuxForHealth/lfh-helm/pull/3 and the README, but it looks like I missed the section near the top with the sample usage.

Basically the underlying postgresql subchart changed and so I updated the values to align with that. postgresql.postgresqlPassword was actually a value of that subchart but that one doesn't exist any longer.

Is adminPasswordKey the new postgresqlPassword?

Not quite. In the upgraded postgresql subchart, they grouped the auth-related values under a new dictionary named "auth" and so this property is now postgresql.auth.postgresPassword.

Where adminPasswordKey comes in is that they save this password in a kubernetes secret and we use the value of adminPasswordKey to know which value from that secret to use.

I did test with the embedded postgresql subchart, but its very possible I missed something if you're bringing your own postgres instead; let me know.

lmsurpre commented 1 year ago

actually, looking at your helm install command, it seems like you are using the embedded postgresql... but from the error it seems like maybe its using the old postgresql subchart still? did you do a helm repo update before trying the install?

FWIW, when I try with the command you sent, it seems to work fine on my end:

helm template fhir-server linuxforhealth/fhir-server --set 'tolerations[0].key=forTestsOnly,tolerations[0].operator=Exists,nodeSelector.perform=onlyTests,postgresql.postgresqlPassword=test,ingress.enabled=false,exposeHttpEndpoint=true'

although like i noted it won't actually use that postgresql.postgresqlPassword value any longer... that is now postgresql.auth.postgresqlPassword

Nik-xT commented 1 year ago

I think it has something to do with our helm version, its v3.6.2 right now. With 3.7 some new subchart variables for secrets are introduced, the nil pointer evaluating interface {}.postgresql-part let it seem like that. Will ask our k8s-provider to update that. Be back with more info.

lmsurpre commented 1 year ago

ah yes, thats a good find.
we now use the ability to execute a helper in the context of a subchart which was added in helm 3.7 (see https://stackoverflow.com/questions/47791971/how-can-you-call-a-helm-helper-template-from-a-subchart-with-the-correct-conte/69515809#69515809)

helm 3.7 came out in september of 2021, so I thought this would be safe to use now. keep us posted.

Nik-xT commented 1 year ago

Had some time to get back to our issue. Updated helm and the helm upgrade went through. Had some issues with postgres, not sure anymore if i still have the right keys from back than. Didn't matter: we have something like an integration test with our real data, that fully assembles a fhir server with our needed data. Timestamps will be wrong, but we do not mind. It's running right now, looking good. Thanks again for the help!