OHDSI Home | Forums | Wiki | Github

Unable to start WebAPI app

I thank you all for your help in advance. I’m a new OHDSI user and am trying to get WebAPI (and eventually ATLAS) running on an AWS EC2 instance with:

  • Ubuntu 22.04
  • Java 1.8.0_342
  • Tomcat 8.5.82
  • WebAPI v2.10.1

and connecting to a postgreSQL 14.2 database on an AWS RDS instance.

I can:

  • see the Tomcat landing page at <EC2 address>:8080 from another computer
  • connect to the postgreSQL database from my EC2 instance as user ohdsi_admin_user using psql
  • build the WebAPI.war file and deploy it to /opt/tomcat8/webapps
  • see the WebAPI app listed (as not running) on <EC2 address>:8080/manager/html

However, <EC2 address>:8080/WebAPI/info returns a 404 error, and I see the following errors in the /opt/tomcat8/logs/catalina.out file:

26-Aug-2022 21:14:07.254 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.82
26-Aug-2022 21:14:07.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Aug 8 2022 21:26:07 UTC
26-Aug-2022 21:14:07.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.82.0
26-Aug-2022 21:14:07.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
26-Aug-2022 21:14:07.257 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            5.15.0-1017-aws
26-Aug-2022 21:14:07.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
26-Aug-2022 21:14:07.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-8-openjdk-amd64/jre
26-Aug-2022 21:14:07.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_342-8u342-b07-0ubuntu1~22.04-b07
26-Aug-2022 21:14:07.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Private Build
26-Aug-2022 21:14:07.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/tomcat8
26-Aug-2022 21:14:07.258 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/tomcat8
26-Aug-2022 21:14:07.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat8/conf/logging.properties
26-Aug-2022 21:14:07.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
26-Aug-2022 21:14:07.259 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
26-Aug-2022 21:14:07.260 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom
26-Aug-2022 21:14:07.260 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
26-Aug-2022 21:14:07.260 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
26-Aug-2022 21:14:07.260 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
26-Aug-2022 21:14:07.260 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512M
26-Aug-2022 21:14:07.260 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024M
26-Aug-2022 21:14:07.261 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParallelGC
26-Aug-2022 21:14:07.261 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
26-Aug-2022 21:14:07.261 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat8
26-Aug-2022 21:14:07.261 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat8
26-Aug-2022 21:14:07.261 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat8/temp
26-Aug-2022 21:14:07.262 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
26-Aug-2022 21:14:07.335 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
26-Aug-2022 21:14:07.345 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-8080]]
        org.apache.catalina.LifecycleException: Protocol handler initialization failed
                at org.apache.catalina.connector.Connector.initInternal(Connector.java:1115)
                at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
                at org.apache.catalina.core.StandardService.initInternal(StandardService.java:571)
                at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
                at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:874)
                at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
                at org.apache.catalina.startup.Catalina.load(Catalina.java:646)
                at org.apache.catalina.startup.Catalina.load(Catalina.java:669)
                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.apache.catalina.startup.Bootstrap.load(Bootstrap.java:305)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        Caused by: java.net.BindException: Address already in use
                at sun.nio.ch.Net.bind0(Native Method)
                at sun.nio.ch.Net.bind(Net.java:461)
                at sun.nio.ch.Net.bind(Net.java:453)
                at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:222)
                at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
                at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:225)
                at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:201)
                at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1221)
                at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1234)
                at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:230)
                at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:633)
                at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80)
                at org.apache.catalina.connector.Connector.initInternal(Connector.java:1112)
                ... 13 more
26-Aug-2022 21:14:07.346 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 541 ms
26-Aug-2022 21:14:07.376 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
26-Aug-2022 21:14:07.377 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.82]
26-Aug-2022 21:14:07.411 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat8/webapps/WebAPI.war]
26-Aug-2022 21:14:07.426 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
26-Aug-2022 21:14:15.216 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

 :: Spring Boot ::       (v1.5.22.RELEASE)

