Chia-Network / chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
10.82k stars 2.03k forks source link

Searching for an initial chain | Non existing function: request_peers_introducer #4406

Closed simseb closed 3 years ago

simseb commented 3 years ago

Aftrer it stopped syncing yesterday with 1.1.4 (same with 1.1.5 after upgrade), and then deleting everything (including ~/.chia) and 'reinstalled' 1.1.5 (git clone...):

chia show -s -c

Searching for an initial chain

You may be able to expedite with 'chia show -a host:port' using a known node.

Blockchain has no blocks yet

Connections:
Type      IP                                     Ports       NodeID      Last Connect      MiB Up|Dwn
FARMER    127.0.0.1                              50852/8447  0777d19c... May 10 11:38:30      0.0|0.0    
WALLET    127.0.0.1                              50910/8449  c21db1fe... May 10 11:48:40      0.0|0.0 

The debug.log:

2021-05-10T11:56:17.340 full_node full_node_server        : ERROR    Exception Trying to connect to a peer ({'host': 'introducer.chia.net', 'port': 8444}) with the same peer_id: dbd32b3a701f3bb5e772a5a9c9fb17b874253f274480bb0d68a4811ac59affa2, exception Stack: Traceback (most recent call last):
  File "/home/chia/chia-blockchain/chia/server/server.py", line 373, in start_client
    raise RuntimeError(f"Trying to connect to a peer ({target_node}) with the same peer_id: {peer_id}")
RuntimeError: Trying to connect to a peer ({'host': 'introducer.chia.net', 'port': 8444}) with the same peer_id: dbd32b3a701f3bb5e772a5a9c9fb17b874253f274480bb0d68a4811ac59affa2

2021-05-10T11:57:16.911 full_node full_node_server        : ERROR    Non existing function: request_peers_introducer
2021-05-10T11:57:16.911 full_node full_node_server        : ERROR    Exception: Error code: INVALID_PROTOCOL_MESSAGE <class 'chia.util.errors.ProtocolError'>, closing connection {'host': '12.0.0.1', 'port': 8449}. Traceback (most recent call last):
  File "/home/chia/chia-blockchain/chia/server/server.py", line 497, in api_call
    raise ProtocolError(Err.INVALID_PROTOCOL_MESSAGE, [message_type])
chia.util.errors.ProtocolError: Error code: INVALID_PROTOCOL_MESSAGE

2021-05-10T11:57:16.912 full_node full_node_server        : WARNING  Banning 12.0.0.1 for 10 seconds
2021-05-10T11:57:18.048 full_node asyncio                 : ERROR    Task exception was never retrieved
future: <Task finished name='Task-320' coro=<WebSocketWriter.ping() done, defined at /home/chia/chia-blockchain/venv/lib/python3.8/site-packages/aiohttp/http_websocket.py:669> exception=ConnectionResetError('Cannot write to closing transport')>
Traceback (most recent call last):
  File "/home/chia/chia-blockchain/venv/lib/python3.8/site-packages/aiohttp/http_websocket.py", line 673, in ping
    await self._send_frame(message, WSMsgType.PING)
  File "/home/chia/chia-blockchain/venv/lib/python3.8/site-packages/aiohttp/http_websocket.py", line 643, in _send_frame
    self._write(header + mask + message)
  File "/home/chia/chia-blockchain/venv/lib/python3.8/site-packages/aiohttp/http_websocket.py", line 660, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
chia show -a node-eu.chia.net:8444
Connecting to node-eu.chia.net, 8444
Failed to connect to node-eu.chia.net:8444
 nc -zv node-eu.chia.net 8444
Connection to node-eu.chia.net 8444 port [tcp/*] succeeded!

12/8 is my internal NATed network; 12.0.0.1 is the IP addr of the router. OS: 5.8.0-50-generic #56~20.04.1-Ubuntu Port 8444 is open.

yuzhongrong commented 3 years ago

me to

(venv) ipfsnets@r730-202:~/chia/chia-blockchain$ CHIA_ROOT="~/.chia/testnet" chia wallet show Wallet height: 0 Sync status: Not synced Balances, fingerprint: 2331392080 Wallet ID 1 type STANDARD_WALLET -Total Balance: 0.0 txch (0 mojo) -Pending Total Balance: 0.0 txch (0 mojo) -Spendable: 0.0 txch (0 mojo) (venv) ipfsnets@r730-202:~/chia/chia-blockchain$ (venv) ipfsnets@r730-202:~/chia/chia-blockchain$ (venv) ipfsnets@r730-202:~/chia/chia-blockchain$ (venv) ipfsnets@r730-202:~/chia/chia-blockchain$ CHIA_ROOT="~/.chia/testnet" chia show -s

Searching for an initial chain

You may be able to expedite with 'chia show -a host:port' using a known node.

Blockchain has no blocks yet

yuzhongrong commented 3 years ago

(venv) ipfsnets@r730-202:~/chia/chia-blockchain$ CHIA_ROOT="~/.chia/testnet" chia version 1.1.4

yuzhongrong commented 3 years ago

1.1.4 and 1.1.5 version is same effect

bashar1988 commented 3 years ago

me too have the same problem 1.1.5

simseb commented 3 years ago

The worst solution ever: 'after a while it started working again'

I restarted the router at some point (running AdvancedTomato) and re-enabled UPnP (worked before without it because i did a manual pf).

After a while i executed:

chia show -a 222.186.50.178:8444
chia show -a 61.145.108.138:8444
chia show -a 27.158.148.91:8444
chia show -a 91.83.205.125:8444
chia show -a 1.24.65.29:8444
chia show -a 115.215.179.127:8444
chia show -a 115.215.179.77:8444
chia show -a 61.239.32.39:8444
chia show -a 14.155.87.76:8444
chia show -a 59.146.16.56:8444
chia show -a 115.215.178.138:8444
chia show -a 115.215.180.68:8444
chia show -a 52.54.86.144:8444
chia show -a 79.165.250.40:8444
chia show -a 183.6.113.234:8444
chia show -a 117.60.61.83:8444
chia show -a 93.40.3.118:8444
chia show -a 113.87.186.73:8444
chia show -a 79.236.9.237:8444
chia show -a 80.114.141.167:8444

and it managed to connect. chia version 1.1.5

SeriousM commented 3 years ago

For everyone who has the same problem on windows, the chia.exe to execute with "chia show -a ...." is located at %LOCALAPPDATA%\chia-blockchain\app-1.1.5\resources\app.asar.unpacked\daemon\chia.exe