Ethereum Stack Exchange is a question and answer site for users of Ethereum, the crypto value and blockchain-based consensus network. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to access geth.ipc file in order to connect geth via IPC. I've got an advice and it suggested me to access geth.ipc, but I've not found it on my mac. Could you tell me when that file is produced? Btw, I installed go-ethereum by git as follows.

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

The image shows my Ethereum directory. Doesn't it contain geth.ipc right? enter image description here

share|improve this question
up vote 4 down vote accepted

The IPC file is only present when Geth is actually running. So be sure to start Geth and you should see a message like.

I0219 09:45:48.128503 node/node.go:290] IPC endpoint opened: /Users/username/Library/Ethereum/geth.ipc

The location displayed here depends on your operating system, these are the other options.

OS X

~/Library/Ethereum/

Linux

~/.ethereum/

Windows

~/AppData/Roaming/Ethereum

share|improve this answer
    
Thx Maran. But, I cannot find it on ~/Library/Ethereum. Could you tell me when the dierectory(~/Library/Ethereum) was installed? When I did git clone https://github.com/ethereum/go-ethereum? – toshikaseda Feb 19 at 7:35
    
Did you run Geth yet? It needs to be run in order to create the folders. – Maran Feb 19 at 8:07
    
I did. It seems that, because I didn't update ethereum, the geth.ipc didn't exist on my mac. Now, I'm running brew upgrade. – toshikaseda Feb 19 at 8:13
    
I've updated question.I've checked Ethereum directory after brew update && brew upgrade and brew update && brew reinstall ethereum . However, it contains geth.ipc. Should I reinstall Ethereum? – toshikaseda Feb 19 at 8:23
    
Please start Geth and keep it running. The file should be there. – Maran Feb 19 at 8:44

IPC is short for inter-process communication and is no standard file in your installation or environment but rather a domain socket.

After you installed geth the ipc socket is not automatically created and its also not considerable a permanent resource.

The geth.ipc socket only exists as long as geth is running. You can specify the ipc path with the --ipcpath "/path/to/my/geth.ipc" flag. You can control the available apis with the --ipcapi flag. You can disable IPC with --ipcdisable. From 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)

Read more on the go-ethereum wiki on management apis.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.