Skip to content

Conversation

@nullun
Copy link
Contributor

@nullun nullun commented Aug 4, 2025

Original comment in: #6376

I was looking through the PR and noticed this is the only use of the newly imported package above ("github.com/labstack/gommon/log" on line 32). I'm just wondering if this was intentional?

Summary

It looked like an error was being sent to the wrong place. I test it and couldn't see the error message, but this PR places it into the log file.

Test Plan

I reduced the ticker to 2 * time.Second and misconfigured a local node. It correctly repeated the error message.

nullun@local demonet % tail -f rootdir/node1/node.log | grep P2PHybridMode
{"file":"node.go","function":"github.com/algorand/go-algorand/node.(*AlgorandFullNode).Start.func2","level":"error","line":409,"msg":"could not create hybrid p2p node: P2PHybridMode requires both NetAddress and P2PHybridNetAddress to be set or unset. Falling back to P2P network","name":":4004","time":"2025-08-04T15:11:27.424437+01:00"}
{"file":"node.go","function":"github.com/algorand/go-algorand/node.(*AlgorandFullNode).Start.func2","level":"error","line":409,"msg":"could not create hybrid p2p node: P2PHybridMode requires both NetAddress and P2PHybridNetAddress to be set or unset. Falling back to P2P network","name":":4004","time":"2025-08-04T15:11:29.424504+01:00"}
{"file":"node.go","function":"github.com/algorand/go-algorand/node.(*AlgorandFullNode).Start.func2","level":"error","line":409,"msg":"could not create hybrid p2p node: P2PHybridMode requires both NetAddress and P2PHybridNetAddress to be set or unset. Falling back to P2P network","name":":4004","time":"2025-08-04T15:11:31.424506+01:00"}
{"file":"node.go","function":"github.com/algorand/go-algorand/node.(*AlgorandFullNode).Start.func2","level":"error","line":409,"msg":"could not create hybrid p2p node: P2PHybridMode requires both NetAddress and P2PHybridNetAddress to be set or unset. Falling back to P2P network","name":":4004","time":"2025-08-04T15:11:33.424467+01:00"}

@nullun nullun changed the title output repeating error to the node log node: print repeating error to the node log Aug 4, 2025
@nullun nullun force-pushed the fix/p2phybrid-log-error branch from 4e1be66 to 845c907 Compare August 5, 2025 10:30
@algorandskiy
Copy link
Contributor

Thank you for the fix, auto-importer error that we did not catch.

@algogm algogm merged commit 0fd6a25 into algorand:master Aug 5, 2025
50 of 52 checks passed
@nullun nullun deleted the fix/p2phybrid-log-error branch August 6, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants