您好,登錄后才能下訂單哦!
同步失敗 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
怎樣都連接不上
[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之后就能夠順利登陸了
看完上述內容是否對您有幫助呢?如果還想對相關知識有進一步的了解或閱讀更多相關文章,請關注億速云行業資訊頻道,感謝您對億速云的支持。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。