我运行这个命令geth-attach-ipc:\。\pipe\geth.ipc显示这种类型的消息
Unable to attach to remote geth: Timed out waiting for pipe '\.pipegeth.ipc' to come available
你能推荐我吗?我是新手。
您试图在哪个环境中实现它?如果是windows,请尝试
geth attach ipc:\.pipegeth.ipc
此外,请确保IPC未被禁用--ipcdisable标志。如果您在一个环境中运行多个geth,请禁用所有geth节点的ipc,但要实现的节点除外。
在运行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。