2

My app launches Geth process like this: geth --cache=512 --rpc
Next it immediately starts to process incoming requests and sends some needed data to http://localhost:8545 (i.e. to geth for the interaction by RPC protocol).
However at the first time after launch (about 5 seconds) geth returns:

Failed to connect to localhost port 8545: Connection refused

Afterwards it works great.

Is such behavior standard?

1

it is normal, rpc server needs some time to run and sometimes it could fail then you should start it within the cli.

| improve this answer | |

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.