Docker/Podman - Cannot get MySQL connection to work

616 views
Skip to first unread message

Russell Jones

unread,
Mar 16, 2022, 12:26:52 PM3/16/22
to rundeck-discuss
Hi all,

I am struggling to get the Docker container to be able to login to the MariaDB container. The error I am getting is:

[2022-03-16T16:15:32,504] ERROR pool.ConnectionPool - Unable to create initial connections of pool.
java.sql.SQLException: Driver:org.mariadb.jdbc.Driver@58486deb returned null for URL:"jdbc:mysql://127.0.0.1:3306/rundeck?autoReconnect=true&useSSL=false"

Googling that error is telling me it believes the URL is in a bad format, or that it does not recognize the driver.

Below is my podman-compose file. Do y'all see anything wrong with it? What am I messing up?

Thanks!

services:
  mariadb:
    image: ghcr.io/linuxserver/mariadb
    container_name: mariadb
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - TZ=America/Chicago
    volumes:
      - /data/mysql-data:/config
    network_mode: host
  rundeck:
    image:  docker://rundeck/rundeck:3.4.10
    container_name: rundeck
    volumes:
      - /data/rundeck-data:/home/rundeck/server/data
    environment:
      - RUNDECK_DATABASE_DRIVER=org.mariadb.jdbc.Driver
      - RUNDECK_DATABASE_USERNAME="rundeckuser"
      - RUNDECK_DATABASE_PASSWORD="rundeckpassword"
      - RUNDECK_DATABASE_URL="jdbc:mysql://127.0.0.1:3306/rundeck?autoReconnect=true&useSSL=false"
    network_mode: host
    depends_on:
      - mariadb

Russell Jones

unread,
Mar 16, 2022, 12:45:10 PM3/16/22
to rundeck-discuss
Replying back for benefit of others - Got this solved. It was the double quotes around my URL causing the issue. :-)
Reply all
Reply to author
Forward
0 new messages