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

Contract deployment fails with internal "connection refused" error in single-node Zilliqa setup (not RPC connection) #1622

Open
PurrProof opened this issue Oct 11, 2024 · 0 comments

Comments

@PurrProof
Copy link

Contract Deployment Fails with "Connection Refused" Error When Running Zilliqa Node Manually

Description:

I am running a Zilliqa node using the following command:

$ RUST_LOG=zilliqa=warn,zilliqa=info ./target/debug/zilliqa 65d7f4da9bedc8fb79cbf6722342960bbdfb9759bc0d9e3fb4989e831ccbc227 -c config-single-node.toml 2>&1
2024-10-11T11:06:21.328011Z  INFO zilliqa::p2p_node: 99: peer_id=12D3KooWESMZ2ttSxDwjfnNe23sHCqsJf6sNEKwgHkdgtCHDsbWU
2024-10-11T11:06:21.849639Z  INFO zilliqa::node_launcher: 138: JSON-RPC server listening on port 4201

This approach to run the node is based on the script from Zilliqa's repo.

When trying to deploy a contract using the GoZilliqa SDK, I encounter the following logs:

2024-10-11T11:05:29.813321Z  INFO zilliqa::exec: 566: executing txn hash=e5358c7f823125c4ea53f5e4a104b97327d5b70e35674961276af2a124a428aa txn=VerifiedTransaction { tx: Zilliqa { tx: TxZilliqa { chain_id: 1, nonce: 1, gas_price: ZilAmount(2000000016), gas_limit: ScillaGas(100000), to_addr: 0x0000000000000000000000000000000000000000, amount: ZilAmount(0), code: "...", signer: 0x8d393a22e4476ff8212de13fe1939de2a236f0a7, hash: e5358c7f823125c4ea53f5e4a104b97327d5b70e35674961276af2a124a428aa }

2024-10-11T11:05:29.816857Z  WARN zilliqa::consensus: 842: transaction failed to execute hash=e5358c7f823125c4ea53f5e4a104b97327d5b70e35674961276af2a124a428aa error=Transport(Http(Stream(hyper_util::client::legacy::Error(Connect, ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })))))

especially this: error=Transport(Http(Stream(hyper_util::client::legacy::Error(Connect, ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })))))

The error message indicates a Connection Refused issue, and the transaction fails. However, the transaction is reported as processed in the response:

{
    "id": 0,
    "jsonrpc": "2.0",
    "result": {
        "Info": "Txn processed",
        "TranID": "0xe5358c7f823125c4ea53f5e4a104b97327d5b70e35674961276af2a124a428aa"
    }
}

When I start the Zilliqa node using docker compose up, the contract deploys successfully, and no such connection issue occurs.

Possible Issue:

  • The "Connection Refused" error seems to be an internal issue with the manual setup.
  • No such problem occurs when the node is started using Docker.

Can you please help clarify the source of this connection refusal error when manually starting the node, and suggest a fix or workaround?

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

No branches or pull requests

1 participant