Skip to content

fix: drop geth's stderr handle #2104

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

Merged
merged 6 commits into from
Mar 18, 2025
Merged

fix: drop geth's stderr handle #2104

merged 6 commits into from
Mar 18, 2025

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Feb 22, 2025

same as #1985 but for stderr because geth logs everything to stderr

closes #2091

@gnapoli23 could you perhaps try this?

@gnapoli23
Copy link
Contributor

@mattsse

Not working. I checked with a simple test:

#[tokio::test]
async fn test_geth_connection() {
    let geth = Geth::new().dev().spawn();
    let provider = ProviderBuilder::new().on_http(geth.endpoint_url());

    let _ = provider.get_block_number().await.unwrap();
}

It's unable to get the connection through the provider:

thread 'http::test_geth_connection' panicked at crates/provider/tests/it/http.rs:9:47:
called `Result::unwrap()` on an `Err` value: Transport(Custom(reqwest::Error { kind: Request, url: "http://localhost:45635/", source: hyper_util::client::legacy::Error(Connect, ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))

@yash-atreya yash-atreya self-requested a review as a code owner March 18, 2025 11:26
Comment on lines +651 to +652
// We need to consume the stderr otherwise geth is non-responsive and RPC server results
// in connection refused.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we link the issue here

@yash-atreya yash-atreya enabled auto-merge (squash) March 18, 2025 13:48
@yash-atreya yash-atreya merged commit 606fa2b into main Mar 18, 2025
27 checks passed
@yash-atreya yash-atreya deleted the matt/drop-stderr-handle branch March 18, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] GethInstance dropping connections with the underlying node
3 participants