Closed 1977er closed 2 years ago
Traceback (most recent call last):
File "/home/auto/autoupdate_wg.py", line 156, in <module>
File "/home/auto/autoupdate_wg.py", line 125, in wg_modify_peer
File "/usr/lib/python3/dist-packages/pyroute2/netlink/generic/wireguard.py", line 237, in __init__
File "/usr/lib/python3/dist-packages/pyroute2/netlink/nlsocket.py", line 388, in __init__
File "/usr/lib/python3/dist-packages/pyroute2/netlink/nlsocket.py", line 968, in post_init
File "/usr/lib/python3.9/socket.py", line 232, in __init__
OSError: [Errno 24] Too many open files
More incarnations of the same (I guess):
Traceback (most recent call last):
File "/home/auto/autoupdate_wg.py", line 156, in <module>
wg_modify_peer(key, iface)
File "/home/auto/autoupdate_wg.py", line 125, in wg_modify_peer
wg = WireGuard()
File "/usr/local/lib/python3.7/dist-packages/pyroute2/netlink/generic/wireguard.py", line 237, in __init__
GenericNetlinkSocket.__init__(self)
File "/usr/local/lib/python3.7/dist-packages/pyroute2/netlink/nlsocket.py", line 348, in __init__
self._ctrl_read, self._ctrl_write = os.pipe()
OSError: [Errno 24] Too many open files
We just discussed, wrapping this and having it fail silently is not an option; it would be preferable, if we just started the systemd-timer, that runs this after all WireGuard interfaces are up, if that's the issue.
Fixed in 2f543a3680474297da83f33056a0588d15537f17.
In case there are no wg interfaces, autoupdate_wg.py crashes: