I have a server running the following software:
Ubuntu 20.04
cPanel 106.0.13
PHP 8.1
MySQL 8
Litespeed Web Server
Elasticsearch 7.17
Redis 7
I am running a magento 2.4.5 store on this server which connects to a remote FTP each day to update products, stock and pricing. My problem is that connecting to this FTP over IPv6 doesnt always work and it doesnt fall back to IPv4, so i have tried disabling IPv6 by adding the following 2 lines to sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
This allows me to connect to the FTP and everything works fine for around 40ish hours at which point the network seems to crash and i lose access to my server. The only way i can get everything running again is to reboot the server from the host control panel.
The host deny IPv6 is running by default and wont help me diagnose/solve the issue.
looking through syslog i can see the lines a couple minutes before the network dies (at least before i get alerted)
systemd-networkd-wait-online[123796]: Event loop failed: Connection timed out
apt-helper[123794]: E: Sub-process /lib/systemd/systemd-networkd-wait-online returned an error code (1)
apt-helper[123794]: E: Sub-process nm-online returned an error code (1)
How can i further diagnose this and fully disable ipv6 without issue?
EDIT:
Below is my netplan config. I have not edited this file. It has many routes define under "routes:"
network:
version: 2
ethernets:
enp3s0f0:
accept-ra: false
addresses:
- 2001:41d0:800:354d::/56
dhcp4: true
gateway6: 2001:41d0:800:35ff:ff:ff:ff:ff
match:
macaddress: fc:34:97:b0:54:57
nameservers:
addresses:
- 2001:41d0:3:163::1
routes:
<lots of routes are here>
set-name: enp3s0f0