0

System information

Geth Version: 1.7.3-stable

Git Commit: 4bb3c89d44e372e6a9ab85a8be0c9345265c763a

Operating System: linux

Expected behaviour

Connect Mist with local private network

Actual behaviour

I type command :

geth --datadir ~/private_network init ~/private_network/genesis.json

geth --datadir ~/private_network --networkid 3131 --ipcpath ~/private_network/geth.ipc console 2>~/private_network/console.log

and I run Mist but I have an error "address already in use" even if I kill processes that uses port 30303 I have the same result

Backtrace

~/.ethereum/testnet/geth/ethash count=3

INFO [12-16|12:05:37] Disk storage enabled for ethash DAGs dir=~/.ethash count=2

INFO [12-16|12:05:37] Initialising Ethereum protocol versions="[63 62]" network=3

INFO [12-16|12:05:37] Loaded most recent local header number=797369 hash=81c88e…3044c5 td=587702682055345

INFO [12-16|12:05:37] Loaded most recent local full block number=0 hash=419410…ca4a2d td=1048576

INFO [12-16|12:05:37] Loaded most recent local fast block number=761870 hash=08735b…e597b9 td=571350456833753

INFO [12-16|12:05:37] Loaded local transaction journal transactions=0 dropped=0

INFO [12-16|12:05:37] Upgrading chain index type=bloombits percentage=79

INFO [12-16|12:05:37] Regenerated local transaction journal transactions=0 accounts=0

INFO [12-16|12:05:37] Starting P2P networking Fatal: Error starting protocol stack: listen udp :30303: bind: address already in use

Community
  • 1
  • 1
Johan Rm
  • 151
  • 1
  • 5
  • 17

1 Answers1

4

You're connecting to the Ropsten network (network=3). You have to pass in your network id into Mist using the --network option and provide the path to your .ipc file using --rpc.

$ ./Mist.exe --network 3131 --rpc ~/private_network/geth.ipc

Full command line options:

$ ./Mist.exe --help

Usage: Mist.exe --help [Mist options] [Node options]

Mist options:
  --mode, -m              App UI mode: wallet, mist.  [string] [default: "mist"]
  --node                  Node to use: geth, eth        [string] [default: null]
  --network               Network to connect to: main, test
                                                        [string] [default: null]
  --rpc                   Path to node IPC socket file OR HTTP RPC hostport (if
                          IPC socket file then --node-ipcpath will be set with
                          this value).                                  [string]
  --swarmurl              URL serving the Swarm HTTP API. If null, Mist will
                          open a local node.
                                     [string] [default: "http://localhost:8500"]
  --gethpath              Path to Geth executable to use instead of default.
                                                                        [string]
  --ethpath               Path to Eth executable to use instead of default.
                                                                        [string]
  --ignore-gpu-blacklist  Ignores GPU blacklist (needed for some Linux
                          installations).                              [boolean]
  --reset-tabs            Reset Mist tabs to their default settings.   [boolean]
  --logfile               Logs will be written to this file in addition to the
                          console.                                      [string]
  --loglevel              Minimum logging threshold: info, debug, error, trace
                          (shows all logs, including possible passwords over
                          IPC!).                      [string] [default: "info"]
  --syncmode              Geth synchronization mode: [fast|light|full]  [string]
  --version, -v           Display Mist version.                        [boolean]
  --skiptimesynccheck     Disable checks for the presence of automatic time sync
                          on your OS.                                  [boolean]

Node options:
  -  To pass options to the underlying node (e.g. Geth) use the --node- prefix,
     e.g. --node-datadir

Options:
  -h, --help  Show help                                                [boolean]
Adam Kipnis
  • 10,175
  • 10
  • 35
  • 48
  • Thank you for your reply. Why are the arguments used with the comand geth not taken into account ? geth --datadir ~/private_network --networkid 3131 --ipcpath ~/private_network/geth.ipc – Johan Rm Dec 17 '17 at 18:45
  • I don't think geth is your problem here. I think it's Mist not detecting that geth is already running via command line. You may be starting Mist with a different data node which is causing it to attempt to spawn another instance of geth. This would explain why the error message you're getting is that the port is already in use. Notice how you're starting geth with ~/private_network as your `datadir`, but the Mist log shows dir=~/.ethash – Adam Kipnis Dec 18 '17 at 00:46