Desesperatly try to find why nextcloud is not listening ?!?

Hello,
I’ve installed nextcloud with snap and configured it to listen to port 82 but it doesn’t respond.

investigating, it seems that it’s listening to port 82 but on ipv6 only (pid 5231):

ubuntuadmin@ubuntu-1804-srv:~$ sudo netstat -tulpn
[sudo] password for ubuntuadmin:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:9236          0.0.0.0:*               LISTEN      2476/gitaly
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      844/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1275/sshd
tcp        0      0 127.0.0.1:3000          0.0.0.0:*               LISTEN      2464/grafana-server
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1711/master
tcp        0      0 0.0.0.0:5050            0.0.0.0:*               LISTEN      2351/nginx: master
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      2351/nginx: master
tcp        0      0 0.0.0.0:8060            0.0.0.0:*               LISTEN      2351/nginx: master
tcp        0      0 127.0.0.1:9121          0.0.0.0:*               LISTEN      2400/redis_exporter
tcp        0      0 127.0.0.1:9090          0.0.0.0:*               LISTEN      2412/prometheus
tcp        0      0 127.0.0.1:9187          0.0.0.0:*               LISTEN      2438/postgres_expor
tcp        0      0 127.0.0.1:9093          0.0.0.0:*               LISTEN      2420/alertmanager
tcp        0      0 127.0.0.1:5000          0.0.0.0:*               LISTEN      2488/registry
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1512/mysqld
tcp        0      0 127.0.0.1:9100          0.0.0.0:*               LISTEN      2419/node_exporter
tcp        0      0 127.0.0.1:9229          0.0.0.0:*               LISTEN      2239/gitlab-workhor
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      3156/unicorn master
tcp        0      0 127.0.0.1:9168          0.0.0.0:*               LISTEN      2418/puma 4.3.1.git
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2351/nginx: master
tcp        0      0 127.0.0.1:8082          0.0.0.0:*               LISTEN      2368/sidekiq 5.2.7
tcp6       0      0 :::22                   :::*                    LISTEN      1275/sshd
tcp6       0      0 :::25                   :::*                    LISTEN      1711/master
tcp6       0      0 :::9094                 :::*                    LISTEN      2420/alertmanager
tcp6       0      0 ::1:9168                :::*                    LISTEN      2418/puma 4.3.1.git
tcp6       0      0 :::82                   :::*                    LISTEN      5231/httpd
udp        0      0 127.0.0.53:53           0.0.0.0:*                           844/systemd-resolve
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           4558/mdns-publisher
udp6       0      0 :::9094                 :::*                                2420/alertmanager
udp6       0      0 :::5353                 :::*                                4558/mdns-publisher

Why ??

This is expected behavior-- Apache does weird fallback things by default when it binds. See this for more info. If you’re certain it can’t be reached over port 82, take a look at the Apache logs and see if it’s complaining about anything. Tou can even try running the snap log-gathering script if you like, and log a question against the snap in github.

In fact I tried again to access it this morning after 2 weeks and it works!
I didn’t change anything so I guess that a leprechaun helped me…