Конечная точка Geth IPC недоступна после обновления с 1.3.5 до 1.4.10

Этот вопрос несколько связан с этим . Следуя предложению в комментариях к этому , я обновил geth до версии 1.4.10, запустил его и запустил в частной сети:

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

который выводит:

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

Когда я пытаюсь подключиться к IPC, data_dir/geth.ipcя получаю сообщение об ошибке:

Fatal: Unable to attach to remote geth: invalid endpoint

Подключение к конечной точке IPC выполняется путем запуска:

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

Как можно подключиться к конечной точке IPC geth в geth (> 1.4.xx)?

Ответы (1)

Если ваш текущий каталог /home/user, ваш файл IPC будет создан в формате /home/user/data_dir/geth.ipc.

Подключитесь с помощью IPC с помощью следующей команды:

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

Я не мог gethиспользовать относительное имя пути, но полное имя пути работает.

Спасибо. Где вы нашли синтаксис для команды attach?