Score:2

IPv6 issues Ubuntu 20.04 server

sl flag

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
in flag
The `systemd-networkd-wait-online` service requires IPv6 in order to run. Disabling that network stack is why it times out and crashes. Are you defining `IPv6AcceptRA` in your netplan config?
Alex Smith avatar
sl flag
I've added my netplan config. accept-ra is set to false. When testing a few things i also tried putting `net.ipv6.conf.all.autoconf=0` and `net.ipv6.conf.all.accept_ra=0` in sysctl.conf which didnt help
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.