-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Summary
anchor deploy (and therefore anchor test without --skip-deploy) fails early with:
HTTP status server error (503 Service Unavailable) for url (http://127.0.0.1:<rpc-port>/)
Backtrace points to:
anchor_cli::get_recommended_micro_lamport_feeanchor_cli::add_recommended_deployment_solana_args
Reproduce
- Start a local validator:
solana-test-validator \
--rpc-port 19899 \
--faucet-port 19900 \
--gossip-port 28000 \
--dynamic-port-range 28001-28080 \
--ledger /tmp/foracle-issue-ledger3 \
--reset- Confirm RPC is healthy:
curl -s -X POST -H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"getHealth"}' \
http://127.0.0.1:19899
# => {"jsonrpc":"2.0","result":"ok","id":1}- Run deploy with Anchor 0.32.1:
RUST_BACKTRACE=1 anchor deploy \
--provider.cluster http://127.0.0.1:19899 \
--provider.wallet <wallet-path>Actual behavior
Fails immediately with:
Error: HTTP status server error (503 Service Unavailable) for url (http://127.0.0.1:19899/)
Caused by:
HTTP status server error (503 Service Unavailable) for url (http://127.0.0.1:19899/)
Stack backtrace:
0: std::backtrace::Backtrace::capture
1: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
2: anchor_cli::get_recommended_micro_lamport_fee
3: anchor_cli::add_recommended_deployment_solana_args
4: anchor_cli::deploy
Expected behavior
If RPC is healthy, deploy should continue normally.
If fee recommendation query fails, it should gracefully fall back (or return a precise RPC/method error) instead of aborting with a generic 503.
Notes
- This blocks
anchor testas well (because test triggers deploy). - Workaround: pass explicit CU price to bypass auto-recommended fee path:
anchor deploy --provider.cluster http://127.0.0.1:19899 \
--provider.wallet <wallet-path> \
-- --with-compute-unit-price 1Environment
anchor-cli 0.32.1solana-cli 3.0.11 (Agave)rustc 1.89.0- macOS 14.5 (arm64)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels