Skip to content

Fatal: Error starting protocol stack: listen unix <PATH_TO_DATADIR>/geth.ipc: bind: invalid argument #16342

Closed
@tappoz

Description

@tappoz

I am trying to run a private ethereum blockchain from a genesis configuration file creating/attaching nodes within a custom network ID.

System information

Geth version: geth version

$ geth version
Geth
Version: 1.8.3-unstable
Git Commit: 62bc179bb964e8852ff33f8fcebc916bbf938424
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.8.5
Operating System: linux
GOPATH=<MY_WORKSPACE_HERE>
GOROOT=/usr/local/go

OS & Version:

$ uname -a
Linux ag-deb-host 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64 GNU/Linux

Commit hash : 62bc179bb964e8852ff33f8fcebc916bbf938424

Expected behaviour

Setup a new private blockchain, then run a node with a custom network.

Actual behaviour

Error message: Fatal: Error starting protocol stack: listen unix <PATH_TO_DATADIR>/geth.ipc: bind: invalid argument

Steps to reproduce the behaviour

  • Create a data directory: mkdir ethereum_datadir_v1
  • Generate a new account: geth --datadir=./ethereum_datadir_v1 account new
  • Just use empty passwords, then make note of the account ID.
  • Modify genesis.json with that newly generated account ID.
  • Init a new node: geth --datadir=./ethereum_datadir_v1 init genesis.json
  • Start a new node: geth --datadir ethereum_datadir_v1 --nodiscover --networkid 1234

The configuration for genesis.json:

{
  "config": {
    "chainId": 0,
    "homesteadBlock": 0,
    "eip155Block": 0,
    "eip158Block": 0
  },
  "alloc": {
    "<THE_ACCOUNT_I_TOOK_NOTE_BEFORE>": {
      "balance": "42"
    }
  },
  "coinbase": "0x0000000000000000000000000000000000000000",
  "difficulty": "0x400",
  "extraData": "",
  "gasLimit": "0x2fefd8",
  "nonce": "0x0000000000000069",
  "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp": "0x00"
}

Backtrace

The error shows up at the end of this log:

$ geth --datadir ethereum_datadir_v1 --nodiscover --networkid 1234 
INFO [03-19|15:38:53] Maximum peer count                       ETH=25 LES=0 total=25
INFO [03-19|15:38:53] Starting peer-to-peer node               instance=Geth/v1.8.3-unstable-62bc179b/linux-amd64/go1.8.5
INFO [03-19|15:38:53] Allocated cache and file handles         database=<PATH_TO>/ethereum_datadir_v1/geth/chaindata cache=768 handles=512
INFO [03-19|15:38:53] Initialised chain configuration          config="{ChainID: 0 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: 0 EIP158: 0 Byzantium: <nil> Constantinople: <nil> Engine: unknown}"
INFO [03-19|15:38:53] Disk storage enabled for ethash caches   dir=<PATH_TO>/ethereum_datadir_v1/geth/ethash count=3
INFO [03-19|15:38:53] Disk storage enabled for ethash DAGs     dir=/home/<MY_USERNAME>/.ethash                                                                                                                                count=2
INFO [03-19|15:38:53] Initialising Ethereum protocol           versions="[63 62]" network=1234
INFO [03-19|15:38:53] Loaded most recent local header          number=0 hash=967b8e…a03d3a td=1024
INFO [03-19|15:38:53] Loaded most recent local full block      number=0 hash=967b8e…a03d3a td=1024
INFO [03-19|15:38:53] Loaded most recent local fast block      number=0 hash=967b8e…a03d3a td=1024
INFO [03-19|15:38:53] Loaded local transaction journal         transactions=0 dropped=0
INFO [03-19|15:38:53] Regenerated local transaction journal    transactions=0 accounts=0
INFO [03-19|15:38:53] Starting P2P networking 
INFO [03-19|15:38:53] RLPx listener up                         self="enode://72d30f2cff450b330f8dbbfe88a052b636441eb7d2e539623b6b013452643cca31beef780fbd157a21715f4409eb47e0e06be51e8ae7c4a2acd72dd504d8c5d4@[::]:30303?discport=0"
INFO [03-19|15:38:53] Blockchain manager stopped 
INFO [03-19|15:38:53] Stopping Ethereum protocol 
INFO [03-19|15:38:53] Ethereum protocol stopped 
INFO [03-19|15:38:53] Transaction pool stopped 
INFO [03-19|15:38:53] Database closed                          database=<PATH_TO>/ethereum_datadir_v1/geth/chaindata
Fatal: Error starting protocol stack: listen unix <PATH_TO>/ethereum_datadir_v1/geth.ipc: bind: invalid argument

That geth.ipc binding assuming is a file within the datadir, it's not there:

$ ls ethereum_datadir_v1/
geth  keystore
$ find ethereum_datadir_v1/ -name geth.ipc
$

I am not familiar with geth, so I am trying to checkout a tag or something from some sort of stable release and make it again, but I am not even sure the issue is with the unstable branch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions