0

我不确定发生了什么,但我似乎无法再访问我的任何容器了。我今天升级了 Docker,从那以后我无法访问我的容器。升级后我什至重新启动了我的服务器。

我认为我应该重命名 /var/lib/docker 并重建我过去工作的 docker 容器。但是,这一次也不起作用。

我能够重建一个运行容器,至少看起来是这样,但仅此而已。我无法访问正在运行的容器的网页。

在这里,我正在运行 Odoo(通过 docker-compose up 使用 Odoo 的默认 docker 构建),您可以看到它似乎构建良好并且运行正常。但我无法从我的桌面访问它。

这在一段时间内运行得很完美:(

Docker version 18.09.1, build 4c52b90, 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 (2018-12-22) x86_64

码头工人日志 https://pastebin.com/EKNM8FZQ

守护进程日志 https://pastebin.com/9xNp7i9r

5c4ba56376d2: Pull complete
ee278417002a: Pull complete
81f7195d84c8: Pull complete
Digest: sha256:ba307a52682f1d70ac5d213c545525ed74eb75a87932412a9e51e9663d0bae92
Status: Downloaded newer image for odoo:12.0
Creating odoo_db_1 ... done
Creating odoo_web_1 ... done
Attaching to odoo_db_1, odoo_web_1
web_1  | 2019-03-04 21:23:07,145 1 INFO ? odoo: Odoo version 12.0-20190128
web_1  | 2019-03-04 21:23:07,145 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf                                                                                              
web_1  | 2019-03-04 21:23:07,145 1 INFO ? odoo: addons paths: ['/var/lib/odoo/.local/share/Odoo/addons/12.0', '/mnt/extra-addons', '/usr/lib/python3/dist-packages/odoo/addons']             
web_1  | 2019-03-04 21:23:07,145 1 INFO ? odoo: database: odoo@db:5432
web_1  | 2019-03-04 21:23:07,254 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf                                           
web_1  | 2019-03-04 21:23:07,405 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 1ef64d047674:8069                                                                          
db_1   | 2019-03-04 21:23:07.432 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1   | 2019-03-04 21:23:07.432 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1   | 2019-03-04 21:23:07.461 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"                                                                                  
db_1   | 2019-03-04 21:23:07.632 UTC [24] LOG:  database system was shut down at 2019-03-04 21:16:12 UTC                                                                                     
db_1   | 2019-03-04 21:23:09.303 UTC [1] LOG:  database system is ready to accept connections

码头工人-compose.yml

version: '2'                                                                                                                                                                                
  services:                                                                                                                                                                                   
    web:                                                                                                                                                                                      
      image: odoo:12.0                                                                                                                                                                        
      depends_on:                                                                                                                                                                             
        - db                                                                                                                                                                                  
      ports:                                                                                                                                                                                  
        - "4040:8069"                                                                                                                                                                         
      volumes:                                                                                                                                                                                
        - /media/docker/odoo/odoo-web-data:/var/lib/odoo                                                                                                                                    
        - /media/docker/odoo/config:/etc/odoo                                                                                                                                               
        - /media/docker/odoo/addons:/mnt/extra-addons                                                                                                                                       
    db:                                                                                                                                                                                       
      image: postgres:10                                                                                                                                                                      
      environment:                                                                                                                                                                            
        - POSTGRES_DB=postgres                                                                                                                                                                
        - POSTGRES_PASSWORD=odoo                                                                                                                                                              
        - POSTGRES_USER=odoo                                                                                                                                                                  
        - PGDATA=/var/lib/postgresql/data/pgdata                                                                                                                                              
      volumes:                                                                                                                                                                                
        - /media/docker/odoo/odoo-db-data:/var/lib/postgresql/data/pgdata                                                                                                                   
  volumes:                                                                                                                                                                                    
    odoo-web-data:                                                                                                                                                                            
    odoo-db-data:               

ifconfig -a


br-1f972a43ba4c: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.19.0.1  netmask 255.255.0.0  broadcast 172.19.255.255
        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

br-41a0112716c5: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.23.0.1  netmask 255.255.0.0  broadcast 172.23.255.255
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 116  bytes 21432 (20.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-56eb88791692: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.22.0.1  netmask 255.255.0.0  broadcast 172.22.255.255
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 190  bytes 38165 (37.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-66bfdbe63aa2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.21.0.1  netmask 255.255.0.0  broadcast 172.21.255.255
        RX packets 2  bytes 56 (56.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 520  bytes 139325 (136.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-9f041a246e19: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.20.0.1  netmask 255.255.0.0  broadcast 172.20.255.255
        RX packets 4  bytes 112 (112.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 336  bytes 110540 (107.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-b408882454cc: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.27.0.1  netmask 255.255.0.0  broadcast 172.27.255.255
        RX packets 4  bytes 112 (112.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 319  bytes 105039 (102.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-b6cd97aaf79a: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        RX packets 1  bytes 28 (28.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 525  bytes 140319 (137.0 KiB)
        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
        RX packets 3376  bytes 412660 (402.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5676  bytes 6112740 (5.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.11.100  netmask 255.255.255.0  broadcast 192.168.11.255
        RX packets 4435  bytes 589568 (575.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6026  bytes 1310789 (1.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.100  netmask 255.255.255.0  broadcast 192.168.2.255
        RX packets 4459940  bytes 6436989773 (5.9 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1670627  bytes 128486493 (122.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.5.100  netmask 255.255.255.0  broadcast 192.168.5.255
        RX packets 65068  bytes 13710376 (13.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 67679  bytes 25716123 (24.5 MiB)
        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
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 84242  bytes 32551544 (31.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 84242  bytes 32551544 (31.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



vethb0f44ac: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 192  bytes 38577 (37.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethbf32272: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 170  bytes 31475 (30.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


编辑:

我不记得我从哪个版本升级了,因为我只是做了 apt upgrade。但是它应该不会太旧,我相信它大约是 18.08-09 版本。

如果容器格式随着升级而改变,对我来说并不重要。因为我删除了/var/lib/docker,所以整个东西都是用新版本从头开始创建的。

我基本上无法从http://192.168.5.100:4040(从网络)或http:/127.0.0.1:4040(在服务器上)访问 Odoo(或其他具有自己端口的容器)

看到这个后,我也觉得我遇到了一些 IP6 问题。也许docker网络只在IP6上运行?

netstat -ntple|grep -i 4040
tcp6       0      0 :::4040                 :::*                    LISTEN      0          13207517   20885/docker-proxy  

编辑2:

我从 5:18.09.3~3-0~debian-buster 回到 5:18.09.0~3-0~debian-buster,一切都恢复正常了。发生了什么变化,以至于升级完全破坏了我所有的容器?

4

0 回答 0