首页 > 其他分享 >【随手记录】harbor部署在国产arm服务器报错 502 Bad Gateway

【随手记录】harbor部署在国产arm服务器报错 502 Bad Gateway

时间:2024-02-07 16:35:06浏览次数:22  
标签:github harbor Bad 报错 registry go docker com distribution

在国产arm服务器KyLinV11操作系统部署harbor仓库时候遇到 502 Bad Gateway 问题

问题:502 Bad Gateway

docker login --username=xx --password=xxx 10.23.5.10:18023
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: login attempt to http://xxx:18023/v2/ failed with status: 502 Bad Gateway

 原因:registry容器因为权限问题导致异常重启

Appending internal tls trust CA to ca-bundle ...
find: '/etc/harbor/ssl': No such file or directory
Internal tls trust CA appending is Done.
ls: /harbor_cust_cert: Permission denied
time="2024-02-07T04:07:18.071313545Z" level=info msg="debug server listening localhost:5001" 
time="2024-02-07T04:07:18.07219485Z" level=info msg="using redis blob descriptor cache" go.version=go1.19.8 instance.id=ddd7db6e-e5ba-42de-8bc1-26655a607aea service=registry version=v2.8.0.m 
panic: unable to configure authorization (htpasswd): open /etc/registry/passwd: permission denied
goroutine 1 [running]:
github.com/docker/distribution/registry/handlers.NewApp({0xa71940?, 0x4000483ef0?}, 0x4000101800)
	/go/src/github.com/docker/distribution/registry/handlers/app.go:317 +0x191c
github.com/docker/distribution/registry.NewRegistry({0xa71940?, 0x4000483470?}, 0x4000101800)
	/go/src/github.com/docker/distribution/registry/registry.go:161 +0x128
github.com/docker/distribution/registry.glob..func1(0x8?, {0x4000484730, 0x1, 0x1})
	/go/src/github.com/docker/distribution/registry/registry.go:119 +0x160
github.com/docker/distribution/vendor/github.com/spf13/cobra.(*Command).execute(0xfd3f40, {0x40004846f0?, 0x2?, 0x2?})
	/go/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:495 +0x3ac
github.com/docker/distribution/vendor/github.com/spf13/cobra.(*Command).Execute(0xfd40e0)
	/go/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:560 +0x98

解决方式:给予文件权限(harbor由uid gid 10000的用户启动)

chown -R 10000.10000 ./common

在使用docker login命令报错502 Bad Gateway,基本都是相关服务没有正常启动,可以观察下服务运行日志,定位到问题处理即可

标签:github,harbor,Bad,报错,registry,go,docker,com,distribution
From: https://www.cnblogs.com/whaleX/p/18011035

相关文章

  • eslint报错:Parsing error: No Babel config file detected for E:\xxx\index.config
    eslint根据eslint配置文件的parserOption,知道了要使用babel对代码进行解析,但是解析babel需要使用babel配置文件,由于找不到配置文件(babel配置文件默认需要放在根目录下),所以会报错。因此,添加requireConfigFile:false,本质上是告诉eslint,不用查找这个配置文件了,虽然表面上可以解决这......
  • useEffect 传入的函数,它的返回值要么是一个方法(清理函数),要么就是undefined,其他情况都
    useEffect传入的函数,它的返回值要么是一个方法(清理函数),要么就是undefined,其他情况都会报错比较常见的一个情况是,我们的useEffect需要执行一个async函数,比如://❌//Type'Promise<void>'providesnomatch//forthesignature'():void|undefined'useEffect(asyn......
  • Jenkins在jdk17的Tomcat上运行报错
    Jenkins在jdk17的Tomcat上运行报错一、环境宝塔:tomcat8.0jdk:jdk17二、保存项目时报错​Unabletomakefieldprotectedtransientintjava.util.AbstractList.modCountaccessible:modulejava.basedoesnot"opensjava.util"tounnamedmodule@6d15ca84​查看local......
  • Jenkins在jdk17的Tomcat上运行报错
    Jenkins在jdk17的Tomcat上运行报错一、环境宝塔:tomcat8.0jdk:jdk17二、保存项目时报错​Unabletomakefieldprotectedtransientintjava.util.AbstractList.modCountaccessible:modulejava.basedoesnot"opensjava.util"tounnamedmodule@6d15ca84​查看local......
  • Jenkins在jdk17的Tomcat上运行报错
    Jenkins在jdk17的Tomcat上运行报错一、环境宝塔:tomcat8.0jdk:jdk17二、保存项目时报错​Unabletomakefieldprotectedtransientintjava.util.AbstractList.modCountaccessible:modulejava.basedoesnot"opensjava.util"tounnamedmodule@6d15ca84​查看local......
  • 使用IDEA直接连接数据库报错:Server returns invalid timezone. Go to 'Advanced' tab
    错误详情:使用IDEA直接连接数据库报错:Serverreturnsinvalidtimezone.Goto'Advanced'tabandset'serverTimezone'propertymanually.错误原因:MySQL驱动中默认时区是UTC,与本地时间有时差。解决方案:点开最右侧导航栏Advanced,找到serverTimezone,在value处填写GMT保存再......
  • Maven3.9.6 构建项目报错 Failed to execute goal org.apache.maven.plugins:maven-re
    在使用Maven3.9.6构建项目时,出现以下错误:[INFO][INFO]---resources:3.3.1:resources(default-resources)@service-sample---[INFO]Copying18resourcesfromsrc/main/javatotarget/classes[INFO]Copying15resourcesfromsrc/main/resourcestotarget/classes[IN......
  • 解决编译报错——too few arguments for template template parameter “Tuple“detec
    一般出现这种问题都是cuda、pytorch和vs版本没配对上。这里出现问题的文件为torch中的cast.h。我看网上很多给的解决方法是修改下面代码:template<template<typename...>classTuple,typename...Ts>classtuple_caster;template<typenameT1,typenameT2>classtyp......
  • Docker私有镜像仓库harbor
    一、Harbor介绍Docker容器应用的开发和运行离不开可靠的镜像管理,虽然Docker官方也提供了公共的镜像仓库,但是从安全和效率等方面考虑,部署我们私有环境内的Registry也是非常必要的。Harbor是由VMware公司开源的企业级的DockerRegistry管理项目,它包括权限管理(RBAC)、LDAP、日志审核......
  • 【pwn】ctfshow元旦水友赛--BadBoy
    首先先来看一下程序的保护情况这里got表可改,没有开地址随机接着看一下ida逻辑很直接,只有一个main函数,一点点分析这段代码buf[1]=__readfsqword(0x28u); init_func(argc,argv,envp); buf[0]='gfedcba'; v5=0LL; while((_DWORD)kl) {  puts("iamba......