3

I'm running a geth instance on the consensys testnet. I started it with the following command:

geth --testnet --networkid=2 --bootnodes=enode://b1217cbaa440e35ed471157123fe468e19e8b5ad5bedb4b1fdbcbdab6fb2f5ed3e95dd9c24a22a79fdb2352204cea207df27d92bfd21bfd41545e8b16f637499@104.44.138.37:30303 --genesis=/tmp/genesis.json --datadir=~/.ethereum-consensys-public-testnet

Now I'm trying to run mist on top of this but it does not work at all, because it can not connect to the geth IPC.

 $ mist
CONNECT to IPC PATH: /home/user/.ethereum/geth.ipc
NODECONNECTOR ERROR { [Error: connect ECONNREFUSED /home/user/.ethereum/geth.ipc]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '/home/user/.ethereum/geth.ipc' }
Node type:  geth
Network:  main

It tries to connect to the main network IPC. I tried several flags on the mist command, but it does not seem to recognize them. How to connect mist to a testnet client?

4

Move your ~/.ethereum wallet to a different location (if you already have one so as not to mess up your live stuff), take off the --datadir on your geth line, re-run everything, and it should work. ~/.ethereum is hard coded in Mist. (for now?)

https://github.com/ethereum/mist/blob/v0.3.8/modules/ipc/getIpcPath.js

module.exports = function() {
    var p = require('path');
    var path = global.path.HOME;

    if(process.platform === 'darwin')
        path += '/Library/Ethereum/geth.ipc';

    if(process.platform === 'freebsd' ||
       process.platform === 'linux' ||
       process.platform === 'sunos')
        path += '/.ethereum/geth.ipc';

    if(process.platform === 'win32')
        path = '\\\\.\\pipe\\geth.ipc';

    console.log('CONNECT to IPC PATH: '+ path);
    return path;
};

Alternatively, you can have just have the .ipc file in the right place that Mist is looking for it (specify an IPC file in the ~/.ethereum directory from geth and a datadir some other place), but to me this seems more complicated.

  • 1
    Please note that, this file does not exist anymore under /ipc folder. It putted into modules/menuItems.js and modules/settings.js – alper Nov 23 '16 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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