myshard问题 - 8810 deny connection from

发现法xxx.xxx.254.45,没有同步拉取到其他点的数据,查看同步的日志,一直显示被其他节点拒绝的状态,拒绝说明是权限没有通过

May 17 13:22:10 warning db_sync_short_video_oss_r2m0_d[]: [tid:137732] [SocketServer::OnAccept] deny connection from: xxx.xxx.125.2:53316
May 17 13:22:20 warning db_sync_short_video_oss_r2m0_d[]: [tid:137739] [SocketServer::OnAccept] deny connection from: xxx.xxx.125.2:53318
May 17 13:22:31 warning db_sync_short_video_oss_r2m0_d[]: [tid:137746] [SocketServer::OnAccept] deny connection from: xxx.xxx.125.2:53320
May 17 13:22:41 warning db_sync_short_video_oss_r2m0_d[]: [tid:137752] [SocketServer::OnAccept] deny connection from: xxx.xxx.125.2:53322

目标机器已经开通了防火墙和白名单了,在xxx.xxx.125.2机器上,使用netstat已经看到了建立了连接,说明防火墙已经开放了端口了

tcp  0   0 xxx.xxx.125.2:12505  xxx.xxx.254.45:41734  ESTABLISHED 48767/./db_sync_sho

重启xxx.xxx.254.45的4455,看到报错

May 17 13:36:43 info shardadmin_short_video_oss_20_d[138429]: HAVE_EPOLL
May 17 13:36:43 debug shardadmin_short_video_oss_20_d[138429]: output queue ok
May 17 13:36:43 debug shardadmin_short_video_oss_20_d[138429]: output queue ok
May 17 13:36:43 err shardadmin_short_video_oss_20_d[138429]: Connect to db failed:[admin|SXobJfaXm4|xxx.xxx.254.45||8810] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 0
May 17 13:36:43 info shardadmin_short_video_oss_20_d[138429]: create listen port 4455 success
May 17 13:36:43 info shardadmin_short_video_oss_20_d[138429]: server start, epoll_prt=0x1335000
May 17 13:36:53 notice shardadmin_short_video_oss_20_d[138429]: request:0 proc:0 droped:0 active:0
May 17 13:37:03 notice shardadmin_short_video_oss_20_d[138429]: request:0 proc:0 droped:0 active:0

连接不上8810的DB是正常的,因为同步还没有开启,如果不启动shard8821到8827,启动myshardmin会报如下错误

