docker-freepbx icon indicating copy to clipboard operation
docker-freepbx copied to clipboard

Error when specifying a non-standard port in K8S

Open VarionDrakon opened this issue 1 year ago • 0 comments

Hello, when I try to specify a different port other than 3306, I get this error: SQLSTATE[HY000] [2002] Connection refused::SQLSTATE[HY000] [2002] Connection refused

I use: https://hub.docker.com/r/tiredofit/mariadb https://hub.docker.com/r/tiredofit/freepbx

Mariadb is configured to listen on port 30306. Pinged with various programs and even connected from the FreePBX pod using this command:

[tiredofit/debian:7.3.4 19:36:33] # mysql -h XXX -P 30306 -uXXX -pXXX
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 10.6.7-MariaDB Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

Environment variables from FreePBX:

  db_host: XXX
  db_port: "30306"
  db_name: XXX
  db_user: XXX
  db_pass: XXX
  rtp_start: "18000"
  rtp_finish: "19000"
  enable_fail2ban: "false"
  enable_fop: "true"
  enable_ssl: "false"
  ucp_first: "true"

Environment variables from MariaDB:

  data_path: /var/lib/mysql/
  log_path: /logs/
  db_auto_upgrade: "true"
  db_configuration: standard
  listen_port: "3306"
  root_pass: XXX
  create_db: "true"
  db_name: XXX
  db_user: XXX
  db_pass: XXX
  enable_log_error: "true"
  enable_log_general_query: "false"
  enable_slow_query_log: "true"
  log_file_error: mariadb_error.log
  log_file_general_query: mariadb_general.log
  log_file_slow_query: mariadb_general.log
  log_level: "2"
  debug_mode: "false"

And service mariaDB:

  type: NodePort
  selector:
    app: mariadb-app
  ports:
  - name: mysql
    protocol: TCP
    port: 3306
    targetPort: 3306
    nodePort: 30306

P.S.> Where XXX is intentionally hidden information. @tiredofit What could this be related to?

VarionDrakon avatar Jul 21 '23 19:07 VarionDrakon