ConnectionRefusedError
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
I get the following error when running docker-compose up:
node2_1 | [2017-10-03 04:42:16,615][tinychain:1109] INFO your address is 1EGSJ7uoCPekFUKfkkveHDBdHpRiHFvRBL
node2_1 | [2017-10-03 04:42:16,619][tinychain:500] INFO loading chain from disk with 11 blocks
node2_1 | [2017-10-03 04:42:16,620][tinychain:351] INFO connecting block 000000ccfa77e47ca5a4e1fb875a34d07458ac6de0161c2ac6a58f644b03fc6c to chain 0
node2_1 | [2017-10-03 04:42:16,620][tinychain:518] INFO adding tx outpoint OutPoint(txid='3ed2de27a992812a6bd561a9d28dc9bb778a0dd45891b44c954b6eb2bc3f2662', txout_idx=0) to utxo_set
node2_1 | [2017-10-03 04:42:16,621][tinychain:371] INFO block accepted height=1 txns=1
node2_1 | [2017-10-03 04:42:16,624][tinychain:1037] ERROR failed to send to peer node1
node2_1 | Traceback (most recent call last):
node2_1 | File "./tinychain.py", line 1034, in send_to_peer
node2_1 | with socket.create_connection((peer, PORT), timeout=1) as s:
node2_1 | File "/usr/local/lib/python3.6/socket.py", line 722, in create_connection
node2_1 | raise err
node2_1 | File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
node2_1 | sock.connect(sa)
node2_1 | ConnectionRefusedError: [Errno 111] Connection refused
node1_1 | [2017-10-03 04:42:16,645][tinychain:1109] INFO your address is 1dtKX2DNLT31atM9Bjv6jMr4DoP7mwc61
node1_1 | [2017-10-03 04:42:16,647][tinychain:500] INFO loading chain from disk with 12 blocks
node1_1 | [2017-10-03 04:42:16,648][tinychain:351] INFO connecting block 000000ccfa77e47ca5a4e1fb875a34d07458ac6de0161c2ac6a58f644b03fc6c to chain 0
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running docker-compose up and inspect tinychain.py around send_to_peer at line 1034, where node2 cannot connect to node1. Compare the startup timing shown for node1 and node2 and determine whether the reported connection refusal is expected during startup. Done means the compose run no longer reports the peer connection failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, python
- Domain
- distributed-systems, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100