报错
docker重启之后发现goharbor/nginx-photon组件一直处于重启的状态,harbor使用的81端口也没有了,网页访问不了harbor
解决
经过排查发现可能是harbor网卡的问题,需要手动移除,
# cd /usr/local/harbor
# docker-compose down
# docker network inspect harbor_harbor
[
{
"Name": "harbor_harbor", #参数1
"Id": "c3fd4485fc70ac39f304e1dc88e68c0292a6ed4d872bc246b47b8a1fee0c40f0",
"Created": "2021-04-30T00:10:16.400151438+08:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"aa2c8463bd66f8c531e47bd81029dc4c5dde984909e0f55b56414bd4975acebe": {
"Name": "nginx", #参数2
"EndpointID": "f47bbf14ced631b98270031e9b1a52e0f89789f4479b3f37c7855dd912d5119a",
"MacAddress": "02:42:ac:12:00:02",
"IPv4Address": "172.18.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {
"com.docker.compose.network": "harbor",
"com.docker.compose.project": "harbor",
"com.docker.compose.version": "1.21.2"
}
}
]
# docker network disconnect -f harbor_harbor(参数1) nginx(参数2)
# docker-compose up -d
整体流程就是手动删除harbor_harbor网卡,重启harbor即可