2022-08-26 21:14:16.412 INFO localhost-startStop-1 org.ohdsi.webapi.WebApi -  - Starting WebApi on ip-172-31-93-41 with PID 2562 (/opt/tomcat8/webapps/WebAPI/WEB-INF/classes started by tomcat in /)
2022-08-26 21:14:16.413 INFO localhost-startStop-1 org.ohdsi.webapi.WebApi -  - The following profiles are active: default
2022-08-26 21:14:16.499 INFO localhost-startStop-1 org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext -  - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39157dfc: startup date [Fri Aug 26 21:14:16 UTC 2022]; root of context hierarchy
2022-08-26 21:14:16.639 INFO background-preinit org.hibernate.validator.internal.util.Version -  - HV000001: Hibernate Validator 5.4.2.Final
2022-08-26 21:14:18.368 INFO localhost-startStop-1 org.springframework.beans.factory.support.DefaultListableBeanFactory -  - Overriding bean definition for bean 'jobBuilders' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration; factoryMethodName=jobBuilders; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/batch/core/configuration/annotation/SimpleBatchConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=jobConfig; factoryMethodName=jobBuilders; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/ohdsi/webapi/JobConfig.class]]
2022-08-26 21:14:18.599 INFO localhost-startStop-1 org.springframework.beans.factory.support.DefaultListableBeanFactory -  - Overriding bean definition for bean 'requestContextFilter' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.class]] with [Root bean: class [org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2022-08-26 21:14:18.950 INFO localhost-startStop-1 org.springframework.integration.config.IntegrationRegistrar -  - No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2022-08-26 21:14:19.569 INFO localhost-startStop-1 org.springframework.integration.config.DefaultConfiguringBeanFactoryPostProcessor -  - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2022-08-26 21:14:19.596 INFO localhost-startStop-1 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor -  - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2022-08-26 21:14:19.677 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker -  - Bean 'converterConfiguration' of type [org.ohdsi.webapi.ConverterConfiguration$$EnhancerBySpringCGLIB$$fc50fd43] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-26 21:14:19.698 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker -  - Bean 'conversionService' of type [org.springframework.core.convert.support.DefaultConversionService] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-26 21:14:20.008 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker -  - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$95b5d5f7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-26 21:14:20.274 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker -  - Bean 'shiroConfiguration' of type [org.ohdsi.webapi.ShiroConfiguration$$EnhancerBySpringCGLIB$$da243bf2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-26 21:14:20.291 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker -  - Bean 'flywayConfig' of type [org.ohdsi.webapi.FlywayConfig$$EnhancerBySpringCGLIB$$9859884b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-26 21:14:21.039 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker -  - Bean 'secondaryDataSource' of type [org.apache.tomcat.jdbc.pool.DataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-26 21:14:21.059 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker -  - Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$77a97957] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-26 21:14:21.220 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker -  - Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-26 21:14:21.235 INFO localhost-startStop-1 org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker -  - Bean 'dataSourceInitializer' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-08-26 21:14:21.332 INFO localhost-startStop-1 org.flywaydb.core.internal.util.VersionPrinter -  - Flyway 4.2.0 by Boxfuse
Aug 26, 2022 9:14:21 PM org.apache.tomcat.jdbc.pool.ConnectionPool init
SEVERE: Unable to create initial connections of pool.
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'ohdsi_admin_user'. ClientConnectionId:9d3f216b-f812-4936-bc85-343cedc1a3fb
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
        at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:283)
        at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:129)
        at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:37)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:5333)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:4066)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:85)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:4004)
        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7418)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3272)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2768)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2418)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2265)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1291)
        at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:881)
        at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
        at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
        at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
        at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
        at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
        at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:51)
        at org.flywaydb.core.Flyway.execute(Flyway.java:1418)
        at org.flywaydb.core.Flyway.migrate(Flyway.java:971)
        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.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1759)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1696)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1626)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:211)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1177)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1072)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:237)
        at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:703)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:527)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:300)
        at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
        at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)
        at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1016)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)

