Skip to content

[BUG] - cardano-node fails without an error message when reading badly formated JSON (topology.json) #3743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #4301 ...
kiriakos opened this issue Apr 3, 2022 · 1 comment
Assignees
Labels
release: 1.34.1 cardano node release 1.34.1 type: bug Something is not working user type: external Created by an external user

Comments

@kiriakos
Copy link

kiriakos commented Apr 3, 2022

Internal/External
External

Area
Other: Node Operations

Summary
The 1.34.1 cardano-node executable fails with exit code 1 and no indication for the reason when the file passed to the --topology argument is badly formated JSON. (eg: erroneous or missing comma in the Producers array).

Steps to reproduce
Use this topology.json:

{
  "Producers": [
    {
      "addr": "cnwr-2.services.kindstudios.gr",
      "port": 25437,
      "valency": 1
    }
    {
      "addr": "cnwr-3.services.kindstudios.gr",
      "port": 25437,
      "valency": 1
    }
  ]
}

Expected behavior
A clear and concise description of what failed in the cardano-node log. Since usage of programmatically generated topology files it widespread I think it could be helpful for Operators to know what's going on a bit earlier. Toubleshooting startup problems can be cumbersome.

System info (please complete the following information):

  • OS Name: Deb, Nix, Arch
  • OS Version multiple
  • Node version 1.34.1
@kiriakos kiriakos added the bug Something isn't working label Apr 3, 2022
@CarlosLopezDeLara CarlosLopezDeLara moved this to 📋 Backlog in Node CLI/API 2022 Aug 11, 2022
@LudvikGalois
Copy link
Contributor

When attempting to reproduce on master, I get

cardano-node: FatalError {fatalErrorMessage = "Cardano.Node.Run.handleSimpleNodeNonP2P.readTopologyFile: Is your topology file formatted correctly? Expecting Non-P2P Topology file format. The port and valency fields should be numerical. If you specified the correct topology file make sure that you correctly setup EnableP2P configuration flag. Error in $: Failed reading: satisfy. Expecting object value at '{'"}

so I believe this has already been fixed.

@CarlosLopezDeLara CarlosLopezDeLara moved this from 📋 Backlog to 🔖 Sprint backlog in Node CLI/API 2022 Oct 19, 2022
@CarlosLopezDeLara CarlosLopezDeLara moved this from 🔖 Sprint backlog to ✅ Done in Node CLI/API 2022 Oct 20, 2022
@dorin100 dorin100 added type: bug Something is not working user type: external Created by an external user release: 1.34.1 cardano node release 1.34.1 and removed bug Something isn't working labels Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: 1.34.1 cardano node release 1.34.1 type: bug Something is not working user type: external Created by an external user
Projects
None yet
Development

No branches or pull requests

4 participants