突然,我的实例停止响应 mysql 个连接的传入连接
Suddenly my instance stopped responding to my incoming connections for mysql connections
出于开发和测试目的,我在 gcp 实例上安装了 mysql。一切正常,但突然开始出现连接超时错误。已为 MySQL 个连接打开防火墙。它工作得很好,突然就停止了。
这是连接日志
{
inserted: "xxxxxx"
jsonPayload: {
connection: {
dest_ip: "10.142.0.2"
dest_port: 3306
protocol: 6
src_ip: "54.87.222.27"
src_port: 52638
}
disposition: "ALLOWED"
instance: {
project_id: "xxxxxxxx"
region: "us-east1"
vm_name: "stockarea-server"
zone: "us-east1-b"
}
remote_location: {
city: "Ashburn"
continent: "America"
country: "usa"
region: "Virginia"
}
rule_details: {
action: "ALLOW"
direction: "INGRESS"
ip_port_info: [
0: {
ip_protocol: "TCP"
port_range: [
0: "3306"
]
}
1: {
ip_protocol: "UDP"
port_range: [
0: "3306"
]
}
]
priority: 1000
reference: "network:default/firewall:heroku-sql"
source_range: [
0: "0.0.0.0/0"
]
}
vpc: {
project_id: "xxxxxxxx"
subnetwork_name: "default"
vpc_name: "default"
}
}
logName: "projects/pxxxxxxx/logs/compute.googleapis.com%2Ffirewall"
receiveTimestamp: "2020-05-22T18:25:57.341545693Z"
resource: {
labels: {
location: "us-east1-b"
project_id: "xxxxxxxx"
subnetwork_id: "5137290941342062105"
subnetwork_name: "default"
}
type: "gce_subnetwork"
}
timestamp: "2020-05-22T18:25:45.934585080Z"
}
我有 MySQL 个用户有权访问不同的 IP 地址:
+------------------+-----------+
| user | host |
+------------------+-----------+
| client | % |
| stockarea | % |
| debian-sys-maint | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
更新:
我看到 MySQL error.log 文件并看到有人受到攻击并以某种方式使数据库崩溃。它正在抛出错误 packet getting out of order
。我现在重新安装了 MySQL 来解决这个问题并继续我的开发。
您好,我尝试对您的外部 IP 执行 ping 操作,但没有问题。所以所有 80、443 和 3306。我相信你的防火墙设置正确,请确保你的服务是 运行 并监听这些端口。
最后,请注意您应该清理 public 论坛
中的私人信息,例如 IP 地址和项目 ID
出于开发和测试目的,我在 gcp 实例上安装了 mysql。一切正常,但突然开始出现连接超时错误。已为 MySQL 个连接打开防火墙。它工作得很好,突然就停止了。
这是连接日志
{
inserted: "xxxxxx"
jsonPayload: {
connection: {
dest_ip: "10.142.0.2"
dest_port: 3306
protocol: 6
src_ip: "54.87.222.27"
src_port: 52638
}
disposition: "ALLOWED"
instance: {
project_id: "xxxxxxxx"
region: "us-east1"
vm_name: "stockarea-server"
zone: "us-east1-b"
}
remote_location: {
city: "Ashburn"
continent: "America"
country: "usa"
region: "Virginia"
}
rule_details: {
action: "ALLOW"
direction: "INGRESS"
ip_port_info: [
0: {
ip_protocol: "TCP"
port_range: [
0: "3306"
]
}
1: {
ip_protocol: "UDP"
port_range: [
0: "3306"
]
}
]
priority: 1000
reference: "network:default/firewall:heroku-sql"
source_range: [
0: "0.0.0.0/0"
]
}
vpc: {
project_id: "xxxxxxxx"
subnetwork_name: "default"
vpc_name: "default"
}
}
logName: "projects/pxxxxxxx/logs/compute.googleapis.com%2Ffirewall"
receiveTimestamp: "2020-05-22T18:25:57.341545693Z"
resource: {
labels: {
location: "us-east1-b"
project_id: "xxxxxxxx"
subnetwork_id: "5137290941342062105"
subnetwork_name: "default"
}
type: "gce_subnetwork"
}
timestamp: "2020-05-22T18:25:45.934585080Z"
}
我有 MySQL 个用户有权访问不同的 IP 地址:
+------------------+-----------+
| user | host |
+------------------+-----------+
| client | % |
| stockarea | % |
| debian-sys-maint | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
更新:
我看到 MySQL error.log 文件并看到有人受到攻击并以某种方式使数据库崩溃。它正在抛出错误 packet getting out of order
。我现在重新安装了 MySQL 来解决这个问题并继续我的开发。
您好,我尝试对您的外部 IP 执行 ping 操作,但没有问题。所以所有 80、443 和 3306。我相信你的防火墙设置正确,请确保你的服务是 运行 并监听这些端口。
最后,请注意您应该清理 public 论坛
中的私人信息,例如 IP 地址和项目 ID