Skip to content

❔ Question: Server is not responding to chargers message after reconnection #358

@YashDhondugade

Description

@YashDhondugade

Server is not responding to charger's message after reconnection

Current Behavior:

When the charger is connected to the server for the first time, it sends a message, and the server responds as expected. At some point, the server disconnects unexpectedly. The charger then initiates a new connection, and the logs confirm that this reconnection is successful. Despite the successful connection, the server does not send any acknowledgment or response to the subsequent message sent by the charger. Since no message is received from the server within one minute, the charger assumes the connection is lost and tries to initiate a new connection again. However, the server still holds the previous connection for that client and logs a message like "client **** already exists, closing duplicate client." This results in a loop of repeated reconnection attempts.

Captured logs:
2025-04-03 09:43:44 - handling new connection for XXXX from XXXXXXX
2025-04-03 09:43:44 - upgraded websocket connection for XXXX from XXXXXXX
2025-04-03 09:44:00 - handling read error for XXXX: websocket: unexpected reserved bits 0x40
2025-04-03 09:44:00 - handling forced close signal for XXXX
2025-04-03 09:44:00 - closed connection to XXXX
2025-04-03 09:46:18 - handling new connection for XXXX from XXXXXXX
2025-04-03 09:46:18 - upgraded websocket connection for XXXX from XXXXXXX
2025-04-03 09:46:19 - received JSON message from XXXX: [2,"1","StatusNotification",{"connectorId":1,"errorCode":"NoError","status":"Available"}]
2025-04-03 09:47:28 - handling new connection for XXXX from XXXXXXX
2025-04-03 09:47:28 - upgraded websocket connection for XXXX from XXXXXXX
2025-04-03 09:47:28 - client XXXX already exists, closing duplicate client

Expected Behavior:
After a successful reconnection, the server should resume communication and respond to messages from the charger.
If the connection is invalid or fails, the server should clean up the old connection and allow a new one to be established without entering a loop.

Please help to solve the problem
@lorenzodonini @xBlaz3kx

Which OCPP version referring to?

  • OCPP 1.6
  • OCPP 2.0.1

Are you using any OCPP extensions?

  • OCPP 1.6 Security
  • OCPP 1.6 Plug and Charge

👀 Have you spent some time to check if this question has been asked before?

  • I checked and didn't find a similar issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions