同步失败 8810 deny connection from该怎么办
admin
2023-05-19 02:21:35
0次

发现法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

怎样都连接不上

[root@localhost bin]# mysql -h0 -umyshard -pmyshard -P4455
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
[root@localhost bin]# mysql -h227.0.0.1 -umyshard -pmyshard -P4455
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
[root@localhost bin]# mysql -h227.0.0.1 -uadmin -padmin -P4455
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
[root@localhost bin]# mysql -h227.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,再次重启shardadmin之后就能够顺利登陆了

相关内容

热门资讯

空调连续工作多久需要停机休息 空调连续工作的时间取决于多个因素,包括空调的型号、功率、使用环境和维护情况等。一般来说,空调可以连续...
空调哪个符号是除湿的 空调除湿功能通常用一个水滴形状的符号表示。不同品牌和型号的空调遥控器可能会有所差异,但一般来说,除湿...
格力空调多长时间加一次氟利昂 1、一般情况下,空调对氟利昂的使用量是非常小的,所以在空调使用了四年左右的时候再考虑加也没问题。2、...
空调用多长时间需要加氟一次 一般情况下是五年。当出现以下这几种情况时,空调才需要加氟。1、空调的室内机和室外机各有两个接口,当接...
格调生活·C标思享荟:卡萨帝在... 9月12日的郑州龙湖金融岛,夜风轻拂,灯光璀璨。“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑...
品牌价值破千亿、高端份额持续领... 9月12日,“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑州站”在郑州龙湖金融岛举办。2026...
空调主板坏了修800还是换新的 空调主板坏了是修还是换新,需要考虑多个因素,以下是一些建议:1. 维修成本:如果维修费用较低,比如 ...
空调开多久需要休息多长时间 问题:空调开多久需要休息多长时间回答:1、在使用空调的过程中,一般空调开7~8个小时左右需要休息2~...
中央空调多长时间清洗一次 1、一般空调开机前清洗一次即可,空调开机中间时段再清洗一次,空调关机时清洗一次,这样比较合理。2、空...
中央空调氟利昂多久加一次 看空调制热和制冷程度,很多人的观点认为氟利昂必须一年放一次,其实这个观点是错误的,理解上面有点偏差,...