ProxySQL version 1.4.9 in ubuntu16.04
I have completed the configuration, but something wrong to limit the IP address and the listening port is not up.
------following is the log------
2018-07-23 17:03:03 [INFO] Exiting...
2018-07-23 17:03:03 [INFO] Shutdown angel process
2018-07-23 17:03:03 [INFO] ProxySQL version 1.4.9-percona-1.1
2018-07-23 17:03:03 [INFO] Detected OS: Linux AL19 4.4.0-85-generic #108-Ubuntu SMP Mon Jul 3 17:23:59 UTC 2017 x86_64
2018-07-23 17:03:03 [INFO] Starting ProxySQL
2018-07-23 17:03:03 [INFO] Sucessfully started
2018-07-23 17:03:03 [INFO] Angel process started ProxySQL process 28452
Standard ProxySQL Cluster rev. 0.1.0702 -- ProxySQL_Cluster.cpp -- Mon Jul 16 07:26:24 2018
Standard ProxySQL Statistics rev. 1.4.1027 -- ProxySQL_Statistics.cpp -- Mon Jul 16 07:26:24 2018
Standard ProxySQL HTTP Server Handler rev. 1.4.1031 -- ProxySQL_HTTP_Server.cpp -- Mon Jul 16 07:26:24 2018
Standard ProxySQL Admin rev. 0.2.0902 -- ProxySQL_Admin.cpp -- Mon Jul 16 07:26:24 2018
Standard MySQL Threads Handler rev. 0.2.0902 -- MySQL_Thread.cpp -- Mon Jul 16 07:26:24 2018
Standard MySQL Authentication rev. 0.2.0902 -- MySQL_Authentication.cpp -- Mon Jul 16 07:26:24 2018
2018-07-23 17:03:03 [INFO] Dumping current MySQL Servers structures for hostgroup ALL
2018-07-23 17:03:03 [INFO] Dumping mysql_servers
+--------------+----------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+-------------+
| hostgroup_id | hostname | port | weight | status | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment | mem_pointer |
+--------------+----------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+-------------+
+--------------+----------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+-------------+
2018-07-23 17:03:03 [INFO] Dumping mysql_servers_incoming
+--------------+----------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname | port | weight | status | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+----------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
+--------------+----------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
2018-07-23 17:03:03 [INFO] New mysql_replication_hostgroups table
2018-07-23 17:03:03 [INFO] New mysql_group_replication_hostgroups table
2018-07-23 17:03:03 [INFO] Dumping current MySQL Servers structures for hostgroup ALL
2018-07-23 17:03:03 [INFO] Dumping mysql_servers
+--------------+----------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+-------------+
| hostgroup_id | hostname | port | weight | status | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment | mem_pointer |
+--------------+----------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+-------------+
+--------------+----------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+-------------+
Standard Query Processor rev. 0.2.0902 -- Query_Processor.cpp -- Mon Jul 16 07:26:24 2018
In memory Standard Query Cache (SQC) rev. 1.2.0905 -- Query_Cache.cpp -- Mon Jul 16 07:26:24 2018
2018-07-23 17:03:03 network.cpp:53:listen_on_port(): [ERROR] bind(): Cannot assign requested address
2018-07-23 17:03:03 network.cpp:53:listen_on_port(): [ERROR] bind(): Cannot assign requested address
2018-07-23 17:03:03 network.cpp:53:listen_on_port(): [ERROR] bind(): Cannot assign requested address
2018-07-23 17:03:03 network.cpp:53:listen_on_port(): [ERROR] bind(): Cannot assign requested address
Standard MySQL Monitor (StdMyMon) rev. 1.2.0723 -- MySQL_Monitor.cpp -- Mon Jul 16 07:26:24 2018
netstat -npl|egrep "6032|6033"
tcp 0 0 0.0.0.0:6032 0.0.0.0:* LISTEN 28452/proxysql
i try to change the IP address to 0.0.0.0:6033, it be able to start, but 172.19.207.12:6033 will not do so.
thx a lot
You need to tune net.ipv4.ip_nonlocal_bind = 1 in your Linux box.
From https://www.frozentux.net/ipsysctl-tutorial/chunkyhtml/variablereference.html :
The ip_nonlocal_bind variable allows us to set if local processes should be able to bind to non-local IP addresses. This could be quite useful, in such cases where we want specific programs or applications to be able to listen to non-local IP adresses, such as sniffing for traffic to a specific host which may commit bad things, etcetera. The variable may, however, break some applications and they will no longer work.
The ip_nonlocal_bind variable takes a boolean value which can be set to 1 or 0. If the variable is set to 0, this option is turned off and if it is set to 1 it is turned on. The default value is to turn this option off, or 0 in other words.
By default, ip_nonlocal_bind is 0, therefore any application (including proxysql) cannot bind to not existing IP, returning the error you are experiencing.
Re-opening.
Error log can be more descriptive and suggests a solution
@renecannao thx a lot for reply , ur solution perfectly solved my problem
Thank you for the feedback.
Re-opening, because we can make errorlog more descriptive and suggests a solution
@renecannao
By the way, according to your answer, the remote access port has come out, but the remote connection access is not successful.
ERROR 2003 (HY000): Can't connect to MySQL server on'172.19.206.1 (111)
I've tried many ways,
When 0.0.0.0:6033 is set up, all servers can be accessed to prove that the account password is correct.
When setting up 172.19.206.1:6033; 172.19.206.2:6034, 172.19.206.1:6033 is successful, 172.19.206.1:6033 is the server where proxysql is located, and 172.19.206.2:6034 remote server connection is unsuccessful.
Set all servers to net.ipv4.ip_nonlocal_bind=1, net.ipv4.ip_forward=1,
But still not.
look forward to your reply. Thanks very much
@YellowStone0828 : isn't clear to me what you are reporting.
But I can confirm that if net.ipv4.ip_forward=1, ProxySQL binds on that IP even if not existing (yet).
@renecannao sorry, my purpose just want to limit the access to the proxysql client IP address , so what kind of configuration can do that ?
Most helpful comment
Re-opening.
Error log can be more descriptive and suggests a solution