Harbor企业级仓库错误有哪些

75次阅读
没有评论

共计 5049 个字符,预计需要花费 13 分钟才能阅读完成。

这篇文章将为大家详细讲解有关 Harbor 企业级仓库错误有哪些,文章内容质量较高,因此丸趣 TV 小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

1. 查看 Harbox 状态时报错

[root@ecsmaster01 ~]# docker-compose ps
ERROR:

  Can t find a suitable configuration file in this directory or any
  parent. Are you in the right directory?

  Supported filenames: docker-compose.yml, docker-compose.yaml
 

[root@ecsmaster01 ~]#

解决方法:

必需在 Harbo 安装目录执行命令。

[root@ecsmaster01 ~]# cd /data/harbor/

[root@ecsmaster01 harbor]# docker-compose ps
Name               Command         State                     Ports 

—————————————————————————
harbor-adminserver  /harbor/start.sh   Up                                
harbor-db         /entrypoint.sh postgres   Up   5432/tcp                                
harbor-jobservice  /harbor/start.sh  Up                  
harbor-log  /bin/sh -c /usr/local/bin/ …  Up   127.0.0.1:1514- 10514/tcp  
harbor-ui  /harbor/start.sh  Up              
nginx               nginx -g daemon off;   Up  0.0.0.0:1243- 443/tcp, 0.0.0.0:12443- 4443/tcp, 0.0.0.0:1280- 80/tcp
redis  docker-entrypoint.sh redis …  Up  6379/tcp            
registry  /entrypoint.sh /etc/regist …  Up  5000/tcp            
[root@ecsmaster01 harbor]#

2.harbor 权限问题导致服务启动不成功

[root@ecsmaster01 harbor]# docker-compose  ps
harbor-adminserver  /harbor/start.sh        
Restarting.sh                          
harbor-db         /entrypoint.sh postgres  
Restarting  5432/tcp                              
harbor-jobservice  /harbor/start.sh  Up                  
harbor-log  /bin/sh -c /usr/local/bin/ …  Up   127.0.0.1:1514- 10514/tcp  
harbor-ui  /harbor/start.sh  Up              
nginx               nginx -g daemon off;   Up  0.0.0.0:1243- 443/tcp, 0.0.0.0:12443- 4443/tcp, 0.0.0.0:1280- 80/tcp
redis  docker-entrypoint.sh redis …  Up  6379/tcp            
registry  /entrypoint.sh /etc/regist …  Up  5000/tcp                          
[root@ecsmaster01 harbor]# chmod  700 /data/harbor/runtime/database/     – 对目录修改权限

[root@ecsmaster01 harbor]# docker-compose  start   – 启动后成功了

3.harbor 服务启动了,客户端登陆不上 (Harbor 服务成假死状态)

[root@ecsnode01 harbor]# docker-compose  ps
Name             Command  State             Ports  
———————————————————–
harbor-adminserver  /harbor/start.sh     Up      
harbor-db  /entrypoint.sh postgres       Up  5432/tcp      
harbor-jobservice  /harbor/start.sh     Up 
harbor-ui     /harbor/start.sh   Up 
nginx     nginx -g daemon off;   Up  0.0.0.0:1243- 443/tcp, 0.0.0.0:12443- 4443/tcp, 0.0.0.0:1280- 80/tcp
redis  docker-entrypoint.sh redis …  Up 6379/tcp 
registry  /entrypoint.sh /etc/regist …  Up  5000/tcp
[root@ecsnode01 harbor]# docker login harbor.ecs.host:1280
Username (admin):

Password:

Error response from daemon: Get http://harbor.ecs.host:1280/v1/users/: dial tcp 172.31.129.90:1280: getsockopt: connection refused
[root@ecsnode01 harbor]#

解决方法:

[root@ecsnode01 harbor]# docker-compose down   – 关闭 harbor 服务
Stopping nginx  … done
Stopping harbor-jobservice  … done
Stopping harbor-ui  … done
Stopping harbor-adminserver … done
Stopping registry  … done
Stopping harbor-db  … done
Stopping redis  … done
Removing network harbor_harbor
ERROR: network harbor_harbor has active endpoints
[root@ecsnode01 harbor]# docker ps -a | grep gohar   - 查找 harbor 后台进程
020c645d19bf   goharbor/nginx-photon:v1.6.2   nginx -g daemon off   2 minutes ago  Up 2 minutes (healthy)  0.0.0.0:1280- 80/tcp, 0.0.0.0:1243- 443/tcp, 0.0.0.0:12443- 4443/tcp  nginx
7cad5120eb6f  goharbor/harbor-jobservice:v1.6.2  /harbor/start.sh   2 minutes ago  Up 2 minutes     harbor-jobservice
b5f690d630ef   goharbor/harbor-ui:v1.6.2   /harbor/start.sh   2 minutes ago   Up 2 minutes (healthy)  harbor-ui
dbb16a2b721f  goharbor/registry-photon:v2.6.2-v1.6.2   /entrypoint.sh /etc/   2 minutes ago     Up 2 minutes (healthy)   5000/tcp   registry
a2674c617f21   goharbor/harbor-db:v1.6.2   /entrypoint.sh postg   2 minutes ago  Up 2 minutes (healthy)     5432/tcp     harbor-db
14e7eb9cda83   goharbor/harbor-adminserver:v1.6.2   /harbor/start.sh   2 minutes ago   Up 2 minutes (healthy)     harbor-adminserver
d0931ed6c137  goharbor/redis-photon:v1.6.2  docker-entrypoint.sh   2 minutes ago  Up 2 minutes   6379/tcp   redis
065a3c6e17bd   goharbor/harbor-log:v1.6.2   /bin/sh -c /usr/loca   2 minutes ago   Up 2 minutes (healthy)   127.0.0.1:1514- 10514/tcp   harbor-log
[root@ecsnode01 harbor]# docker rm -f
020c645d19bf  7cad5120eb6f  b5f690d630ef  a2674c617f21  14e7eb9cda83  d0931ed6c137  065a3c6e17bd   – 删除进程

[root@ecsnode01 harbor]# ./install.sh     – 重启 Harbor 服务

[Step 0]: checking installation environment …

Note: docker version: 1.12.6

Note: docker-compose version: 1.17.1

[Step 1]: loading Harbor images …
Loaded image: goharbor/registry-photon:v2.6.2-v1.6.2
Loaded image: goharbor/notary-server-photon:v0.5.1-v1.6.2
Loaded image: goharbor/clair-photon:v2.0.6-v1.6.2
Loaded image: goharbor/chartmuseum-photon:v0.7.1-v1.6.2
Loaded image: goharbor/harbor-log:v1.6.2
Loaded image: goharbor/harbor-db:v1.6.2
Loaded image: goharbor/harbor-jobservice:v1.6.2
Loaded image: goharbor/nginx-photon:v1.6.2
Loaded image: goharbor/notary-signer-photon:v0.5.1-v1.6.2
Loaded image: goharbor/harbor-migrator:v1.6.2
Loaded image: goharbor/harbor-adminserver:v1.6.2
Loaded image: goharbor/harbor-ui:v1.6.2
Loaded image: goharbor/redis-photon:v1.6.2

。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

✔ —-Harbor has been installed and started successfully.—-

Now you should be able to visit the admin portal at http://172.31.129.90:1280.

For more details, please visit https://github.com/goharbor/harbor .

[root@ecsnode01 harbor]# docker login harbor.ecs.host:1280
Username: admin
Password:

Login Succeeded
[root@ecsnode01 harbor]#

关于 Harbor 企业级仓库错误有哪些就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-08-25发表,共计5049字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)