4

I'm trying to start Geth from an offline machine. An answer in a related question seems to indicate this is possible.

However, running the command $ geth hangs at Starting Server. Trying to attach an IPC console via geth attach fails, complaining about a missing geth.ipc file. Attempting to pass in one-off commands via console hangs as well.

I'm getting the feeling a network connection is needed for Geth to complete its bootstrapping process. Has this been the case for others, or should Geth be able to start offline?

I'm running Ubuntu 14.04 and Geth 1.4.0-unstable.

  • Also tried Geth v1.3.4. Same result. – thoCoStuff Mar 3 '16 at 3:31
  • I'm not really sure why you would want to do this, but if you just want to experiment with the software and simulate a network locally maybe something like the github.com/ethereumjs/testrpc is what you need? – MrChico Mar 4 '16 at 1:22
  • The intention was to use geth as a means to sign transactions on a cold storage machine that wouldn't have access to the internet. Just browsing quickly through the advertised methods on testrpc, it doesn't look to be capable of this. – thoCoStuff Mar 4 '16 at 1:40
  • I see. Then testrpc is of no use as it would not give you access to your private keys. But it sounds like github.com/ethereumjs/ethereumjs-tx is what you need, if you are not able to get geth working offline – MrChico Mar 4 '16 at 2:08
  • Out of curiosity, could you try --nat=none? – Péter Szilágyi Mar 4 '16 at 9:28
2

In theory using geth offline should be fine.

In practice we've heard some rare reports that geth gets stuck on starting the "server" and it seems that the UPnP lookup is to be blamed, that for some reason neither succeeds, neither fails, neither times out. You could try to disable Network Address Translation (--nat=none) that relies on UPnP to see if it solves the issue while we're fixing it.

Hopefully we can figure out what goes wrong and have it patched up in Geth 1.4. Here's the issue on our tracker: https://github.com/ethereum/go-ethereum/issues/2291

  • The bug I wanted to use is fixed. I am unable to start geth in offline mode by using --nat=none in Version: 1.8.13-stable – Ayushya Aug 6 '18 at 21:25
0

If geth is not connected to any peers, it will not download the chain. Geth can be run in offline mode by using --maxpeers 0 option.

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.