Concordium / Concordium/concordium-node

Logging for missing baker-credentials file - Windows

Open
#594 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Change Request
Dominant language
Haskell
Stars
108
Forks
24
Avg merge
2d 4h
Merged PRs (30d)
9

Description

Description
It would be convenient to write in the logs that the Node can't find the baker credentials file specified on the path.

Current behavior is that node actually starts and stops while all what we can see in the log is:

2022-11-09T09:23:52.605010800+01:00 INFO concordium_node::utils - Starting up concordium_node version 5.0.5!
2022-11-09T09:23:52.607289800+01:00 INFO concordium_node::utils - Application data directory: C:\ProgramData\Concordium\Node Runner\stagenet\data
2022-11-09T09:23:52.607360600+01:00 INFO concordium_node::utils - Application config directory: C:\ProgramData\Concordium\Node Runner\stagenet\config
2022-11-09T09:23:52.607384200+01:00 INFO concordium_node::utils - Network: enabled
2022-11-09T09:23:52.607404100+01:00 INFO concordium_node::utils - Log level: debug
2022-11-09T09:23:52.613456100+01:00 INFO concordium_node::p2p::maintenance - My Node ID is 8f86a295033e64a6
2022-11-09T09:23:52.613541+01:00 INFO concordium_node::p2p::maintenance - Listening on 0.0.0.0:8991

At the same time, Windows Event Viewer shows that Node has stopped with:

The node 'Stagenet node' has stopped unexpectedly. (exit code: 1)
Output:
Error: Can't get genesis data or private data. Aborting
Caused by:
    Cannot open the baker credentials file (The system cannot find the file specified. (os error 2))!

So, my point is that one wouldn't have to look at the Event Viewer to see what the issue is but get the hint from the Node logs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the startup path that opens the baker credentials file and compare its error handling with the existing startup log messages shown in the issue. Done means a missing credentials file and its path are visible in the node logs before the node exits, rather than only in Windows Event Viewer.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
blockchain
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.