canboat / canboatjs

Native javascript NMEA 2000 decoder and encoder
Apache License 2.0
95 stars 39 forks source link

Retry connection automatically #260

Closed plektra closed 2 weeks ago

plektra commented 10 months ago

Goal: I am trying to run signalk-server in a Docker container with normal brigded networking in order to preserve isolation. In order to use NMEA2000 via native socketcan, the can interface(s) need to be routed via virtual vxcan kernel module and can-gw (see https://www.lagerdata.com/articles/forwarding-can-bus-traffic-to-a-docker-container-using-vxcan-on-raspberry-pi). Can interfaces are basically network interfaces which aren't published to containers running in bridge networking mode.

Problem: Virtual CAN interface needs to be moved to the network namespace of the running container, which means that the container must be running before the can interface can be made available within the container runtime. Currently, signalk-server only loads the connections when starting the server, so there's currently no easy way to reinitialize connections once the can interface has been brought up.

Suggestion: Introduce automatic (perhaps configurable) retry for establishing can connections.

sbender9 commented 2 weeks ago

I think this is fixed. Please re-open if not...