harbor 报错:dial tcp 127.0.0.1:1514: connect: connection refused 解决
harbor
Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
项目地址:https://gitcode.com/gh_mirrors/ha/harbor
免费下载资源
·
一、harbor启动报错
harbor 报错:dial tcp 127.0.0.1:1514: connect: connection refused
二、docker ps 查看docker 服务
1、查看到harbor-log 处于restart状态
2、查看harbor-log日志
unable to change expired
password: Authentication token manipulation error sudo:
Account or password isexpired, reset your password and try again sudo: a terminal is required toreadthe password;
either use the -S option to read from standard input or configure
an askpass helper Changing passwordfor root. sudo: unable to change expired
password: Authentication token manipulation error
从报错日志中分析到harbor-log中提示root用户名密码已过期.
三、解决方案
1、导出harbor-log容器
mkdir -p /tmp/harbor-log
cd /tmp/harbor-log
docker export harbor-log -o harbor-log.tar
2、解压tar包
tar xvfp harbor-log.tar
3、修改shadow文件的值
sed -i 's/:90:/:99999:/g' /tmp/harbor-log/etc/shadow
4、将修改后的shadow文件挂载到harbor-log容器内
mkdir -p /opt/harbor-log-etc/
cp /tmp/harbor-log/etc/shadow /opt/harbor-log-etc/shadow
5、修改docker-composr.yml文件,harbor-log容器的volumes配置,增加以下配置
volumes:
- type: bind
source: /opt/harbor-log-etc/shadow
target: /etc/shadow
6、重启harbor即可
docker-compose down
docker-compose up -d
GitHub 加速计划 / ha / harbor
23.24 K
4.68 K
下载
Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
最近提交(Master分支:2 个月前 )
2ed5c1eb
Updated untranslated French strings
Signed-off-by: tostt <tostt@users.noreply.github.com>
Co-authored-by: Wang Yan <wangyan@vmware.com> 1 天前
21de4242
Remove unused files
fix golint warnings
Signed-off-by: stonezdj <stone.zhang@broadcom.com> 2 天前
更多推荐
已为社区贡献1条内容
所有评论(0)