2022-08-26 21:14:21.614 WARN localhost-startStop-1 org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext -  - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilter' defined in class path resource [org/ohdsi/webapi/ShiroConfiguration.class]: Unsatisfied dependency expressed through method 'shiroFilter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/ohdsi/webapi/FlywayConfig.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.dbsupport.FlywaySqlException:
Unable to obtain Jdbc connection from DataSource

SQL State  : S0001
Error Code : 18456
Message    : Login failed for user 'ohdsi_admin_user'. ClientConnectionId:9d3f216b-f812-4936-bc85-343cedc1a3fb
.
.
.
26-Aug-2022 21:14:21.640 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat8/webapps/WebAPI.war] has finished in [14,228] ms
26-Aug-2022 21:14:21.641 INFO [localhost-startStop-1] 

I’ve been focusing on the error Login failed for user 'ohdsi_admin_user', but wonder if that’s more of a symptom than a cause.

I followed the installation instructions on WebAPI Installation Guide · OHDSI/WebAPI Wiki · GitHub and PostgreSQL Installation Guide · OHDSI/WebAPI Wiki · GitHub with (as far as I can tell) just one deviation: the option to grant the ohdsi_admin group permission to initiate streaming replication and backups is not available on an RDS instance.

I’d greatly appreciate your suggestions as to how to correct my WebAPI installation.

Thanks,
Kevin

I think 2 things are at play: you already have a service running on port 8080 (maybe some other HTTP service?) and the WebAPI tries to start up and bind to port 8080, and it’s already in use.

So first issue is to figure out what’s conflicting and change one or the other so that they don’t conflict.

This second issue is definitely a login failure. Why does it look like you are using MSSqlServer JDBC but you indicated that you are using PostgreSQL?

Chris:
Many thanks for your reply.

Prompted by your observation, I’ve shifted the server.port setting in the WebAPI file settings.xml to 8000 and no longer see Address already in use errors in the log.

With regard to the JDBC connections, I’m using both MS SQL Server (to communicate with a read-only records database) and PostgreSQL (to reach a separate database where I can create users, tables and schema). And you’ve raised an important point: if I’ve specified PostgreSQL for use with user ohdsi_admin_user, why am I getting an error in com.microsoft.sqlserver.jdbc.SQLServerConnection.logon with ohdsi_admin_user?

Many thanks,
Kevin

Chris:

Your answer to another question suggested checking the file webapps/WebAPI/WEB-INF/classes/application.properties to ensure its settings were correct. In my case, both the flyway.datasource and security.datasource settings were incorrectly pointed at the MS SQL Server database, not the PostgreSQL db. I’ve edited the file & that eliminated the Login failed errors.

Still have further errors, which I’m investigating.

Did I miss some setting to allow the WebAPI build process to accommodate separate databases for primary and application uses?

Thanks,
Kevin

I’m sorry, I don’t know what ‘accommodate separate databases for primary and application uses’ means. Can you explain?

Chris:

I mean using one database for the datasource (using the terms in the settings.xml file) which WebAPI only reads and a different db for the flyway.datasource, which WebAPI is allowed to modify. It seems all the profiles in pom.xml are defined so that the <flyway.datasource> just copies the <datasource> settings.

In my own local copy I’ve added a new <profile> in pom.xml that allows us to separately define the datasource and flyway.datasource settings. (But it’s hard to imagine this is the first time anyone’s wanted to do run WebAPI with two databases of different types, so it feels like I’m doing things the hard way.)

Many thanks,
Kevin

These are not intended to be different databases. The flyway configuration is the identity that has elevated permissions to the webAPI schema to create tables, while the datasource is the runtime identity that will read/write data to the database (ie: cohort definitions, generation status, etc).

Even tho there is a flyway datasource URL, it should be the same as datasource.url…I think the reason for the duplication is that the administrative url may need additional parameters in some cases so we put in a secondary flyway url setting. But the intent that it is the same database that the flyway connection uses should be the same database as the one specified in datasource.

-Chris

Ah–thanks for clearing that up.

Kevin

t