dulao5 / laravel-on-ecs-sample

laravel on ecs sample
0 stars 0 forks source link

proxysql error #1

Open dulao5 opened 1 year ago

dulao5 commented 1 year ago

proxysql error:

Parse error at /etc/proxysql.cnf:49 - syntax error

source code : https://github.com/dulao5/laravel-on-ecs-sample/blob/main/docker/proxysql/entrypoint.sh#L4

ecs log:


  | 2023-04-26T23:36:59.285+09:00 | cat /etc/proxysql.cnf

  | 2023-04-26T23:36:59.285+09:00 | datadir="/var/lib/proxysql"
  | 2023-04-26T23:36:59.285+09:00 | admin_variables=
  | 2023-04-26T23:36:59.285+09:00 | {
  | 2023-04-26T23:36:59.285+09:00 | admin_credentials="admin:c9ApWNPHAfUz"
  | 2023-04-26T23:36:59.285+09:00 | admin-web_enabled=false
  | 2023-04-26T23:36:59.285+09:00 | mysql_ifaces="0.0.0.0:6032"
  | 2023-04-26T23:36:59.285+09:00 | }
  | 2023-04-26T23:36:59.285+09:00 | mysql_variables=
  | 2023-04-26T23:36:59.285+09:00 | {
  | 2023-04-26T23:36:59.285+09:00 | threads=4
  | 2023-04-26T23:36:59.285+09:00 | max_connections=2048
  | 2023-04-26T23:36:59.285+09:00 | default_query_delay=0
  | 2023-04-26T23:36:59.285+09:00 | default_query_timeout=36000000
  | 2023-04-26T23:36:59.285+09:00 | default_tx_isolation="REPEATABLE-READ"
  | 2023-04-26T23:36:59.285+09:00 | have_compress=true
  | 2023-04-26T23:36:59.285+09:00 | poll_timeout=2000
  | 2023-04-26T23:36:59.285+09:00 | interfaces="0.0.0.0:6033;/var/lib/proxysql/proxysql.sock"
  | 2023-04-26T23:36:59.285+09:00 | default_schema="information_schema"
  | 2023-04-26T23:36:59.285+09:00 | stacksize=1048576
  | 2023-04-26T23:36:59.285+09:00 | server_version="5.5.30"
  | 2023-04-26T23:36:59.285+09:00 | connect_timeout_server=3000
  | 2023-04-26T23:36:59.285+09:00 | monitor_username="monitor"
  | 2023-04-26T23:36:59.285+09:00 | monitor_password="e8GKWZb4BaC6Pum"
  | 2023-04-26T23:36:59.285+09:00 | monitor_history=60000
  | 2023-04-26T23:36:59.285+09:00 | monitor_connect_interval=200000
  | 2023-04-26T23:36:59.285+09:00 | monitor_ping_interval=100000
  | 2023-04-26T23:36:59.285+09:00 | monitor_read_only_interval=1500
  | 2023-04-26T23:36:59.285+09:00 | monitor_read_only_timeout=500
  | 2023-04-26T23:36:59.285+09:00 | ping_interval_server_msec=10000
  | 2023-04-26T23:36:59.285+09:00 | ping_timeout_server=200
  | 2023-04-26T23:36:59.285+09:00 | commands_stats=true
  | 2023-04-26T23:36:59.285+09:00 | sessions_sort=true
  | 2023-04-26T23:36:59.285+09:00 | }
  | 2023-04-26T23:36:59.285+09:00 | mysql_servers =
  | 2023-04-26T23:36:59.285+09:00 | (
  | 2023-04-26T23:36:59.285+09:00 | {
  | 2023-04-26T23:36:59.285+09:00 | address = "laravel-on-ecs-dzg-aurora-cluster.cluster-cxmxisy1o2a2.us-east-1.rds.amazonaws.com"
  | 2023-04-26T23:36:59.285+09:00 | port = 3306
  | 2023-04-26T23:36:59.285+09:00 | hostgroup = 1
  | 2023-04-26T23:36:59.285+09:00 | use_ssl = 0
  | 2023-04-26T23:36:59.285+09:00 | max_connections = 100
  | 2023-04-26T23:36:59.285+09:00 | },
  | 2023-04-26T23:36:59.285+09:00 | {
  | 2023-04-26T23:36:59.285+09:00 | address = ""
  | 2023-04-26T23:36:59.285+09:00 | port =
  | 2023-04-26T23:36:59.285+09:00 | hostgroup = 2
  | 2023-04-26T23:36:59.285+09:00 | use_ssl = 0
  | 2023-04-26T23:36:59.285+09:00 | max_connections = 100
  | 2023-04-26T23:36:59.285+09:00 | }
  | 2023-04-26T23:36:59.285+09:00 | )
  | 2023-04-26T23:36:59.285+09:00 | mysql_users =
  | 2023-04-26T23:36:59.285+09:00 | (
  | 2023-04-26T23:36:59.285+09:00 | {
  | 2023-04-26T23:36:59.285+09:00 | username = "admin"
  | 2023-04-26T23:36:59.285+09:00 | password = "****"
  | 2023-04-26T23:36:59.285+09:00 | backend = true
  | 2023-04-26T23:36:59.285+09:00 | frontend = true
  | 2023-04-26T23:36:59.285+09:00 | default_hostgroup = 1
  | 2023-04-26T23:36:59.285+09:00 | },
  | 2023-04-26T23:36:59.285+09:00 | {
  | 2023-04-26T23:36:59.285+09:00 | username = ""
  | 2023-04-26T23:36:59.285+09:00 | password = ""
  | 2023-04-26T23:36:59.285+09:00 | backend = true
  | 2023-04-26T23:36:59.285+09:00 | frontend = true
  | 2023-04-26T23:36:59.285+09:00 | default_hostgroup = 2
  | 2023-04-26T23:36:59.285+09:00 | }
  | 2023-04-26T23:36:59.285+09:00 | )

  | 2023-04-26T23:36:59.382+09:00 | Parse error at /etc/proxysql.cnf:49 - syntax error

