I am setting up a private network using geth by the method static- nodes. I have created the static nodes.json file with 4 enodes and put it in the /usr/local/cellar/test2/geth/static-nodes.json. In terminal when I'm running the console command I getting an error:

ERROR[11-06|10:11:33] Can't load node file /usr/local/Cellar/test2/geth/static-nodes.json: JSON syntax error at /usr/local/Cellar/test2/geth/static-nodes.json:4: invalid character '\n' in string literal.

Plz find me a path to setup the permanent peers to setup private network My static-nodes.json is


1 Answer 1


From the static-nodes.json file you have provided the double-quotes at the end of lines 3 and 4 look different to the double quotes on lines 2 and 5. This may be a character encoding issue, maybe edit the file and delete the double quotes and type them again. Just an observation.

There are online json syntax validators that can help you find the issue such as https://jsonlint.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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