substrate启动常见问题

-<1:%>- cargo build --release
   Compiling node-template-runtime v4.0.0-dev (/Users/xuanwenchao/Documents/projects/Rust/substrate-node-template/runtime)
   Compiling pallet-poe v4.0.0-dev (/Users/xuanwenchao/Documents/projects/Rust/substrate-node-template/pallets/poe)
   Compiling node-template v4.0.0-dev (/Users/xuanwenchao/Documents/projects/Rust/substrate-node-template/node)
    Finished release [optimized] target(s) in 1m 27s
-<%>-   ./target/release/node-template --tmp --dev
2023-03-30 11:12:50 Running in --dev mode, RPC CORS has been disabled.
2023-03-30 11:12:50 Substrate Node
2023-03-30 11:12:50 ✌️  version 4.0.0-dev-7ce49b8-aarch64-macos
2023-03-30 11:12:50 ❤️  by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2023
2023-03-30 11:12:50 📋 Chain specification: Development
2023-03-30 11:12:50 🏷 Node name: cooperative-wrench-0354
2023-03-30 11:12:50 👤 Role: AUTHORITY
2023-03-30 11:12:50 💾 Database: RocksDb at /var/folders/8z/hq_yvw055hg0rt8hkgt75ty00000gn/T/substrate7fMllY/chains/dev/db/full
2023-03-30 11:12:50 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)
2023-03-30 11:12:50 🔨 Initializing Genesis block/state (state: 0xb5fe…b400, header-hash: 0x5c50…c4eb)
2023-03-30 11:12:50 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2023-03-30 11:12:50 ⏱  Loaded block-time = 6s from block 0x5c5065188c16e08d10f3ede1344fb8696ee82abf687c7b25947032c15b0dc4eb
2023-03-30 11:12:50 Using default protocol ID "sup" because none is configured in the chain specs
2023-03-30 11:12:50 🏷 Local node identity is: 12D3KooWPyuh5L9arf76NwNt4o5TU8VzBTbqRi6aQGBcUyxkmvk4

在这里插入图片描述

如果如法连接https://polkadot.js.org/apps/#/explorer
有可能是端口号占用了,启动日志中可以看到

2023-03-30 13:48:07 📦 Highest known block at #0
2023-03-30 13:48:07 Unable to bind RPC server to 127.0.0.1:9933. Trying random port.
2023-03-30 13:48:07 Unable to listen on 127.0.0.1:9944
2023-03-30 13:48:07 Unable to bind RPC server to 127.0.0.1:9944. Trying random port.
2023-03-30 13:48:07 Listening for new connections on 127.0.0.1:49546.
2023-03-30 13:48:12 🙌 Starting consensus session on top of parent 0x5c5065188c16e08d10f3ede1344fb8696ee82abf687c7b25947032c15b0dc4eb

方法一:可以用如下命令查看、然后杀掉这个进程,然后重新启动

-<1:%>- netstat -tnl | grep 9944
tcp4     508      0  127.0.0.1.9944                                127.0.0.1.64602                               CLOSE_WAIT
tcp4       0      0  127.0.0.1.64602                               127.0.0.1.9944                                FIN_WAIT_2
-<%>- kill 508

方法二是将网页上的端口号改为上方列表的端口
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xuanwenchao

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值