BitBoxSwiss / bitbox-wallet-app

The BitBoxApp for desktop and mobile.
https://bitbox.swiss/app
Apache License 2.0
254 stars 82 forks source link

scripts: fix run_regtest.sh electrs panic #2842

Closed NicolaLS closed 2 months ago

NicolaLS commented 2 months ago

By default electrs serves Prometheus metrics on 127.0.0.1:24224 for regtest. Because we run two electrs containers one always panic because the port is alrady in use. This commit configures one of the two electrs servers to serve metrics on 24225 instead to avoid the crash.

[2024-08-05T19:54:21.513Z INFO  electrs::metrics::metrics_impl] serving Prometheus metrics on 127.0.0.1:24224
[2024-08-05T19:54:21.513Z INFO  electrs::server] serving Electrum RPC on 127.0.0.1:52001
thread 'metrics' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', src/metrics.rs:30:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace