在安装完成后执行
service docker start
任然没有启动,查看错误日志发现如下错误
cat /var/log/docker
```
time="2019-03-20T06:48:53.939998118Z" level=warning msg="You are running linux kernel version 2.6.32-573.26.1.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.10.0."
time="2019-03-20T06:48:53.960733120Z" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"
time="2019-03-20T06:48:53.962487949Z" level=info msg="[graphdriver] using prior storage driver \"devicemapper\""
time="2019-03-20T06:48:53.980257703Z" level=warning msg="Running modprobe bridge nf_nat failed with message: install /bin/true\ninstall /sbin/modprobe --ignore-install bridge && /sbin/sysctl -q -w net.bridge.bridge-nf-call-arptables=0 net.bridge.bridge-nf-call-iptables=0 net.bridge.bridge-nf-call-ip6tables=0\ninstall /bin/true\ninsmod /lib/modules/2.6.32-573.26.1.el6.x86_64/kernel/net/bridge/bridge.ko \n, error: exit status 1"
time="2019-03-20T06:48:54.040926533Z" level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: package not installed"
```
看日志信息Running modprobe bridge nf_nat failed with message感觉像是内核模块没有加载成功,于是手动执行
modprobe bridge nf_nat
```
FATAL: Error inserting bridge (/lib/modules/2.6.32-573.26.1.el6.x86_64/kernel/net/bridge/bridge.ko): Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error running install command for bridge
```
看这错误信息确实是bridge模块没有加载成功,这个时候错误信息最后提示see dmesg,于是执行
dmsg -c
```
bridge: Unknown symbol ipv6_dev_get_saddr
nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
bridge: Unknown symbol ipv6_dev_get_saddr
```
看内核错误日志显示是ipv6模块相关的符号找不到,于是执行
lsmod
```
Module Size Used by
iptable_nat 5923 0
ipt_addrtype 2153 0
ip_tables 17831 1 iptable_nat
nf_nat 22676 1 iptable_nat
nf_conntrack_ipv4 9154 3 iptable_nat,nf_nat
nf_conntrack 79206 3 iptable_nat,nf_nat,nf_conntrack_ipv4
nf_defrag_ipv4 1483 1 nf_conntrack_ipv4
stp 2218 0
llc 5418 1 stp
dm_thin_pool 52448 0
dm_bio_prison 6833 1 dm_thin_pool
dm_persistent_data 56181 1 dm_thin_pool
dm_bufio 20372 1 dm_persistent_data
libcrc32c 1246 1 dm_persistent_data
vsock 46582 2
vmware_balloon 7199 0
sg 29318 0
vmci 74925 1 vsock
i2c_piix4 11232 0
i2c_core 29132 1 i2c_piix4
shpchp 29130 0
ext4 378683 2
jbd2 93252 1 ext4
mbcache 8193 1 ext4
sd_mod 37030 4
crc_t10dif 1209 1 sd_mod
sr_mod 15049 0
cdrom 39085 1 sr_mod
mptsas 51992 3
mptscsih 36638 1 mptsas
mptbase 93647 2 mptsas,mptscsih
scsi_transport_sas 35588 1 mptsas
vmxnet3 42980 0
pata_acpi 3701 0
ata_generic 3837 0
ata_piix 24409 0
dm_mirror 14384 0
dm_region_hash 12085 1 dm_mirror
dm_log 9930 2 dm_mirror,dm_region_hash
dm_mod 99168 12 dm_thin_pool,dm_persistent_data,dm_bufio,dm_mirror,dm_log
```
查看内核加载的模块列表确实没有加载ipv6相关模块,于是执行如下命令查看ipv6模块位置
modinfo ipv6
```
filename: /lib/modules/2.6.32-573.26.1.el6.x86_64/kernel/net/ipv6/ipv6.ko
alias: net-pf-10
license: GPL
description: IPv6 protocol stack for Linux
author: Cast of dozens
srcversion: 938CBE01719FEBE2EB3B1A8
depends:
vermagic: 2.6.32-573.26.1.el6.x86_64 SMP mod_unload modversions
parm: disable:Disable IPv6 module such that it is non-functional (int)
parm: disable_ipv6:Disable IPv6 on all interfaces (int)
parm: autoconf:Enable IPv6 address autoconfiguration on all interfaces (int)
```
找到了内核模块位置后,加载模块
insmod /lib/modules/2.6.32-573.26.1.el6.x86_64/kernel/net/ipv6/ipv6.ko
加载成功后在加载 文章开头的bridge内核模块
modprobe bridge
至此问题解决启动docker成功
有疑问加站长微信联系(非本文作者))