App Refused Connection [Mariadb]

I’ve deploy bitnami/mariadb-galera:10.8.6 which started fine but when trying to connect from an external mysql DB manager I get the following error:

proxy[3366ff4b] yyz [error] Error: app refused connection

My Fly.toml

app = "app-name"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[build]
  image = "bitnami/mariadb-galera:10.8.6"

[env]
  MARIADB_EXTRA_FLAGS = "--wsrep_provider_options=ist.recv_addr=app-name.fly.dev:4568;ist.recv_bind=0.0.0.0:4568 --wsrep_node_incoming_address=app-name.fly.dev --wsrep_sst_receive_address=app-name.fly.dev -p 3306:3306,4444:4444,4567:4567,4568:4568"
  MARIADB_GALERA_CLUSTER_ADDRESS = "gcomm://app-name.fly.dev"
  MARIADB_GALERA_CLUSTER_BOOTSTRAP = "yes"
  MARIADB_GALERA_CLUSTER_NAME = "appwrite-cluster"
  MARIADB_GALERA_MARIABACKUP_PASSWORD = "backup-password"
  MARIADB_GALERA_NODE_ADDRESS = "app-name.fly.dev"
  MARIADB_REPLICATION_USER = "replication-user"
  MARIADB_USER = "root"
  MARIADB_PASSWORD = "test-password"
  MARIADB_ROOT_PASSWORD = "test-password"

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[mounts]
  destination = "/bitnami/mariadb-galera"
  source = "data"

[[services]]
  internal_port = 3306
  protocol = "tcp"
  processes = ["app"]
  [services.concurrency]
    hard_limit = 200
    soft_limit = 190
    type = "connections"

  [[services.ports]]
    handlers = []
    port = 3306

This might be similar to my issue, which turned out to be due to the recent release of shared IPs:

You can check whether your app currently has a dedicated IP or shared IP by running flyctl ips list. The TYPE column says “public” for a dedicated IP and “public (shared)” for a shared IP.

I would try and SSH into your instance (fly ssh console -a app-name) and then listing open ports (lsof -i) to see if your cluster is binding to all addresses (0.0.0.0 or ::).

The MariaDB docs seem to indicate that’s the default, but usually a Connection Refused error can indicate that nothing is listening on the address we’re trying to connect to.