1

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

[
"enode://dc3e4f23315f90bb62c9096df01b7f07c4040a8520f046801e2fa6812aa4402d70f6073f6226779a9183137cb789e98492d197db1380784fd0d213c30e9651ec@192.168.1.139:30331",
"enode://1c745b2459129ca07b1345487fedda6b8516194a4208d93bd696f3684b44cbf16a5cdddb99cc1753b1ba43884d93c5d27403dce0c6638787f74a40428a7c9543@192.168.1.117:30332”,
"enode://be0c22a7a8451766c2894cd11143bc3128d5840cca161ad91b2bd9078d1dde56ddc19d0258e86e51cf7b7e9cda43b900a20ef392925ae8a19ab24c4cf016d69c@192.168.1.121:30333”,
"enode://1e07a29f0c94617d045dcf4f0d8597fd07757cbf8e48f66e78b72b142bf9b61d0d7bcce8fe21479ad0bd02bff945a8c062f2af03c0e1be670e1452b845fa420e@192.168.1.102:30334"
]
2

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, privacy policy and cookie policy

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