May 17 14:27:31 info shardadmin_short_video_oss_20_d[141736]: HAVE_EPOLL
May 17 14:27:31 debug shardadmin_short_video_oss_20_d[141736]: output queue ok
May 17 14:27:31 debug shardadmin_short_video_oss_20_d[141736]: output queue ok
May 17 14:27:31 err shardadmin_short_video_oss_20_d[141736]: Connect to db failed:[admin|SXobJfaXm4|45.124.254.45||8810] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 111
May 17 14:27:31 err shardadmin_short_video_oss_20_d[141736]: Connect to db failed:[admin|SXobJfaXm4|127.0.0.1||8810] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 111
May 17 14:27:31 err shardadmin_short_video_oss_20_d[141736]: Connect to db failed:[admin|SXobJfaXm4|127.0.0.1||8821] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 111
May 17 14:27:31 err shardadmin_short_video_oss_20_d[141736]: Connect to db failed:[admin|SXobJfaXm4|127.0.0.1||8822] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 111
May 17 14:27:31 err shardadmin_short_video_oss_20_d[141736]: Connect to db failed:[admin|SXobJfaXm4|127.0.0.1||8823] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 111
May 17 14:27:31 err shardadmin_short_video_oss_20_d[141736]: Connect to db failed:[admin|SXobJfaXm4|127.0.0.1||8824] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 111
May 17 14:27:31 err shardadmin_short_video_oss_20_d[141736]: Connect to db failed:[admin|SXobJfaXm4|127.0.0.1||8825] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 111
May 17 14:27:31 err shardadmin_short_video_oss_20_d[141736]: Connect to db failed:[admin|SXobJfaXm4|127.0.0.1||8826] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 111
May 17 14:27:31 err shardadmin_short_video_oss_20_d[141736]: Connect to db failed:[admin|SXobJfaXm4|127.0.0.1||8827] Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 111
May 17 14:27:31 warning shardadmin_short_video_oss_20_d[141736]: connect sync_server 45.124.254.45:12505 failed, [ShardAdminConfig2.cpp#81]
May 17 14:27:31 info shardadmin_short_video_oss_20_d[141736]: create listen port 4455 success
May 17 14:27:31 info shardadmin_short_video_oss_20_d[141736]: server start, epoll_prt=0x119b000

它把8821-8827的proxy当做是一个db来连接了,因为还真有可能不同端口对应不同的DB

后来4455的管理端口登录不上去了,报错没有权限

ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 0
May 17 14:12:01 warning shardadmin_short_video_oss_20_d[139578]: deny connection from :127.0.0.1

怎样都连接不上

[[email protected] bin]# mysql -h0 -umyshard -pmyshard -P4455
ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 0
[[email protected] bin]# mysql -h127.0.0.1 -umyshard -pmyshard -P4455
ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 0
[[email protected] bin]# mysql -h127.0.0.1 -uadmin -padmin -P4455
ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 0
[[email protected] bin]# mysql -h127.0.0.1 -uadmin -pSXobJfaXm4 -P4455
ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading initial communication packet‘, system error: 0

还有跟白名单有关系

mysql> select * from myshard_redip_list;
+-----------------+-----------------+---------------+
| busi_name       | machine_room_no | ip            |
+-----------------+-----------------+---------------+
| short_video_oss |               2 | xxx.xxx.252.45 |
+-----------------+-----------------+---------------+

发现ip跟法兰克福机房不同

时间: 2024-09-08 23:49:11

myshard问题 - 8810 deny connection from的相关文章

Network Programming(1)

It is important to realize that clients and servers are processes and not ma- chines, or hosts as they are often called in this context. Data received from the network is copied from the adapter across the I/O and memory buses into memory, typically

myshard问题 -server1_nobinlog, Error: Too many connections

运维人员直接把测试的机器重启了,/usr目录不存在,重新安装新的mysql,接着测试库重启myshard,有些端口能起来,有些不能起来 [email protected]:/data/rds/myshard/bin# ./shard_ctrl status shard_d 0 is down shard_d 11 is working shard_d 12 is working shard_d 13 is working shard_d 14 is down shard_d 15 is down

ssh远程报错ssh_exchange_identification: read: Connection reset by peer

ssh远程登录报错: [[email protected] ~]$ ssh     198.44.241.34 ssh_exchange_identification: read: Connection reset by peer 初步原因锁定: 1-服务器防火墙限定, 2-是否达到ssh的最大连接数,超过之后会服务器端会拒绝新的连接,直到有新的连接释放出来 3-/etc/hosts.allow和/etc/hosts.deny配置文件限定ip登录 解决方案: 1 firewall-cmd --l

Connection closed by foreign host无法连接linux

环境,在win7系统下的虚拟机,虚拟机系统为centos6.6 由于windows长时间没有关机,然后今天电脑就感觉卡了就重启一下,结果重启了,linux链接不上了,如下: Connecting to 192.168.10.186:22... Connection established. To escape to local shell, press 'Ctrl+Alt+]'. Last login: Mon Jun 19 15:34:58 2017 from 192.168.10.11 Co

ssh_exchange_identification: read: Connection reset by peer

连接SSH报错:ssh_exchange_identification: read: Connection reset by peer 查看没有使用防火墙,怀疑是在hosts.deny中设置了拦截 果不其然 将这一行注释,默念三声“信春哥得永生”后,问题恢复了,so easy

ssh_exchange_identification: read: Connection reset by peer 报错解决办法

当你登录一台linux机器,登录不了,出现Connection reset by peer 报错,请参照以下解决步骤: 1.ssh -vvv -p22  123.10.98.22 如: localhost:~$ ssh -vvv -p22 123.10.98.22 OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config

ssh 不能连上服务器 hosts.deny没有没限制ip 找不到什么原因

[[email protected] Downloads]# ssh -p22022 -vv 123.5x.xx.xxx OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to 12

ssh问题:Connection closed by foreign host. Disconnected from remote host

放通一个远程ip能够ssh服务器,但是报错: Connection closed by foreign host. Disconnected from remote host... 解决办法: firewall防火墙放通ip. /etc/ssh/sshd_config文件修改,运行root用户密码登,再重启sshd服务. /etc/hosts.allow和/etc/hosts.deny文件修改,允许相应主机的访问,再重启sshd服务. 客户端连接数过多时也会报错. a.每次/etc/ssh/ss

hosts.deny 和hosts.allow 配置不生效

需求:需要用hosts.deny限制用户通过ssh登录 在/etc/hosts.deny中加入 sshd: all 在/etc/hosts.allow中加入 sshd:all #拒绝所有的ip链接ssh服务 在其他服务器上尝试链接该服务器,却发现还是正常链接 继续找问题,又从网上得知, /etc/hosts.allow 与 /etc/hosts.deny 只对调用了 tcp_wrappers  的才起作用.若是源代码编译的,看看编译时是否寻找了 libwrap.so 在起效果机器下,执行如下命令