mikuso / ocpp-rpc

A Node.js client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP-J protocols.
MIT License
98 stars 29 forks source link

Disconnects after 30 sec #72

Closed tmb-01 closed 7 months ago

tmb-01 commented 8 months ago

It works fine on my local machine but when I deploy it to my VPS, WS disconnects after 30 sec.

Screenshot 2024-03-13 at 16 08 49

I thought I had a limitation in my VPS for WS but my other WS is working fine.

I am using this simulator. https://lamerat.github.io/OCPP-Charge-Point-Simulator/

tmb-01 commented 8 months ago

@mikuso Can you help me to solve this problem?

mikuso commented 8 months ago

Try listening on the RPCServerClient instance for the 'socketError' and 'close' events and log what happens.

Do you get a socket error event? Do you get a close event? If so, what close code & reason are you given?

tmb-01 commented 8 months ago

when I start it with pm2, I face this error, but when I start it with node it works fine. But I cant use node to run in background.