Hi! I have a running process `netclient daemon`. ...
# client
b
Hi! I have a running process
netclient daemon
. When daemon restarted then wireguard interface removed and created again. Network connectivity temporary is broken. How to avoid removing wg interface? I don't want depends on temporary network connectivity loss between client and broker/netmaker-api.
Copy code
[netclient] 2022-06-07 11:45:12 unable to connect to broker, retrying ...
Ping tcp://nm-mq.mydomain.com:8883(<ip>:8883) - Connected - time=69.146611ms
Ping tcp://nm-mq.mydomain.com:8883(<ip>:8883) - Connected - time=69.974128ms
Ping tcp://nm-mq.mydomain.com:8883(<ip>:8883) - Connected - time=72.613186ms
[netclient] 2022-06-07 11:45:16 could not connect to broker nm-mq.mydomain.com connect timeout
[netclient] 2022-06-07 11:45:16 connection issue detected.. attempt connection with new certs and broker information
[netclient] 2022-06-07 11:45:16 register at https://nm-api.mydomain.com/api/server/register
[netclient] 2022-06-07 11:45:17 certificates/key saved
[netclient] 2022-06-07 11:45:18 restarting netclient.service
[netclient] 2022-06-07 11:45:19 shutting down netclient daemon
[netclient] 2022-06-07 11:45:19 checkin routine closed
[netclient] 2022-06-07 11:45:19 shutdown complete
systemd[1]: Stopping Netclient Daemon...
systemd[1]: netclient.service: Succeeded.
systemd[1]: Stopped Netclient Daemon.
Interface check
Copy code
# ip link show dev nm-main
130: nm-main: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1280 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/none

# ip link show dev nm-main
Device "nm-main" does not exist.

# ip link show dev nm-main
131: nm-main: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1280 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/none
j
the daemon is restarted when it is necessary to recover from failure or implement certain changes. In these cases, it is usually necessary to restart the wireguard interface as well
if the daemon is restarting frequently, that is a different issue we should look into
b
Thank to for replay. Is there list of cases when daemon restart the wireguard interface? It's look like a daemon fetch new configuration from netmaker server and try to apply on client. But I didn't add no new routes or peers.
b
changes to the interface section of node will cause the wg interface to be restarted .... changes to peers (adding new peer/deleting peer) will not cause the wg interface to be brought down and then back up ... the other case where the wg interface is brought down and up is when the netclient daemon is restarted ... which will happen if communications with the netmaker server fails
b
I have one more question. My configuration works well without interface restart. But if broker connection lost then the netclient daemon start restarting interface. For example I just simulate broker unavailability
Copy code
systemctl stop mosquitto
I think netclient daemon behavior is not correct. Daemon could restart interface only if: 1. all external services (netmaker api/broker) is reachable. 2. If configuration was changed
6 Views