Skip to content

Hot restart bug will cause the socket to not listening #8427

@zyfjeff

Description

@zyfjeff

Title: Hot restart bug will cause the socket to not listen

Description:

     "listener": {
      "name": "virtual",
      "address": {
       "socket_address": {
        "address": "0.0.0.0",
        "port_value": 15001
       }
      },
     .....
     "listener": {
      "name": "0.0.0.0_15001",
      "address": {
       "socket_address": {
        "address": "0.0.0.0",
        "port_value": 15001
       }
      "deprecated_v1": {
          "bind_to_port": false
      }

    .....

When the 15001 listener appears at the same time, one of them will bind the socket and listening, and the other will not bind. In this case, the hot restart gets the socket of the previous process and may get the socket that is not listening.

The reason for this problem is because the query listener is queried through the port and address, this is not the only one to represent the listener. Two listeners exist on the same port and address

Repro steps:

The same listener appears twice, one listener bind and listening, the other does not bind, then triggers a hot restart to see if the hot restart is listening.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions