1

I failed to load a script into a private blockchain setup using puppeth. I have used puppeth to configure a private blockchain (PoA) with a few sealers on different vms. Could someone help?

I now need to load a script. I tried using:

geth --preload "/path/to/hello.js"

with the error: Error starting protocol stack: datadir already used by another process since the vm has the sealer nodes running in a docker. The proof is here after running ps aux: geth --networkid <...>--cache <>--port <...>--maxpeers <....>--ethstats <...> --bootnodes ....

I tried loading the script directly through the console by doing this:

docker exec -it <container ID> geth  attach ipc:/root/.ethereum/geth.ipc

and in the console type: loadScript('hello.js') where hello.js is in the directory where I typed the geth attach command above. Also tried loadScript('path to hello')

All of the following links state that the path to the javascript is incorrect but I ensured that the file path is where it should or is where I ran geth attach. My goal is to have script running even if I need to stop the docker container and restart geth. But the issue is that I cannot pass the --preload argument because I am using puppeth, I think :)

  1. How can access to a external file using loadScript?
  2. loadScript() returns false error

Your Answer

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

Browse other questions tagged or ask your own question.