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

Why "Unknown protocol code: [ProtocolVersion{version=[3]}] while decode in ProtocolDecoder.]" warning message reported in connection-event log file? #332

Closed
tongtaodragon opened this issue Aug 21, 2023 · 2 comments

Comments

@tongtaodragon
Copy link

Your question

In our environment, warning message appeared in connection-event log file as below.
Unknown protocol code: [ProtocolVersion{version=[3]}] while decode in ProtocolDecoder.]
Why report this warning message? What possible kind of situations will trigger this warning message?

Environment

  • SOFABolt version: 1.6.5

  • JVM version (e.g. java -version):
    java version "1.8.0_331"
    Java(TM) SE Runtime Environment (build 1.8.0_331-b09)
    Java HotSpot(TM) 64-Bit Server VM (build 25.331-b09, mixed mode)

  • OS version (e.g. uname -a):
    Server:
    Linux host1 4.18.0-193.el8.x86_64 (doc) modify docs #1 SMP Mon Jun 22 15:09:41 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Client: Windows 7

@OrezzerO
Copy link
Collaborator

OrezzerO commented Aug 23, 2023

Protocol Version is the first byte of your application layer network frame. Usually it is 1 (for BoltV1) and 2 for (BoltV2 protocol). If the first byte is 3 , bolt can not find the correspond protocol, so you will see this error .

There may be two common causes of this problem :

  1. Some unknown client send wrong packets to your port.
  2. Decoder did not consume all data in one packet, so some wrong data left in cache. The next time Decoder consume data, it read the wrong data.

@kelseysunhaha
Copy link

协议版本是应用层网络帧的第一个字节。通常为 1(对于 BoltV1)和 2(对于 BoltV2 协议)。如果第一个字节是 3,bolt 找不到对应的协议,那么你会看到这个错误。

此问题可能有两个常见原因:

  1. 一些未知的客户端向您的端口发送错误的数据包。
  2. 解码器没有消耗掉一个数据包中的所有数据,因此存储器中留下了一些错误的数据。解码器接下来消耗数据时,读取到了错误的数据。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants