Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken Pipe (code: 32) Failed to handshake #4924

Open
nixfreak opened this issue Jun 27, 2024 · 6 comments
Open

Broken Pipe (code: 32) Failed to handshake #4924

nixfreak opened this issue Jun 27, 2024 · 6 comments

Comments

@nixfreak
Copy link

nixfreak commented Jun 27, 2024

I followed the miner docs step-by-step here -> https://github.com/stacksfoundation/miner-docs/tree/main

Describe the bug
Stacks error out trying to connect to local bitcoin node.

Steps To Reproduce

  1. compile most recent stacks-node and stacks lib
  2. Enable systemd stacks.service
    tail -f /stacks-blockchain/miner.log

Trying to sync mainnet stacks chain tip

WARN [1719696366.075455] [stackslib/src/burnchains/bitcoin/network.rs:194] [main] Failed to handshake with 127.0.0.1:8333: SerializationError(Io(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }))
WARN [1719696366.075504] [stackslib/src/burnchains/bitcoin/network.rs:194] [main] Failed to handshake with 127.0.0.1:8333: SerializationError(Io(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }))
WARN [1719696366.075562] [stackslib/src/burnchains/bitcoin/network.rs:194] [main] Failed to handshake with 127.0.0.1:8333: SerializationError(Io(Os { code: 32, kind: BrokenPipe, message:
INFO [1719767101.844079] [testnet/stacks-node/src/run_loop/boot_nakamoto.rs:205] [epoch-2/3-boot] Failed to open Sortition DB while checking current burn height, assuming height = 0
INFO [1719767102.844281] [testnet/stacks-node/src/run_loop/boot_nakamoto.rs:205] [epoch-2/3-boot] Failed to open Sortition DB while checking current burn height, assuming height = 0

Expected behavior
Expected for stacks to sync

Environment (please complete the following information):

  • OS: Debian 12 x86_64 release 12
  • Rust version: rustc 1.79.0 (129f3b996 2024-06-10)

Port 8333 is open and has other peers connecting

4430       73.157.162.10:8333      ESTABLISHED
4122       46.10.115.237:8333      ESTABLISHED
60510      167.88.11.203:8333      ESTABLISHED
...

Bitcoin sync tip at 850124

Verified bitcoin synced to tip

2024-06-30T17:23:08Z UpdateTip: new best=0000000000000000000070af91b9ce3dcccf024fba947c43ecb254e81ecd9baa height=850124 version=0x200e2000 log2_work=95.012855 tx=1032780000 date='2024-06-30T17:22:49Z' progress=1.000000 cache=149.5MiB(1294593txo)
@nixfreak nixfreak changed the title Stacks sync error [Failed to connect to peers] Broken Pipe (code: 32) Failed to handshake Jun 30, 2024
@nixfreak
Copy link
Author

nixfreak commented Jul 1, 2024

Trying ... again

cd /stacks-blockchain ; cargo clean; cargo build --features monitoring_prom,slog_json --release --bin stacks-node
sudo systemctl start stacks.service

`● stacks.service - Stacks Blockchain
Loaded: loaded (/etc/systemd/system/stacks.service; enabled; preset: enabled)
Active: active (running) since Mon 2024-07-01 14:39:13 CDT; 8s ago
Process: 35083 ExecStartPost=/bin/sh -c umask 022; sleep 2 && pgrep -f "/usr/local/bin/s>
Main PID: 35082 (sh)
Tasks: 4 (limit: 9442)
Memory: 41.0M
CPU: 5.110s
CGroup: /system.slice/stacks.service
├─35082 /bin/sh -c "/usr/local/bin/stacks-node start --config /etc/stacks-block>
└─35085 /usr/local/bin/stacks-node start --config /etc/stacks-blockchain/Config>

Jul 01 14:39:11 stacks-node-01 systemd[1]: Starting stacks.service - Stacks Blockchain...
Jul 01 14:39:13 stacks-node-01 systemd[1]: Started stacks.service - Stacks Blockchain
`

WARN [1719862813.367322] [stackslib/src/burnchains/bitcoin/network.rs:194] [main] Failed to handshake with 0.0.0.0:8333: SerializationError(Io(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" })) WARN [1719862813.367401] [stackslib/src/burnchains/bitcoin/network.rs:194] [main] Failed to handshake with 0.0.0.0:8333: SerializationError(Io(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" })) INFO [1719862813.480841] [testnet/stacks-node/src/run_loop/boot_nakamoto.rs:205] [epoch-2/3-boot] Failed to open Sortition DB while checking current burn height, assuming height = 0 INFO [1719862814.480987] [testnet/stacks-node/src/run_loop/boot_nakamoto.rs:205] [epoch-2/3-boot] Failed to open Sortition DB while checking current burn height, assuming height = 0

@jcnelson
Copy link
Member

jcnelson commented Jul 2, 2024

Your Bitcoin node is refusing to talk to your Stacks node. Can you confirm you're on Bitcoin 25.0 (which is what the docs say)? Also, can you post the [burnchain] portion of your Stacks node's config file (sans credentials)?

@nixfreak
Copy link
Author

nixfreak commented Jul 3, 2024

Thanks for replying .. I am using Bitcoin node version 27

Below is burnchain

[burnchain]
chain = "bitcoin"
mode = "mainnet"
peer_host = "127.0.0.1"
#peer_host = "0.0.0.0"
username = "btcuser" # bitcoin rpc username from bitcoin config
password = "btcpass" # bitcoin rpc password from bitcoin config
rpc_port = 8332      # bitcoin rpc port from bitcoin config
peer_port = 8333     # bitcoin p2p port from bitcoin config
satoshis_per_byte = 100
#burn_fee_cap = 20000
burn_fee_cap = 450000

@nixfreak
Copy link
Author

nixfreak commented Jul 3, 2024

burnchain]
chain = "bitcoin"
mode = "mainnet"
peer_host = "127.0.0.1"
#peer_host = "0.0.0.0"
username = "btcuser" # bitcoin rpc username from bitcoin config
password = "btcpass" # bitcoin rpc password from bitcoin config
rpc_port = 8332 # bitcoin rpc port from bitcoin config
peer_port = 8333 # bitcoin p2p port from bitcoin config
satoshis_per_byte = 100
#burn_fee_cap = 20000
burn_fee_cap = 450000

@nixfreak
Copy link
Author

nixfreak commented Jul 3, 2024

Your Bitcoin node is refusing to talk to your Stacks node. Can you confirm you're on Bitcoin 25.0 (which is what the docs say)? Also, can you post the [burnchain] portion of your Stacks node's config file (sans credentials)?

So your saying stacks doesn't work with the newest node version 27? ... It was working before though .. hmm I wonder if something changed on stacks end ? .. I guess doesn't matter .. so can I change versions of btc node without having to re-index everything again?

@nixfreak
Copy link
Author

nixfreak commented Jul 4, 2024

Going through step-by-step to setup stacks-blockchain node..

cd /stacks-blockchain/
cargo clean
output: warning: `/home/stacks1/stacks-blockchain/.cargo/config` is deprecated in favor of `config.toml` note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` Removed 3925 files, 2.3GiB total

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

2 participants