比特幣核心節點無法路由到對等節點
我正在嘗試在雲中同步一個新的完整節點,但是它的同步速度比我習慣的要慢得多:大約 12 小時後我大約有 70,000 個塊。
- 它似乎不是慢 IO,
iotop
表明一切都是空閒的,幾乎沒有任何東西被寫入。- 我的節點正在建立連接:根據
bitcoin-cli getnetworkinfo
我現在應該有 10 個活動連接。- 過去 12 小時內幾乎沒有網路流量,不到 100mb。
但這就是我的
debug.log
展示:~/.bitcoin# tail -n 100 debug.log 2018-01-26 10:07:07 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:09 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:10 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:10 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:12 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:13 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:15 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:16 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:18 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:19 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:21 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:22 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:24 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:25 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:27 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:28 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:30 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:31 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:33 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:34 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:36 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:37 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:39 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:40 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:42 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:43 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:45 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:47 receive version message: /breadwallet:0.6.2/: version 70013, blocks=0, us=[redacted]:8333, peer=885 2018-01-26 10:07:52 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:52 receive version message: /breadwallet:0.6.2/: version 70013, blocks=0, us=[redacted]:8333, peer=886 2018-01-26 10:07:53 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:55 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:56 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:57 receive version message: /Snoopy:0.2.1/: version 70001, blocks=0, us=[redacted]:8333, peer=887 2018-01-26 10:07:58 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:07:59 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:01 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:02 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:04 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:05 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:07 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:08 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:10 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:11 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:13 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:15 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:16 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:18 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:19 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:21 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:22 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:24 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:25 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:27 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:28 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:30 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:37 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:38 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:40 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:41 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:43 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:50 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:51 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:53 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:54 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:56 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:57 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:08:59 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:00 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:02 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:09 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:10 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:12 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:13 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:13 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:15 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:17 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:18 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:20 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:21 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:23 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:24 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:26 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:27 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:29 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:30 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:32 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:33 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:35 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:36 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:38 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:39 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:41 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:42 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:44 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:45 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:47 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:48 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:50 connect() to [redacted]:8333 failed after select(): No route to host (113) 2018-01-26 10:09:57 connect() to [redacted]:8333 failed after select(): No route to host (113)
我已經編輯了 IP 地址,但它們都無法從我的 vps 盒子中訪問,而我可以在盒子外面很好地訪問它們(這不是比特幣核心問題,而是網路問題)。
編輯:
根據要求提供更多調試輸出:
VPS主機,你可以試試>telnet redacted 8333
輸出:
~/.bitcoin# telnet [redacted]:8333 telnet: could not resolve [redacted]:8333/telnet: Name or service not known
和:
~/.bitcoin# nmap [redacted] -p8333 Starting Nmap 7.01 ( https://nmap.org ) at 2018-01-26 08:13 EST Nmap scan report for [redacted] ([redacted]) Host is up (0.0069s latency). PORT STATE SERVICE 8333/tcp filtered bitcoin Nmap done: 1 IP address (1 host up) scanned in 0.42 seconds
這很奇怪: nmap 有效,但似乎沒有其他東西可以路由。
我沒有使用 Tor,也沒有配置任何 bitcoin.conf 文件。一切都是預設的,我從 bitcoincore.org 下載了預設的 linux 建構(0.15.1)(校驗和匹配)。
此外,檢查比特幣節點綁定到哪些介面,特別是如果您的 VPS 有多個網路介面。
它只有一個被叫
venet0
和一個被叫venet0:0
(後者有IP公共綁定)。我正在執行 Ubuntu 16.04.1 LTS。這是 debug.log 的前 150 行(bitcoind 首次啟動時):https ://gist.github.com/askmike/5ae06e6ffec122e8634df97e9dae4cf5
編輯2:
原來是我的 VPS 提供商的防火牆問題。
像這樣的行意味著您實際上正在連接到一些節點:
2018-01-26 10:07:57 receive version message: /Snoopy:0.2.1/: version 70001, blocks=0, us=[redacted]:8333, peer=887
但是,我無法從您發布的內容中判斷該對等是否是後來失敗的,我不這麼認為。
在 VPS 主機中,您可以嘗試
>telnet redacted 8333
or>nmap redacted -p8333
or>traceroute redacted -p 8333
並將其添加到您的問題中嗎?順便說一句:如果您想要一個工具來進行節點檢查,這顯然有效:https ://bitcointalk.org/index.php?topic=760565.msg13820110#msg13820110
此外,檢查比特幣節點綁定到哪些介面,特別是如果您的 VPS 有多個網路介面。它應該
debug.log
在節點重新啟動後不久出現。有一些類似的選項
-onlynet=
可能會導致連接問題,您的配置文件或用於啟動節點的命令行中有什麼?你用的是tor嗎?
這可能只是您的 VPS 主機的智能防火牆或 Web 過濾器問題。