Install Foundry in Docker doesn't complete DB connection failed

Please complete the details below then remove this line:


**Volt MX Version: v10 **
Operating System: Mac M3 Docker
Database (if appropriate): MySQL
Server: Tomcat

Docker - Version. 4.43.1 (198352)

Problem/Query:

Installing the Container version os 10.0.0.0_GA, using silent mode. The installation script can’t connect to MySQL.

Anyone having this same issue?

Prompt response

Performing Docker login…
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get “https://hclcr.io/v2/”: unauthorized:
[+] Pulling 2/2
:check_mark: foundry_mysql Pulled 0.8s
:check_mark: flyway Pulled 0.6s
[+] Running 2/2
:check_mark: Container foundry-mysql Started 0.1s
:check_mark: Container flyway-23532 Started 0.2s
Waiting for DB migrations to complete (this may take upto 10 minutes)…
openjdk version “11.0.13” 2021-10-19
OpenJDK Runtime Environment 18.9 (build 11.0.13+8)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.13+8, mixed mode, sharing)
Sep 02, 2025 11:31:46 PM com.konylabs.middleware.common.ServerPropertiesUtil
INFO: Reading the properties file
java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:111)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:98)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:90)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:64)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:74)
at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:885)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:810)
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:438)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:189)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
at com.kony.fabric.containers.db.DatabaseHelper.getDatabaseConnection(DatabaseHelper.java:82)
at com.kony.fabric.containers.db.DatabaseHelper.checkIfDBExists(DatabaseHelper.java:27)
at com.kony.fabric.containers.db.DatabaseHelper.createDatabases(DatabaseHelper.java:92)
at com.kony.fabric.containers.action.CreateFabricDatabaseSchemasAction.main(CreateFabricDatabaseSchemasAction.java:26)
Caused by: com.mysql.cj.exceptions.CJException: Access denied for user ‘root’@‘172.18.0.3’ (using password: YES)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:104)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:149)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:127)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:848)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:771)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:740)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:157)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.proceedHandshakeWithPluggableAuthentication(NativeAuthenticationProvider.java:471)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:215)
at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1428)
at com.mysql.cj.NativeSession.connect(NativeSession.java:133)
at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:829)
… 10 more
java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:111)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:98)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:90)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:64)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:74)
at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:885)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:810)
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:438)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:189)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
at com.kony.fabric.containers.db.DatabaseHelper.getDatabaseConnection(DatabaseHelper.java:82)
at com.kony.fabric.containers.db.DatabaseHelper.executeSqlQueries(DatabaseHelper.java:61)
at com.kony.fabric.containers.db.DatabaseHelper.createDatabase(DatabaseHelper.java:78)
at com.kony.fabric.containers.db.DatabaseHelper.createDatabases(DatabaseHelper.java:94)
at com.kony.fabric.containers.action.CreateFabricDatabaseSchemasAction.main(CreateFabricDatabaseSchemasAction.java:26)
Caused by: com.mysql.cj.exceptions.CJException: Access denied for user ‘root’@‘172.18.0.3’ (using password: YES)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:104)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:149)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:127)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:848)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:771)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:740)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:157)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.proceedHandshakeWithPluggableAuthentication(NativeAuthenticationProvider.java:471)
at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:215)
at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1428)
at com.mysql.cj.NativeSession.connect(NativeSession.java:133)
at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:829)
… 11 more
ERROR: Unable to obtain connection from database (jdbc:mysql://foundry-mysql:3306/?allowPublicKeyRetrieval=true&relaxAutoCommit=true&autoReconnect=true) for user ‘root’: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

SQL State : 08001
Error Code : 0
Message : Could not create connection to database server. Attempted reconnect 3 times. Giving up.

Caused by: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Caused by: com.mysql.cj.exceptions.CJException: Access denied for user ‘root’@‘172.18.0.3’ (using password: YES)

Error occured while executing DB migrations.

Check FoundIns10/flyway-23532/dbmigration-020925193114.log for more information

Installation log is as follows:

Preparing DB variables…
DB_TYPE=mysql
DB_HOST=foundry-mysql
DB_PORT=3306
DB_USER=root
DB_INSTANCE=
DB_SERVICE=
DB_CONNECTION_PARAMS=?allowPublicKeyRetrieval=true&relaxAutoCommit=true&autoReconnect=true
Chosen database type: mysql
Creating Foundry Schemas…
Failed to check if Database: v10mfconsoledb exists
Creating database v10mfconsoledb
Failed to execute CREATE DATABASE IF NOT EXISTS v10mfconsoledb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
DB create status: false
Created mysql databases
Command : migrate
Performing migrate for Accounts database…
Database connection URL: jdbc:mysql://foundry-mysql:3306/?allowPublicKeyRetrieval=true&relaxAutoCommit=true&autoReconnect=true
WARNING: This version of Flyway is out of date. Upgrade to Flyway 11.11.2: Release Notes for Flyway Engine - Redgate Flyway - Product Documentation

Flyway Community Edition 9.22.3 by Redgate
See release notes here: Release Notes for Flyway Engine - Redgate Flyway - Product Documentation

Hi Arthur,
Please share your config.properties file so the issue can be further diagnosed.

Thank you!

Hi Mark,

Here is the config.properties I’m using.

#-------------------------------------------------------------------------------
# Installation Environment name, in lowercase (String)
# Ex: dev, qa, prod, eastusprod
INSTALL_ENV_NAME=artest	
#-------------------------------------------------------------------------------

#This should correspond to the Foundry Docker image version you are planning to install/upgrade
#The Foundry Docker images are available at https://hclcr.io/harbor/projects/47/repositories.
#If you are not sure about the version of Foundry to install/upgrade, please contact HCL support.
#This value should be in the format "9.2.0.0_GA"
FABRIC_BUILD_VERSION=10.0.0.0_GA
FABRIC_DATABASE_BUILD_VERSION=10.0.0.0_GA

# To download the image from the HCL Harbor site, please provide the following details:
# - IMAGE_REGISTRY_USERNAME: This is the email ID you use to log in.
# - IMAGE_REGISTRY_PASSWORD: This is the CLI secret found under your User Profile in HCL Harbor.
IMAGE_REGISTRY_USERNAME=arthur.nobrega@hcl.com
IMAGE_REGISTRY_PASSWORD=@Orlando21
#-------------------------------------------------------------------------------

#Set this to PRODUCTION for Production deployment. NON-PRODUCTION for DEV/QA or other non-production environments
FABRIC_BUILD_TYPE=NON-PRODUCTION
#-------------------------------------------------------------------------------

### Application Server Details ###

# Domain name for Volt Foundry (String)
# This value should not be IP address or 'localhost'
SERVER_DOMAIN_NAME=localhost

# Port for Volt Foundry (Recommended Port : 8080)
SERVER_PORT=8080

# JPDA_PORT by default it's value is 8000
JPDA_PORT=8000

# Communication protocol for Volt Foundry
# This value can be "http"/"https"
COM_PROTOCOL=http
# Path to the existing Keystore file. This can be empty for http.
# This should point to valid jks file.
KEYSTORE_FILE=
KEYSTORE_FILE_PASS=
# Need incase of Encrypted KEYSTORE_FILE_PASS
KEYSTORE_FILE_PASS_SECRET_KEY=
#-------------------------------------------------------------------------------

### Database details ###

# Database type which you want to use for Volt Foundry (String)
# Possible values:
#   "mysql" for MySQL DB server
#   "mysqlcluster" for MySQL DB Cluster server
#   "sqlserver" for Azure MSSQL or SQLServer
#   "oracle" for Oracle DB server
DB_TYPE=mysql

# This value can be true/false and when the value is true, MySQL 8.0.31 will come with Foundry Scripts.
# Please note that the DB_HOST, DB_PORT and DB_USER will be defaulted for MySQL Container and need not be entered.
IS_MYSQL_CONTAINER_REQUIRED=true

# Database server hostname (String)
DB_HOST=

# Database server port number (Number). This can be empty for cloud manage service.
DB_PORT=

# Database server user (String)
DB_USER=

# Database server password (String)
# Please ensure the password is enclosed in single quotes.
DB_PASS='v10password'
# Need incase of Encrypted DB_PASS
DB_PASS_SECRET_KEY=

#Below DB_PREFIX and DB_SUFFIX are optional inputs.
#If inputs are not specified, schemas are created as for example 'admindb'
#If inputs are specified DB_PREFIX=fabric and DB_SUFFIX=container, 
# schemas are created as for example 'fabricadmindbcontainer'
# Database server prefix for Volt Foundry schemas/tables (String)
DB_PREFIX=v10

# Database server suffix for Volt Foundry schemas/tables (String)
DB_SUFFIX=

# If DB_TYPE is "oracle", following values need to be set
# Database Data tablespace name (String)
DB_DATA_TS=

# Database Index tablespace name (String)
DB_INDEX_TS=

# Database LOB tablespace name (String)
DB_LOB_TS=

# Database service name (String)
DB_SERVICE=

# Use existing databases from a previous Volt Foundry instance? (Y/N)
USE_EXISTING_DB=N

# If using existing databases, provide the location of the previous installed artifacts(location should contain upgrade.properties)
# Ex: /c/voltmx-foundry-containers-onprem
PREVIOUS_INSTALL_LOCATION=

#-------------------------------------------------------------------------------

### Volt Foundry Account Registration Details ###
# If Owner registration required, use OWNER_REGISTRATION_REQUIRED=Y and fill
# below details for registering the owner for Volt Foundry

# Owner registration required? Y/N
OWNER_REGISTRATION_REQUIRED=N

# User email (String)
OWNER_USER_ID=

# User password (String)
OWNER_PASSWORD=

# User first name (String)
OWNER_FIRST_NAME=

# User last name (String)
OWNER_LAST_NAME=

# Environment name with which user needs to be registered (String)
OWNER_ENV_NAME=

#-------------------------------------------------------------------------------

### Time Zone ###
# Time_Zone variable needs to be set to maintain consistency for the Application server
# and the Database server. Default value of Time_Zone is set to UTC.
# Refer https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for Time Zone (TZ*) values.
TIME_ZONE=

#-------------------------------------------------------------------------------

# Custom JAVA_OPTS for Tomcat (String)
CUSTOM_JAVA_OPTS=""

Hi Arthur,
Thank you for sharing the file. The SERVER_DOMAIN_NAME is set to localhost. Can you please change it to the IP address or hostname? The setting of localhost is causing the failure.

Thank you,
Mark

Hi Mark,
Thanks for your response.
Neither the IP nor the hostname worked for *SERVER_DOMAIN_NAME. Same errors and logs.

Seems to be a DB password issue:

Access denied for user ‘root’@‘172.18.0.3’ (using password: YES)

ERROR: Unable to obtain connection from database (jdbc:mysql://foundry-mysql:3306/?allowPublicKeyRetrieval=true&relaxAutoCommit=true&autoReconnect=true) for user ‘root’: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

SQL State : 08001
Error Code : 0
Message : Could not create connection to database server. Attempted reconnect 3 times. Giving up.

Any suggestions?

Deleting the mysqldata folder solved the problem.

1 Like

Hey Arthur,
Can you check to ensure that you are not using a forbidden special character in the password:

If that is not the issue, members of the Foundry development team in Hyderabad would like to schedule a meeting with you.

Thank you,
Mark