我想访问geth.ipc文件,以便通过IPC连接geth。我有一个建议,它建议我访问geth.ipc,但我没有在我的mac上找到它。你能告诉我那个文件是什么时候制作的吗?顺便说一句,我用git安装了围棋,如下所示。
git clone https://github.com/ethereum/go-ethereum
这张图片显示了我的Ethereum目录。它不包含geth.ipc对吗?
发布于 2016-02-19 07:32:07
只有当Geth实际运行时,IPC文件才会出现。所以一定要启动Geth,您应该会看到这样的消息。
I0219 09:45:48.128503 node/node.go:290] IPC endpoint opened: /Users/username/Library/Ethereum/geth.ipc
这里显示的位置取决于您的操作系统。这些是其他的选择。
~/Library/Ethereum/
~/.ethereum/
~/AppData/Roaming/Ethereum
发布于 2016-02-19 10:10:00
IPC是进程间通信的缩写,在您的安装或环境中不是标准文件,而是域套接字。
安装geth
之后,不会自动创建ipc套接字,它也不会是一个永久的资源。
geth.ipc
套接字只有在geth
运行时才存在。可以使用--ipcpath "/path/to/my/geth.ipc"
标志指定ipc路径。可以使用--ipcapi
标志控制可用的apis。您可以使用--ipcdisable
禁用IPC。来自geth --help
:
--ipcdisable Disable the IPC-RPC server
--ipcapi "admin,eth,debug,miner,net,shh,txpool,personal,web3" API's offered over the IPC-RPC interface
--ipcpath "geth.ipc" Filename for IPC socket/pipe within the datadir (explicit paths escape it)
阅读更多关于围棋的wiki 浅谈管理apis。
发布于 2022-01-24 02:54:05
对于window10,
路径采用.\pipe\xxxxx.ipc格式。
如果你的config.toml里有这个
[Node]
IPCPath = "geth.ipc"
你可以
geth_windows.exe attach \\.\pipe\geth.ipc
https://ethereum.stackexchange.com/questions/1492
复制相似问题