Skip to content
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

Peer disconnect message - add client info #6947

Merged
merged 4 commits into from Apr 16, 2024

Conversation

macfarla
Copy link
Contributor

@macfarla macfarla commented Apr 15, 2024

PR description

Add client name to summary disconnect message - makes cross-referencing disconnects much easier.
Also whether the connection was active.

Fixed Issue(s)

Refs #6945

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
@macfarla
Copy link
Contributor Author

examples of logs

disconnects-6609-51.log:{"@timestamp":"2024-04-15T05:14:42,237","level":"DEBUG","thread":"nioEventLoopGroup-3-7","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0x22790fd33ef94696... bor/v1.2.7/linux-amd64/go1.20.14 - 2 peers left","throwable":""}
disconnects-6609-51.log:{"@timestamp":"2024-04-15T05:40:21,524","level":"DEBUG","thread":"nioEventLoopGroup-3-6","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0xd174777b3f3efa4f... bor/v1.2.7/linux-amd64/go1.20.14 - 2 peers left","throwable":""}
disconnects-6609-52.log:{"@timestamp":"2024-04-15T05:01:28,939","level":"DEBUG","thread":"nioEventLoopGroup-3-10","class":"EthProtocolManager","message":"Disconnect - active Connection? true - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0xa3435a0155a3e837... Geth/v1.13.14-stable-2bd6bd01/linux-amd64/go1.21.7 - 1 peers left","throwable":""}
disconnects-6609-52.log:{"@timestamp":"2024-04-15T05:06:16,053","level":"DEBUG","thread":"nioEventLoopGroup-3-7","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x03 USELESS_PEER  - 0x7f2092381e47dabf... Geth/v1.2.9-34b065ae-20230721/linux-amd64/go1.19.11 - 2 peers left","throwable":""}
disconnects-6609-52.log:{"@timestamp":"2024-04-15T05:12:30,168","level":"DEBUG","thread":"nioEventLoopGroup-3-2","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0x37a0bc5301ae557a... bor/v1.2.7/linux-amd64/go1.20.14 - 2 peers left","throwable":""}
disconnects-6609-52.log:{"@timestamp":"2024-04-15T05:20:06,827","level":"DEBUG","thread":"nioEventLoopGroup-3-4","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0x5476d6ed52c9b07b... bor/v1.2.7/linux-amd64/go1.20.14 - 2 peers left","throwable":""}
disconnects-6609-60.log:{"@timestamp":"2024-04-15T05:10:46,235","level":"DEBUG","thread":"nioEventLoopGroup-3-3","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x04 TOO_MANY_PEERS  - 0xf64105f40f5533e4... erigon/v2.58.1/linux-amd64/go1.21.6 - 1 peers left","throwable":""}
disconnects-6609-60.log:{"@timestamp":"2024-04-15T05:40:28,027","level":"DEBUG","thread":"nioEventLoopGroup-3-4","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0xdc01223695d49395... bor/v1.2.7/linux-amd64/go1.20.14 - 1 peers left","throwable":""}
disconnects-6609-60.log:{"@timestamp":"2024-04-15T06:08:54,482","level":"DEBUG","thread":"nioEventLoopGroup-3-2","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0x464f5277624ce834... bor/v1.2.7/linux-amd64/go1.20.14 - 2 peers left","throwable":""}
disconnects-6609-60.log:{"@timestamp":"2024-04-15T06:24:49,875","level":"DEBUG","thread":"nioEventLoopGroup-3-5","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0xcd6dc7d5e44b5590... bor/v1.2.7/linux-amd64/go1.20.14 - 2 peers left","throwable":""}
disconnects-6609-60.log:{"@timestamp":"2024-04-15T06:28:44,161","level":"DEBUG","thread":"nioEventLoopGroup-3-5","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x03 USELESS_PEER  - 0x87fc72a3d15c69f8... besu/v24.4-develop-9bed81f/linux-x86_64/openjdk-java-21 - 2 peers left","throwable":""}
disconnects-6609-61.log:{"@timestamp":"2024-04-15T06:27:40,759","level":"DEBUG","thread":"nioEventLoopGroup-3-8","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x05 ALREADY_CONNECTED  - 0x87fc72a3d15c69f8... besu/v24.4-develop-9bed81f/linux-x86_64/openjdk-java-21 - 1 peers left","throwable":""}
disconnects-6609-61.log:{"@timestamp":"2024-04-15T06:36:33,373","level":"DEBUG","thread":"nioEventLoopGroup-3-5","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0x269545a10921e699... bor/v1.2.7/linux-amd64/go1.20.14 - 3 peers left","throwable":""}
disconnects-6609-62.log:{"@timestamp":"2024-04-15T06:28:39,851","level":"DEBUG","thread":"nioEventLoopGroup-3-10","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x05 ALREADY_CONNECTED  - 0x87fc72a3d15c69f8... besu/v24.4-develop-9bed81f/linux-x86_64/openjdk-java-21 - 1 peers left","throwable":""}
➜  ~ grep 0xa3435a0155a3e837... disconnects-6609*
disconnects-6609-51.log:{"@timestamp":"2024-04-15T04:58:56,490","level":"DEBUG","thread":"nioEventLoopGroup-3-4","class":"EthProtocolManager","message":"Disconnect - active Connection? true - Outbound - 0x01 TCP_SUBSYSTEM_ERROR  - 0xa3435a0155a3e837... Geth/v1.13.14-stable-2bd6bd01/linux-amd64/go1.21.7 - 1 peers left","throwable":""}
disconnects-6609-51.log:{"@timestamp":"2024-04-15T05:01:28,904","level":"DEBUG","thread":"nioEventLoopGroup-3-6","class":"EthProtocolManager","message":"Disconnect - active Connection? true - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0xa3435a0155a3e837... Geth/v1.13.14-stable-2bd6bd01/linux-amd64/go1.21.7 - 1 peers left","throwable":""}
disconnects-6609-52.log:{"@timestamp":"2024-04-15T04:58:56,489","level":"DEBUG","thread":"nioEventLoopGroup-3-6","class":"EthProtocolManager","message":"Disconnect - active Connection? true - Outbound - 0x01 TCP_SUBSYSTEM_ERROR  - 0xa3435a0155a3e837... Geth/v1.13.14-stable-2bd6bd01/linux-amd64/go1.21.7 - 1 peers left","throwable":""}
disconnects-6609-52.log:{"@timestamp":"2024-04-15T05:01:28,939","level":"DEBUG","thread":"nioEventLoopGroup-3-10","class":"EthProtocolManager","message":"Disconnect - active Connection? true - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0xa3435a0155a3e837... Geth/v1.13.14-stable-2bd6bd01/linux-amd64/go1.21.7 - 1 peers left","throwable":""}
➜  ~ grep ac906289e4b disconnects-6609*
disconnects-6609-51.log:{"@timestamp":"2024-04-15T05:51:14,935","level":"DEBUG","thread":"nioEventLoopGroup-3-7","class":"EthProtocolManager","message":"Disconnect - active Connection? true - Outbound - 0x01 TCP_SUBSYSTEM_ERROR  - 0xac906289e4b7f12d... Geth/v1.13.14-stable-2bd6bd01/linux-amd64/go1.21.7 - 1 peers left","throwable":""}
disconnects-6609-52.log:{"@timestamp":"2024-04-15T05:51:14,911","level":"DEBUG","thread":"nioEventLoopGroup-3-5","class":"EthProtocolManager","message":"Disconnect - active Connection? true - Outbound - 0x01 TCP_SUBSYSTEM_ERROR  - 0xac906289e4b7f12d... Geth/v1.13.14-stable-2bd6bd01/linux-amd64/go1.21.7 - 1 peers left","throwable":""}

