Can I migrate from binary to docker?

The format looks good, here’s mine for comparison:

mmuser:password@tcp(localhost:3306)/mattermost?charset=utf8mb4,utf8\u0026writeTimeout=30s",

But you shouold switch the port back to 3306 I guess if you want to connect to the mysql server running on the host OS; 3333 was the port you chose for the dockerized mysql, right?

I’ve tried switching between 3306 and 3333 (docker mysql), but they both result in the same error.

I also noticed that if I exec into the mattermost pod, I can’t curl the domain for the machine that this is all running on (connection refused), but I can curl 172.17.0.1.

Can you resolve the domain from within the container? The mattermost application container should have the nc binary available and this connection should work without issues actually. I’ve set up the same environment on my testhost now, here’s what I am seeing:

### on the linux machine directly, mysql is running on port 3306 listening on all possible interfaces (*:3306)
# lsof -i :3306
COMMAND     PID  USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
mariadbd 295207 mysql   36u  IPv6 9447442      0t0  TCP *:mysql (LISTEN)

### Connecting to my mattermost application docker container and executing a shell there
# docker exec -ti 17 /bin/sh

### trying to connect to "the outside" on port 3306 with the nc binary
$ nc 172.17.0.1 3306
c
5.5.5-10.5.15-MariaDB-0+deb11u127[F,HfJ▒▒-▒▒!`BjnlQ2DAUkmysql_native_password
^C

→ The connection to my local MariaDB server outside the container is working, as you can see in the greeting string. If you do not get this connection working, then something else is the problem, maybe some firewall rules or container network limitations. You said you connected to the pod - are we talking about a podman deployment here or did you at some point decide to use k8s or something similar which might be the reason for the difference in behaviour?

I ran nc 172.17.0.1 3306 from inside the mattermost container and it didn’t output anything.

If I run it from the host, I do get an output:

nc 172.17.0.1 3306
[
8.0.29-0ubuntu0.20.04.3I☺9m►]G↕♥M□□□☻□□§2bo]J(\dh♣#2caching_sha2_password^C

You said you connected to the pod - are we talking about a podman deployment here or did you at some point decide to use k8s or something similar which might be the reason for the difference in behaviour?

Whoops, force of habit. I use k8s at work so I’m used to saying “pod”. I really just meant container.

OK, something is wrong with your docker network (container2host network).
In your comment from two days ago, your docker network was 172.18.0.2 (according to the iptables output), maybe the subnet changes and you need to change the connection string too?

If nc quits immediately, then this usually means that there’s REJECT on the destination port. If you would try to connect to an unreachable IP, it would run longer and time out eventually.

I think we need to dig a bit deeper into your docker setting here, getting my fingers on your console would really speed this up, but let’s try this approach :slight_smile:
Please run the following commands and provide the output while the containers are running:

ifconfig

iptables -L -n -v

docker inspect <containerid-of-the-mattermost-application-container>
# ifconfig
br-73fec2cf3b15: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        inet6 fe80::42:5ff:fe58:944  prefixlen 64  scopeid 0x20<link>
        ether 02:42:05:58:09:44  txqueuelen 0  (Ethernet)
        RX packets 24406  bytes 1476834 (1.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3220  bytes 161845 (161.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:2c:4a:34:f0  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 68.183.147.227  netmask 255.255.240.0  broadcast 68.183.159.255
        inet6 fe80::c4b7:75ff:fe68:cde2  prefixlen 64  scopeid 0x20<link>
        ether c6:b7:75:68:cd:e2  txqueuelen 1000  (Ethernet)
        RX packets 14489780  bytes 8851190716 (8.8 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13936486  bytes 11302165651 (11.3 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 267624271  bytes 67410000328 (67.4 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 267624271  bytes 67410000328 (67.4 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth5db4454: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::e857:21ff:fee6:8dbf  prefixlen 64  scopeid 0x20<link>
        ether ea:57:21:e6:8d:bf  txqueuelen 0  (Ethernet)
        RX packets 5  bytes 338 (338.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 628 (628.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth7f35449: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::546c:1cff:fea1:327b  prefixlen 64  scopeid 0x20<link>
        ether 56:6c:1c:a1:32:7b  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10  bytes 848 (848.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethf8b843f: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::b4ba:1aff:fef2:9120  prefixlen 64  scopeid 0x20<link>
        ether b6:ba:1a:f2:91:20  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 738 (738.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
# iptables -L -n -v
Chain INPUT (policy DROP 13 packets, 724 bytes)
 pkts bytes target     prot opt in     out     source               destination
 282M   76G ufw-before-logging-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0
 282M   76G ufw-before-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0
1733K  135M ufw-after-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0
1683K  133M ufw-after-logging-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0
1683K  133M ufw-reject-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0
1683K  133M ufw-track-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
  621  143K DOCKER-USER  all  --  *      *       0.0.0.0/0            0.0.0.0/0
  621  143K DOCKER-ISOLATION-STAGE-1  all  --  *      *       0.0.0.0/0            0.0.0.0/0
  292 22967 ACCEPT     all  --  *      br-73fec2cf3b15  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
   32  1604 DOCKER     all  --  *      br-73fec2cf3b15  0.0.0.0/0            0.0.0.0/0
  297  119K ACCEPT     all  --  br-73fec2cf3b15 !br-73fec2cf3b15  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  br-73fec2cf3b15 br-73fec2cf3b15  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  *      docker0  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    0     0 DOCKER     all  --  *      docker0  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  docker0 !docker0  0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     all  --  docker0 docker0  0.0.0.0/0            0.0.0.0/0
    0     0 ufw-before-logging-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ufw-before-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ufw-after-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ufw-after-logging-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ufw-reject-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ufw-track-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
 281M   79G ufw-before-logging-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0
 281M   79G ufw-before-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0
 221K   15M ufw-after-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0
 221K   15M ufw-after-logging-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0
 221K   15M ufw-reject-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0
 221K   15M ufw-track-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain DOCKER (2 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     tcp  --  !br-73fec2cf3b15 br-73fec2cf3b15  0.0.0.0/0            172.18.0.3           tcp dpt:3306
    0     0 ACCEPT     tcp  --  !br-73fec2cf3b15 br-73fec2cf3b15  0.0.0.0/0            172.18.0.4           tcp dpt:443
    0     0 ACCEPT     tcp  --  !br-73fec2cf3b15 br-73fec2cf3b15  0.0.0.0/0            172.18.0.4           tcp dpt:80
    0     0 ACCEPT     tcp  --  !br-73fec2cf3b15 br-73fec2cf3b15  0.0.0.0/0            172.18.0.4           tcp dpt:8065

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
 pkts bytes target     prot opt in     out     source               destination
  297  119K DOCKER-ISOLATION-STAGE-2  all  --  br-73fec2cf3b15 !br-73fec2cf3b15  0.0.0.0/0            0.0.0.0/0

    0     0 DOCKER-ISOLATION-STAGE-2  all  --  docker0 !docker0  0.0.0.0/0            0.0.0.0/0
  621  143K RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain DOCKER-ISOLATION-STAGE-2 (2 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  *      br-73fec2cf3b15  0.0.0.0/0            0.0.0.0/0
    0     0 DROP       all  --  *      docker0  0.0.0.0/0            0.0.0.0/0
  297  119K RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain DOCKER-USER (1 references)
 pkts bytes target     prot opt in     out     source               destination
  621  143K RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain ufw-after-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-after-input (1 references)
 pkts bytes target     prot opt in     out     source               destination
 1258 98016 ufw-skip-to-policy-input  udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:137
    9   252 ufw-skip-to-policy-input  udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:138
 1916 84036 ufw-skip-to-policy-input  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:139
47045 2373K ufw-skip-to-policy-input  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:445
   12   336 ufw-skip-to-policy-input  udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:67
    9   252 ufw-skip-to-policy-input  udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:68
    0     0 ufw-skip-to-policy-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type BROADCAST

Chain ufw-after-logging-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "

Chain ufw-after-logging-input (1 references)
 pkts bytes target     prot opt in     out     source               destination
 754K   36M LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "

Chain ufw-after-logging-output (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-after-output (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-before-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 3
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 11
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 12
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 8
    0     0 ufw-user-forward  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain ufw-before-input (1 references)
 pkts bytes target     prot opt in     out     source               destination
 268M   67G ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
  12M 8418M ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
99342   25M ufw-logging-deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate INVALID
99342   25M DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate INVALID
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 3
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 11
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 12
 135K 8228K ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 8
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp spt:67 dpt:68
2483K  177M ufw-not-local  all  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          udp dpt:5353
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            239.255.255.250      udp dpt:1900
2483K  177M ufw-user-input  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain ufw-before-logging-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-before-logging-input (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-before-logging-output (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-before-output (1 references)
 pkts bytes target     prot opt in     out     source               destination
 268M   67G ACCEPT     all  --  *      lo      0.0.0.0/0            0.0.0.0/0
  14M   11G ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
 221K   15M ufw-user-output  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain ufw-logging-allow (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW ALLOW] "

Chain ufw-logging-deny (2 references)
 pkts bytes target     prot opt in     out     source               destination
87716   24M RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate INVALID limit: avg 3/min burst 10
 1594  261K LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "

Chain ufw-not-local (1 references)
 pkts bytes target     prot opt in     out     source               destination
2483K  177M RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL
    0     0 RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type MULTICAST
    0     0 RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type BROADCAST
    0     0 ufw-logging-deny  all  --  *      *       0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 10
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain ufw-reject-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-reject-input (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-reject-output (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-skip-to-policy-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain ufw-skip-to-policy-input (7 references)
 pkts bytes target     prot opt in     out     source               destination
50249 2555K DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain ufw-skip-to-policy-output (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain ufw-track-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-track-input (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-track-output (1 references)
 pkts bytes target     prot opt in     out     source               destination
 159K 9551K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate NEW
48171 3882K ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate NEW

Chain ufw-user-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-user-input (1 references)
 pkts bytes target     prot opt in     out     source               destination
 216K   12M ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22
 182K 9178K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80
 350K   20M ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80
  121  5870 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:80
  790 33124 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:25565
    2   863 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:25565

Chain ufw-user-limit (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0            limit: avg 3/min burst 5 LOG flags 0 level 4 prefix "[UFW LIMIT BLOCK] "
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-port-unreachable

Chain ufw-user-limit-accept (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain ufw-user-logging-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-user-logging-input (0 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-user-logging-output (0 references)
 pkts bytes target     prot opt in     out     source               destination

Chain ufw-user-output (1 references)
 pkts bytes target     prot opt in     out     source               destination

Pastebin for docker inspect output: # docker inspect be5937eda791[ { "Id": "be5937eda7910bff2a609a73 - Pastebin.com

OK, let’s try:

iptables -I INPUT -d 172.17.0.1 -p tcp --dport 3306 -j ACCEPT

Then connect to the container again and try to access port 3306 on the host.

Ah very interesting. It did that and restarted the container. Now it looks like it can get further than before!

# docker logs 3e8d21b6eef6
{"timestamp":"2022-07-28 22:32:50.309 -05:00","level":"info","msg":"Server is initializing...","caller":"app/server.go:237","go_version":"go1.16.7"}
{"timestamp":"2022-07-28 22:32:50.314 -05:00","level":"info","msg":"Starting websocket hubs","caller":"app/web_hub.go:93","number_of_hubs":2}
{"timestamp":"2022-07-28 22:32:50.317 -05:00","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:262","database":"master"}
[mysql] 2022/07/28 22:32:50 packets.go:37: unexpected EOF
[mysql] 2022/07/28 22:32:50 packets.go:37: unexpected EOF
[mysql] 2022/07/28 22:32:50 packets.go:37: unexpected EOF
{"timestamp":"2022-07-28 22:32:50.331 -05:00","level":"error","msg":"Failed to ping DB","caller":"sqlstore/store.go:272","error":"driver: bad connection","retrying in seconds":10}
{"timestamp":"2022-07-28 22:33:00.332 -05:00","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:262","database":"master"}
{"timestamp":"2022-07-28 22:33:00.337 -05:00","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:262","database":"migrations"}
{"timestamp":"2022-07-28 22:33:00.901 -05:00","level":"warn","msg":"Could not create foreign key: Error 1826: Duplicate foreign key constraint name 'FK_RetentionPoliciesChannels_RetentionPolicies'","caller":"sqlstore/store.go:1153"}
{"timestamp":"2022-07-28 22:33:00.903 -05:00","level":"warn","msg":"Could not create foreign key: Error 1826: Duplicate foreign key constraint name 'FK_RetentionPoliciesTeams_RetentionPolicies'","caller":"sqlstore/store.go:1153"}
{"timestamp":"2022-07-28 22:33:01.079 -05:00","level":"info","msg":"Loaded system translations","caller":"i18n/i18n.go:93","for locale":"en","from locale":"/mattermost/i18n/en.json"}
{"timestamp":"2022-07-28 22:33:01.161 -05:00","level":"info","msg":"License key from https://mattermost.com required to unlock enterprise features.","caller":"app/license.go:90"}
{"timestamp":"2022-07-28 22:33:01.171 -05:00","level":"info","msg":"Current version is 6.3.9 (6.3.9/Fri Jun 10 13:02:42 UTC 2022/f2f46f8da34f483288604f26ae395d7da8ebea2e/325928afed97af61de9f7bb03f156e4f17d759d1)","caller":"app/server.go:514","current_version":"6.3.9","build_number":"6.3.9","build_date":"Fri Jun 10 13:02:42 UTC 2022","build_hash":"f2f46f8da34f483288604f26ae395d7da8ebea2e","build_hash_enterprise":"325928afed97af61de9f7bb03f156e4f17d759d1"}
{"timestamp":"2022-07-28 22:33:01.171 -05:00","level":"info","msg":"Enterprise Build","caller":"app/server.go:523","enterprise_build":true}
{"timestamp":"2022-07-28 22:33:01.171 -05:00","level":"info","msg":"Printing current working","caller":"app/server.go:529","directory":"/mattermost"}
{"timestamp":"2022-07-28 22:33:01.171 -05:00","level":"info","msg":"Loaded config","caller":"app/server.go:530","source":"file:///mattermost/config/config.json"}
{"timestamp":"2022-07-28 22:33:01.198 -05:00","level":"info","msg":"Starting workers","caller":"jobs/workers.go:140"}
{"timestamp":"2022-07-28 22:33:01.219 -05:00","level":"info","msg":"Starting schedulers.","caller":"jobs/schedulers.go:116"}
{"timestamp":"2022-07-28 22:33:01.904 -05:00","level":"info","msg":"Starting up plugins","caller":"app/plugin.go:185"}
{"timestamp":"2022-07-28 22:33:01.904 -05:00","level":"info","msg":"Syncing plugins from the file store","caller":"app/plugin.go:259"}
{"timestamp":"2022-07-28 22:33:01.981 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/mattermost-file-list.tar.gz"}
{"timestamp":"2022-07-28 22:33:01.994 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/com.github.matterpoll.matterpoll.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.010 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/com.github.moussetc.mattermost.plugin.diceroller.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.030 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/com.mattermost.voice.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.050 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/jitsi.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.070 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/mattermost-autolink.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.091 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/net.appmodule.mattermost-jitsi-plugin.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.111 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/com.github.moussetc.mattermost.plugin.giphy.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.131 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/com.github.moussetc.mattermost.plugin.spoiler.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.151 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/com.github.scottleedavis.mattermost-plugin-remind.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.171 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/com.mattermost.custom-attributes.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.191 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/com.mattermost.draw-plugin.tar.gz"}
{"timestamp":"2022-07-28 22:33:02.212 -05:00","level":"info","msg":"Syncing plugin from file store","caller":"app/plugin.go:319","bundle":"plugins/com.mattermost.plugin-todo.tar.gz"}

I’m not sure what state it’s in now. If I try to go to the http port in my browser, it doesn’t load however, so I think there’s still some issue remaining.

I think it’s working now! I turned off my binary deployment and switched my docker setup to use the normal app port 8065. I can load it in my browser now at the usual domain with HTTPS.

Woohoo, that’s great to hear :slight_smile:
Please note that the iptables command is not reboot persistent, you would have to make that change permanent by modifying your ufw policies to allow connections from within the containers to your host OS on port 3306.

The output you posted about an hour ago showed the server still starting up, that’s why it was not reachable at this point in time, but glad to hear that it’s working now.

Anyways, I saw some DB migration problems in your output, there are some foreign keys that could not be created due to errors:

{"timestamp":"2022-07-28 22:33:00.901 -05:00","level":"warn","msg":"Could not create foreign key: Error 1826: Duplicate foreign key constraint name 'FK_RetentionPoliciesChannels_RetentionPolicies'","caller":"sqlstore/store.go:1153"}
{"timestamp":"2022-07-28 22:33:00.903 -05:00","level":"warn","msg":"Could not create foreign key: Error 1826: Duplicate foreign key constraint name 'FK_RetentionPoliciesTeams_RetentionPolicies'","caller":"sqlstore/store.go:1153"}

We should maybe work on that in a different topic then, once everything is running here witht he new setup and is also reboot persistent.

I think that last issue with DB migration was actually because I was running an old mattermost image 6.3 in docker (must’ve copied that tag without noticing), when I was already on 7.1 on the binary. I’ve since updated the tag to latest.

Ah, OK - thanks for the clarification.