Hi,
Envoy seems to have troubles proxy-ing mysql format.
My setup is a ubuntu 14.04.5 with mysqld Ver 5.5.52-0ubuntu0.14.04.1 running on port 3306.
If I use the mysql client to talk directly to mysqld it works.
If I try to go through envoy, it hangs.
This is my envoy config file:
{ "listeners": [ { "port": 3307, "filters": [ { "type": "read", "name": "tcp_proxy", "config": { "cluster": "mysql", "stat_prefix": "mysql" } } ] } ], "admin": { "access_log_path": "/dev/null", "port": 8001 }, "cluster_manager": { "clusters": [ { "name": "mysql", "connect_timeout_ms": 250, "type": "strict_dns", "lb_type": "round_robin", "hosts": [ { "url": "tcp://127.0.0.1:3306" } ] } ] } }
This is the sh session:
enricos@enricos:/ws$ mysql -h 127.0.0.1 -P 3306 -u admin
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.5.52-0ubuntu0.14.04.1 (Ubuntu)
...
mysql> quit
Bye
enricos@enricos:/ws$ mysql -h 127.0.0.1 -P 3307 -u admin
<... hangs ...>
On the envoy console, I see:
./build/source/exe/envoy -c ../envoy/examples/envoy-mysql.conf -l 0
...
[2016-10-20 17:20:50.398][167386][info][main] [C2] new connection
[2016-10-20 17:20:50.398][167386][info][filter] [C2] new tcp proxy session
This is the hash I built from:
commit 2cb3635
These are the stats:
http.admin.downstream_cx_rx_bytes_total: 260
http.admin.downstream_cx_ssl_active: 0
http.admin.downstream_cx_ssl_total: 0
http.admin.downstream_cx_total: 3
http.admin.downstream_cx_tx_bytes_buffered: 0
http.admin.downstream_cx_tx_bytes_total: 1564
http.admin.downstream_rq_2xx: 1
http.admin.downstream_rq_3xx: 0
http.admin.downstream_rq_4xx: 1
http.admin.downstream_rq_5xx: 0
http.admin.downstream_rq_active: 1
http.admin.downstream_rq_http1_total: 3
http.admin.downstream_rq_http2_total: 0
http.admin.downstream_rq_non_relative_path: 0
http.admin.downstream_rq_response_before_rq_complete: 0
http.admin.downstream_rq_rx_reset: 0
http.admin.downstream_rq_total: 3
http.admin.downstream_rq_tx_reset: 0
http.admin.failed_generate_uuid: 0
http.async-client.no_route: 0
http.async-client.rq_redirect: 0
http.async-client.rq_total: 0
listener.3307.downstream_cx_active: 0
listener.3307.downstream_cx_destroy: 1
listener.3307.downstream_cx_total: 1
listener.8001.downstream_cx_active: 1
listener.8001.downstream_cx_destroy: 2
listener.8001.downstream_cx_total: 3
server.days_until_first_cert_expiring: 2147483647
server.live: 1
server.memory_allocated: 428400
server.memory_heap_size: 1048576
server.parent_connections: 0
server.total_connections: 0
server.uptime: 45
server.version: 2929507
server.watchdog_mega_miss: 0
server.watchdog_miss: 0
stats.overflow: 0
tcp.mysql.downstream_cx_tx_bytes_buffered: 0
tcp.mysql.downstream_cx_tx_bytes_total: 0
Hi,
Envoy seems to have troubles proxy-ing mysql format.
My setup is a ubuntu 14.04.5 with mysqld Ver 5.5.52-0ubuntu0.14.04.1 running on port 3306.
If I use the mysql client to talk directly to mysqld it works.
If I try to go through envoy, it hangs.
This is my envoy config file:
{ "listeners": [ { "port": 3307, "filters": [ { "type": "read", "name": "tcp_proxy", "config": { "cluster": "mysql", "stat_prefix": "mysql" } } ] } ], "admin": { "access_log_path": "/dev/null", "port": 8001 }, "cluster_manager": { "clusters": [ { "name": "mysql", "connect_timeout_ms": 250, "type": "strict_dns", "lb_type": "round_robin", "hosts": [ { "url": "tcp://127.0.0.1:3306" } ] } ] } }This is the sh session:
enricos@enricos:
/ws$ mysql -h 127.0.0.1 -P 3306 -u admin/ws$ mysql -h 127.0.0.1 -P 3307 -u adminWelcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.5.52-0ubuntu0.14.04.1 (Ubuntu)
...
mysql> quit
Bye
enricos@enricos:
<... hangs ...>
On the envoy console, I see:
./build/source/exe/envoy -c ../envoy/examples/envoy-mysql.conf -l 0
...
[2016-10-20 17:20:50.398][167386][info][main] [C2] new connection
[2016-10-20 17:20:50.398][167386][info][filter] [C2] new tcp proxy session
This is the hash I built from:
commit 2cb3635
These are the stats:
http.admin.downstream_cx_rx_bytes_total: 260
http.admin.downstream_cx_ssl_active: 0
http.admin.downstream_cx_ssl_total: 0
http.admin.downstream_cx_total: 3
http.admin.downstream_cx_tx_bytes_buffered: 0
http.admin.downstream_cx_tx_bytes_total: 1564
http.admin.downstream_rq_2xx: 1
http.admin.downstream_rq_3xx: 0
http.admin.downstream_rq_4xx: 1
http.admin.downstream_rq_5xx: 0
http.admin.downstream_rq_active: 1
http.admin.downstream_rq_http1_total: 3
http.admin.downstream_rq_http2_total: 0
http.admin.downstream_rq_non_relative_path: 0
http.admin.downstream_rq_response_before_rq_complete: 0
http.admin.downstream_rq_rx_reset: 0
http.admin.downstream_rq_total: 3
http.admin.downstream_rq_tx_reset: 0
http.admin.failed_generate_uuid: 0
http.async-client.no_route: 0
http.async-client.rq_redirect: 0
http.async-client.rq_total: 0
listener.3307.downstream_cx_active: 0
listener.3307.downstream_cx_destroy: 1
listener.3307.downstream_cx_total: 1
listener.8001.downstream_cx_active: 1
listener.8001.downstream_cx_destroy: 2
listener.8001.downstream_cx_total: 3
server.days_until_first_cert_expiring: 2147483647
server.live: 1
server.memory_allocated: 428400
server.memory_heap_size: 1048576
server.parent_connections: 0
server.total_connections: 0
server.uptime: 45
server.version: 2929507
server.watchdog_mega_miss: 0
server.watchdog_miss: 0
stats.overflow: 0
tcp.mysql.downstream_cx_tx_bytes_buffered: 0
tcp.mysql.downstream_cx_tx_bytes_total: 0