@macfarla
Copy link
Contributor Author

one with empty client info

disconnects-6609-50.log:{"@timestamp":"2024-04-15T06:25:27,150","level":"DEBUG","thread":"nioEventLoopGroup-3-8","class":"EthProtocolManager","message":"Disconnect - active Connection? false - Inbound - 0x10 SUBPROTOCOL_TRIGGERED  - 0x5680fdd9c1442e60...  - 22 peers left","throwable":""}

@macfarla
Copy link
Contributor Author

Note latest commit changes this

"Disconnect - active Connection? true - Outbound - 0x03 USELESS_PEER_USELESS_RESPONSES Useless responses: exceeded threshold - 0x302cf78ac89db83b... Geth/v1.13.14-stable-2bd6bd01/linux-amd64/go1.21.7 - 4 peers left","throwable":""}

to this (easier for log analysis)

{"Disconnect - active Connection? true - Outbound - 0x03 USELESS_PEER_USELESS_RESPONSES - 0xac906289e4b7f12d... Geth/v1.13.14-stable-2bd6bd01/linux-amd64/go1.21.7 - 0 peers left","throwable":""}

@macfarla macfarla enabled auto-merge (squash) April 16, 2024 21:23
@macfarla macfarla merged commit b5b7b9f into hyperledger:main Apr 16, 2024
42 checks passed
@macfarla macfarla deleted the client-disconnect branch April 17, 2024 00:58
macfarla added a commit to macfarla/besu that referenced this pull request Apr 26, 2024
* add client info to disconnect message

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* exclude disconnect reason message since it makes it harder to analyse

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants