soltecsis / fwcloud-api

API REST for the project FWCloud.net
GNU Affero General Public License v3.0
4 stars 6 forks source link

Problems installing DEB package in Debian 12 #807

Open cmunyoz opened 4 weeks ago

cmunyoz commented 4 weeks ago

Reported by: Roy Barnard [...] Please be aware that the https://fwcloud.net/en/documentation/installation/#packages "Installation by means of DEB/RPM Packages" guide no longer works for Debian 12.

By default mariadb on a Debian 12 fresh install does not listen for loopback as localhost on IPv6, but the '/etc/hosts' file lists localhost as both 127.0.0.1 (IPv4) and ::1 (IPv6).

The node client for mariadb resolves 'localhost' as '::1' and attempts to connect to mariadb using IPv4 which mariadb is not listening on. This causes the installation of 'fwcloud-api' to fail in setting up the database.

To resolve this issue, either:

Option A: Disable IPv6 Create '/etc/sysctl.d/ipv6-disable.conf' containing:

--- Disable IPv6 as per wiki.debian.org/DebianIPv6

# net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 Then execute both "systemctl restart systemd-sysctl.service" and "systemctl restart mariadb.service".

Option B: Configure mariadb to listen on IPv6 loopback for localhost Create 'etc/mysql/mariadb.conf.d/51-localserver.cnf' containing: [mysqld] bind-address = 127.0.0.1,::1 Then execute "systemctl restart mariadb.service".

I have tested both of these options and they worked for me.

Many Thanks, Roy Barnard [...]