I can't start a Discourse

As a last resort, I deleted the Discourse and tried to reinstall it, but I think the problem is caused by the company that provides me with the VDS service.

Yes. Some admins use ufw, and sometimes outbound will be blocked.

Which is why asserting that it is the cause of the problems with no evidence is misleading and confusing.

Have you tried the reboot suggestion? Once that’s done, you can test docker networking by running, for instance, these commands that should help give some insight into what’s going on:

# run a container
docker run --rm -it discourse/base:2.0.20231023-1945 bash

# install some tools
(apt-get update && apt-get -y install iputils-ping bind9-dnsutils) > /dev/null

# does IPv4 networking work in general?
ping -qc 2 8.8.8.8

# does DNS resolution work as configured?
ping -qc 2 www.github.com

# what are the nameservers?
cat /etc/resolv.conf

# can each of the nameservers resolve github.com?
# for each of the nameserver IPs listed, run:
dig +noauth +noadditional www.github.com @«NAMESERVER_IP»

Example output:

○ → docker run --rm -it discourse/base:2.0.20231023-1945 bash
root@5ffcc80a31a0:/# (apt-get update && apt-get -y install iputils-ping bind9-dnsutils) > /dev/null
debconf: delaying package configuration, since apt-utils is not installed

root@5ffcc80a31a0:/# ping -qc 2 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 5.556/5.950/6.345/0.394 ms

root@5ffcc80a31a0:/# ping -qc 2 www.github.com
PING github.com (140.82.112.4) 56(84) bytes of data.

--- github.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 22.667/23.661/24.656/0.994 ms

root@5ffcc80a31a0:/# cat /etc/resolv.conf
# Generated by resolvconf
nameserver 192.168.1.51
nameserver 192.168.1.52

root@5ffcc80a31a0:/# dig +noauth +noadditional www.github.com @192.168.1.51

; <<>> DiG 9.16.44-Debian <<>> +noauth +noadditional www.github.com @192.168.1.51
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22936
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 13, ADDITIONAL: 27

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 1e81477884510c6eb35093fb6577611966c36d79b2294ab9 (good)
;; QUESTION SECTION:
;www.github.com.			IN	A

;; ANSWER SECTION:
www.github.com.		3469	IN	CNAME	github.com.
github.com.		41	IN	A	140.82.114.3

;; Query time: 0 msec
;; SERVER: 192.168.1.51#53(192.168.1.51)
;; WHEN: Mon Dec 11 19:20:57 UTC 2023
;; MSG SIZE  rcvd: 897
2 Likes

That seems likely, are you able to talk to them or can you share what that is?