Environment

Environment variables
Key | Type | Value -- | -- | -- BACKEND_AURORA_HOST | value | laravel-on-ecs-dzg-aurora-cluster.cluster-cxmxisy1o2a2.us-east-1.rds.amazonaws.com BACKEND_AURORA_PASS | value | admin1234 BACKEND_AURORA_PORT | value | 3306 BACKEND_AURORA_USER | value | admin BACKEND_TiDB_HOST | value | private-tidb.mrdrymlxc41.clusters.tidb-cloud.com BACKEND_TiDB_PASS | value | lognote-test BACKEND_TiDB_PORT | value | 4000 BACKEND_TiDB_USER | value | root Hoge | value | fuga9
dulao5 commented 1 year ago

BACKEND_TiDB_PORT=4000
HOSTNAME=ip-172-50-1-33.ec2.internal
HOME=/root
BACKEND_AURORA_PASS=admin1234
AWS_EXECUTION_ENV=AWS_ECS_FARGATE
BACKEND_AURORA_HOST=laravel-on-ecs-dzg-aurora-cluster.cluster-cxmxisy1o2a2.us-east-1.rds.amazonaws.com
ECS_AGENT_URI=http://169.254.170.2/api/06ae710c35504e3a9a0d7fb4d0adfafc-4053982789
BACKEND_AURORA_USER=admin
AWS_DEFAULT_REGION=us-east-1
Hoge=fuga10
ECS_CONTAINER_METADATA_URI_V4=http://169.254.170.2/v4/06ae710c35504e3a9a0d7fb4d0adfafc-4053982789
ECS_CONTAINER_METADATA_URI=http://169.254.170.2/v3/06ae710c35504e3a9a0d7fb4d0adfafc-4053982789
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
BACKEND_AURORA_PORT=3306
BACKEND_TiDB_PASS=lognote-test
AWS_REGION=us-east-1
PWD=/
BACKEND_TiDB_HOST=private-tidb.mrdrymlxc41.clusters.tidb-cloud.com
BACKEND_TiDB_USER=root

5/17/2023, 5:38:37 PM GMT+9 Parse error at /etc/proxysql.cnf:49 - syntax error

datadir="/var/lib/proxysql"
admin_variables=
{
    admin_credentials="admin:c9ApWNPHAfUz"
    admin-web_enabled=false
    mysql_ifaces="0.0.0.0:6032"
}
mysql_variables=
{
    threads=4
    max_connections=2048
    default_query_delay=0
    default_query_timeout=36000000
    default_tx_isolation="REPEATABLE-READ"
    have_compress=true
    poll_timeout=2000
    interfaces="0.0.0.0:6033;/var/lib/proxysql/proxysql.sock"
    default_schema="information_schema"
    stacksize=1048576
    server_version="5.5.30"
    connect_timeout_server=3000
    monitor_username="monitor"
    monitor_password="e8GKWZb4BaC6Pum"
    monitor_history=60000
    monitor_connect_interval=200000
    monitor_ping_interval=100000
    monitor_read_only_interval=1500
    monitor_read_only_timeout=500
    ping_interval_server_msec=10000
    ping_timeout_server=200
    commands_stats=true
    sessions_sort=true
}
mysql_servers =
(
    {
        address = "laravel-on-ecs-dzg-aurora-cluster.cluster-cxmxisy1o2a2.us-east-1.rds.amazonaws.com"
        port = 3306
        hostgroup = 1
        use_ssl = 0
        max_connections = 100
    },
    {
        address = ""
        port =
        hostgroup = 2
        use_ssl = 0
        max_connections = 100
    }
)
mysql_users =
(
    {
        username = "admin"
        password = "admin1234"
        backend = true
        frontend = true
        default_hostgroup = 1
    },
    {
        username = ""
        password = ""
        backend = true
        frontend = true
        default_hostgroup = 2
    }
)