首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >何时生成geth.ipc文件?

何时生成geth.ipc文件?
EN

Ethereum用户
提问于 2016-02-19 07:07:59
回答 3查看 29.4K关注 0票数 17

我想访问geth.ipc文件,以便通过IPC连接geth。我有一个建议,它建议我访问geth.ipc,但我没有在我的mac上找到它。你能告诉我那个文件是什么时候制作的吗?顺便说一句,我用git安装了围棋,如下所示。

git clone https://github.com/ethereum/go-ethereum

这张图片显示了我的Ethereum目录。它不包含geth.ipc对吗?

EN

回答 3

Ethereum用户

回答已采纳

发布于 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

这里显示的位置取决于您的操作系统。这些是其他的选择。

macOS

~/Library/Ethereum/

Linux

~/.ethereum/

Windows

~/AppData/Roaming/Ethereum

票数 21
EN

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

代码语言:javascript
运行
复制
--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

票数 10
EN

Ethereum用户

发布于 2022-01-24 02:54:05

对于window10,

路径采用.\pipe\xxxxx.ipc格式。

如果你的config.toml里有这个

代码语言:javascript
运行
复制
[Node]
IPCPath = "geth.ipc"

你可以

代码语言:javascript
运行
复制
geth_windows.exe attach \\.\pipe\geth.ipc
票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/1492

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档