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

Connection timed out, ExitStatus(unix_wait_status(25856)) #3183

Open
congmucc opened this issue Aug 20, 2024 · 6 comments
Open

Connection timed out, ExitStatus(unix_wait_status(25856)) #3183

congmucc opened this issue Aug 20, 2024 · 6 comments
Labels
bug Something isn't working cli

Comments

@congmucc
Copy link

I get an error when I run anchor deploy

Deploying cluster: https://api.devnet.solana.com
Upgrade authority: /root/.config/solana/id.json
Deploying program "counter"...
Program path: /home/blockchain/solana/counter/target/deploy/counter.so...
thread 'main' panicked at cli/src/program.rs:2809:26:
Should return a valid tpu client: PubsubError(ConnectionError(Io(Os { code: 110, kind: TimedOut, message: "Connection timed out" })))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(25856)), stdout: "", stderr: "" }.



root@WIN-73FSLR1FGIE:/home/blockchain/solana/counter# RUST_BACKTRACE=1 anchor deploy
Deploying cluster: https://api.devnet.solana.com
Upgrade authority: /root/.config/solana/id.json
Deploying program "counter"...
Program path: /home/blockchain/solana/counter/target/deploy/counter.so...
thread 'main' panicked at cli/src/program.rs:2809:26:
Should return a valid tpu client: PubsubError(ConnectionError(Io(Os { code: 110, kind: TimedOut, message: "Connection timed out" })))
stack backtrace:
   0: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1653:5
   3: solana_cli::program::send_deploy_messages
   4: solana_cli::program::do_process_program_write_and_deploy
   5: solana_cli::program::process_program_subcommand
   6: solana_cli::cli::process_command
   7: solana::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(25856)),97/265: winnow, rayon-core, itertools, ran

Background :

root@WIN-73FSLR1FGIE:/# solana -V
solana-cli 1.18.17 (src:b685182a; feat:4215500110, client:SolanaLabs)
root@WIN-73FSLR1FGIE:/# anchor -V
anchor-cli 0.30.1

root@WIN-73FSLR1FGIE:/# solana config get
Config File: /root/.config/solana/cli/config.yml
RPC URL: https://api.devnet.solana.com 
WebSocket URL: wss://api.devnet.solana.com/ (computed)
Keypair Path: /root/.config/solana/id.json 
Commitment: confirmed 



root@WIN-73FSLR1FGIE:/# lsb_release -a
uname -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
Linux WIN-73FSLR1FGIE 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Anchor.toml:

[features]
resolution = true
skip-lint = false

[programs.devnet]
counter = "GHQc61dwD27ZSVHF6GfDRWDzGAP55CwcNUrYP9SDG6vg"

[registry]
url = "https://anchor.projectserum.com"

[provider]
cluster = "devnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

Cargo.toml

[package]
name = "counter"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "counter"

[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build"]

[dependencies]
anchor-lang = "0.30.1"

rs

use anchor_lang::prelude::*;
use std::ops::DerefMut;

/// other code

Expect:

I just want to deploy in devnet, and I can search this contract.

@acheroncrypto acheroncrypto added bug Something isn't working cli labels Aug 20, 2024
@acheroncrypto
Copy link
Collaborator

Have you tried using anchor deploy -- --use-rpc?

@congmucc
Copy link
Author

Have you tried using anchor deploy -- --use-rpc?

It's cool, thank you! Could you tell me why this institution is the right choice?

@congmucc
Copy link
Author

congmucc commented Sep 8, 2024

Have you tried using anchor deploy -- --use-rpc?

I'm trying to figure out why this works here, but anchor deploy doesn't work, and in my case, anchor test doesn't work either.

root@WIN-73FSLR1FGIE:/home/blockchain/solana/counter# anchor test
    Finished release [optimized] target(s) in 0.10s
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.11s
     Running unittests src/lib.rs (/home/blockchain/solana/counter/target/debug/deps/counter-a2f80dcd84dd6453)
Deploying cluster: https://api.devnet.solana.com
Upgrade authority: /root/.config/solana/id.json
Deploying program "counter"...
Program path: /home/blockchain/solana/counter/target/deploy/counter.so...
thread 'main' panicked at cli/src/program.rs:2809:26:
Should return a valid tpu client: PubsubError(ConnectionError(Io(Os { code: 110, kind: TimedOut, message: "Connection timed out" })))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(25856)), stdout: "", stderr: "" }.
root@WIN-73FSLR1FGIE:/home/blockchain/solana/counter# 

@congmucc congmucc reopened this Sep 8, 2024
@congmucc
Copy link
Author

congmucc commented Sep 9, 2024

@acheroncrypto

@acheroncrypto
Copy link
Collaborator

This error depends on the RPC endpoint you use, but it's worth noting that RPC deployments are more reliable currently.

@congmucc
Copy link
Author

This error depends on the RPC endpoint you use, but it's worth noting that RPC deployments are more reliable currently.

I have an example of rpc,

[features]
resolution = true
skip-lint = false

[programs.devnet]
counter = "GHQc61dwD27ZSVHF6GfDRWDzGAP55CwcNUrYP9SDG6vg"

[registry]
url = "https://anchor.projectserum.com"

[provider]
cluster = "devnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

and I have an endpoints of Helius, but It's also wrong.

@acheroncrypto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli
Projects
None yet
Development

No branches or pull requests

2 participants