2

This question is somewhat related to this one. Following the suggestion in the comments from this one, I upgraded geth to v1.4.10 and launched it and launched it on a private net:

geth --datadir "data_dir" --mine --minerthreads 3 --networkid 13 --rpcapi eth,web3,personal --rpc --maxpeers 0

which outputs:

I0728 04:00:12.289151 ethdb/database.go:82] Alloted 128MB cache and 1024 file handles to data_dir/chaindata
I0728 04:00:12.397333 ethdb/database.go:169] closed data_dir/chaindata
I0728 04:00:12.414075 ethdb/database.go:82] Alloted 128MB cache and 1024 file handles to data_dir/chaindata
I0728 04:00:12.493681 eth/backend.go:621] upgrading db log bloom bins
I0728 04:00:12.494120 eth/backend.go:629] upgrade completed in 451.405µs
I0728 04:00:12.494465 ethdb/database.go:82] Alloted 16MB cache and 16 file handles to data_dir/dapp
I0728 04:00:12.513689 eth/backend.go:172] Protocol Versions: [63 62], Network Id: 13
I0728 04:00:12.513976 eth/backend.go:201] Blockchain DB Version: 3
I0728 04:00:12.515930 core/blockchain.go:206] Last header: #0 [23812aaa…] TD=256
I0728 04:00:12.516065 core/blockchain.go:207] Last block: #0 [23812aaa…] TD=256
I0728 04:00:12.516132 core/blockchain.go:208] Fast block: #0 [23812aaa…] TD=256
I0728 04:00:12.519883 p2p/server.go:313] Starting Server
I0728 04:00:15.109229 p2p/discover/udp.go:217] Listening, enode://449870522cf99663f642a60e84e191ca30af45c5fa0c6fbb199d8967dd268f7c3c09a8fb42720a84c0bb8a984a31d01b4255f5d56f0c6eb98b498f111c52c7bb@[::]:30303
I0728 04:00:15.111252 eth/backend.go:454] Automatic pregeneration of ethash DAG ON (ethash dir: /home/user/.ethash)
I0728 04:00:15.111370 p2p/server.go:556] Listening on [::]:30303
I0728 04:00:15.112044 eth/backend.go:461] checking DAG (ethash dir: /home/user/.ethash)
I0728 04:00:15.151132 node/node.go:296] IPC endpoint opened: data_dir/geth.ipc
I0728 04:00:15.195940 node/node.go:366] HTTP endpoint opened: http://localhost:8545
I0728 04:00:15.196123 miner/miner.go:119] Starting mining operation (CPU=1 TOT=2)
I0728 04:00:15.197119 miner/worker.go:573] commit new work on block 1 with 0 txs & 0 uncles. Took 863.195µs
I0728 04:00:15.197251 ethash.go:259] Generating DAG for epoch 0 (size 1073739904) (0000000000000000000000000000000000000000000000000000000000000000)
I0728 04:00:17.619117 ethash.go:276] Done generating DAG for epoch 0, it took 2.421872731s
I0728 04:01:27.849348 miner/worker.go:339] 🔨  Mined block (#1 / 40857370). Wait 5 blocks for confirmation
I0728 04:01:27.850663 miner/worker.go:573] commit new work on block 2 with 0 txs & 0 uncles. Took 1.087017ms
I0728 04:01:27.851682 miner/worker.go:573] commit new work on block 2 with 0 txs & 0 uncles. Took 805.394µs
I0728 04:01:31.725157 miner/worker.go:339] 🔨  Mined block (#2 / 9c48d944). Wait 5 blocks for confirmation
I0728 04:01:31.725710 miner/worker.go:573] commit new work on block 3 with 0 txs & 0 uncles. Took 388.348µs

When I try to connect to the IPC in data_dir/geth.ipc I get the error:

Fatal: Unable to attach to remote geth: invalid endpoint

Connecting to the IPC endpoint is done by running:

geth --ipcpath "data_dir/geth.ipc" attach

How is it possible to connect to the geth IPC endpoint in geth (> 1.4.xx)?

1 Answer 1

2

If your current directory is /home/user, your IPC file will be created in /home/user/data_dir/geth.ipc.

Connect using IPC with the following command:

user@Kumquat:~$ geth attach ipc://home/user/data_dir/geth.ipc

I could not get geth to use the relative path name, but the full path name works.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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