Error when starting Docker App-Only container
I am trying to install into a container using the App-Only image with the following reference, but I am getting an error and am unable to proceed.
https://wiki.yellowfinbi.com/display/yfcurrent/Install+in+a+Container
https://wiki.yellowfinbi.com/display/yfcurrent/Single+Instance+with+App-Only+Image
First I did a fresh install using the Yellowfin installer. I used postgres as the repository database.The attached image is a screenshot of the installation. postgres host is localhost and port number is 15432. (Sorry the image is in Japanese)
Next, I pulled the Yellowfin 9.7.1.1 App-Only image from Docker Hub.
docker pull yellowfinbi/yellowfin-app-only:9.7.1.1
I then created docker-compose.yaml with the following contents.
version: '3' services: yellowfin-standalone-single-instance: ports: - "8081:8081" environment: - JDBC_CLASS_NAME=org.postgresql.Driver - JDBC_CONN_URL=jdbc:postgresql://localhost:15432/yellowfin - JDBC_CONN_USER=test - JDBC_CONN_PASS=password - JDBC_CONN_ENCRYPTED=false image: "yellowfinbi/yellowfin-app-only:9.7.1.1" container_name: yellowfin_9711
Next, I launched the Yellowfin container.
docker compose up -d
However, Yellowfin failed to start.While monitoring the logs during startup, the log output stopped for several minutes in the following areas.
=================== i4 JDBC Connection Pool ================================ | | Description : Connection Pool | JDBC Driver : org.postgresql.Driver | Url : jdbc:postgresql://localhost:15432/yellowfin | User : test | Min Count : 2 | Max Count : 25 | Recycle : null | Timeout : null | PS Cache Size: null | JDBC Fetch Size: null | Isolation Level: null | Heart Beat: true | No Verify: false | No Lock: false | | JDBCFetchSize parameter could not be parsed
Later, when log output resumed, the following exception occurred.
java.lang.Exception: Failed to create DBConnectionPool at com.hof.pool.DBConnectionPool.createJDBCPool(DBConnectionPool.java:575) at com.hof.pool.DBConnectionManager.initialiseAppPool(DBConnectionManager.java:455) at com.hof.servlet.InitConnectionPool.init(InitConnectionPool.java:248) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1164) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1117) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1010) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5264) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:690) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1889) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:583) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1618) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:946) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) 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:566) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476) Caused by: org.postgresql.util.PSQLException: Connection to localhost:15432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:285) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:217) at org.postgresql.Driver.makeConnection(Driver.java:458) at org.postgresql.Driver.connect(Driver.java:260) at com.hof.pool.JDBCConnection.openConnection(JDBCConnection.java:181) at com.hof.pool.DBConnection.authenticateAndOpenConnection(DBConnection.java:127) at com.hof.pool.DBConnectionPool.A(DBConnectionPool.java:1284) at com.hof.pool.DBConnectionPool.createJDBCPool(DBConnectionPool.java:551) ... 46 more Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.base/java.net.Socket.connect(Socket.java:609) at org.postgresql.core.PGStream.<init>(PGStream.java:81) at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:93) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:197) ... 54 more | Performing JDBC connections...ERROR | | Exception details: java.lang.Exception: Failed to create DBConnectionPool ======================================================================== YF:2022-04-28 08:41:51.145: INFO (DBConnectionManager) - [1] [Background] [STARTUP] DBConnectionManager shutting down YF:2022-04-28 08:41:51.145: INFO (DBConnectionManager) - [1] [Background] [STARTUP] DBConnectionManager completed shutdown
From the logs, it appears that I am being asked to specify a JDBC Fetch Size, but the wiki above does not list that option.
How can I start a container for my app-only image?
Hi Hiroyuki,
Is this your first time setting up the app-only Docker image? One thing that I've noticed is missing from our guides is that when using postgres, you need to allow 'external' connections in Postgres' configuration file pg_hba.conf
The file should be located in your PostgreSQL install folder, e.g. C:\Databases\pg_hba.conf
Make a backup of the file and then change it to
Hopefully that resolves the issue.
Kind regards,
Chris
Hi Hiroyuki,
Is this your first time setting up the app-only Docker image? One thing that I've noticed is missing from our guides is that when using postgres, you need to allow 'external' connections in Postgres' configuration file pg_hba.conf
The file should be located in your PostgreSQL install folder, e.g. C:\Databases\pg_hba.conf
Make a backup of the file and then change it to
Hopefully that resolves the issue.
Kind regards,
Chris
Replies have been locked on this page!