首页 > 解决方案 > 无法连接到远程 geth:等待管道 '\\.\pipe\geth.ipc' 可用时超时

问题描述

我运行这个命令geth attach ipc:\.\pipe\geth.ipc显示这种类型的消息

Unable to attach to remote geth: Timed out waiting for pipe '\\.\pipe\geth.ipc' to come available

请你给我建议。我,是新手。

标签: ethereum

解决方案


在运行 geth 节点本身时,指定 ipcpath。它将在单个窗口中为您打开 geth 节点、ipc 和 javascript 控制台。试试下面的命令。

geth --datadir ../../private-network/node1 \
      --networkid 2061 \(it should be same, if you are running multiple nodes)
      --port 30304 \ (should be different for every nodes)
      --nodiscover \
      --rpc \
      --rpcaddr 127.0.0.1 \
      --rpcport 8504 \ (should be different for every nodes)
      --ipcpath ../../private-network/node1/geth.ipc \
      --mine --minerthreads 1 --gasprice "10000" \
      --etherbase 0xf628e41f3ca68341e9857102d4b3040aa418d763 \ (your coinbase account address)
      --verbosity 3 console

给定脚本的一个示例。

geth --datadir=D:/Blockchain_Tech/node1 --networkid 2061 --port 30305 --nodiscover --rpc --rpcaddr 127.0.0.1 --rpcport 8505 --ipcpath=D:/Blockchain_Tech/node1/geth.ipc --mine --minerthreads 1 --gasprice "10000" --etherbase 0x58ef18d5667552b4c0524b9a78cbf9493d2bd74a --verbosity 3 console

注意:- 此脚本适用于 MS-Windows。


推荐阅读