gpt4 book ai didi

docker - 解码内容错误 : invalid character '<' looking for beginning of value

转载 作者:行者123 更新时间:2023-12-04 17:36:46 29 4
gpt4 key购买 nike

我设置了 Artifactory Pro Docker 镜像版本 5.4.5。我也在使用 Nginx,并使用自签名证书启用了 HTTPS。当我尝试运行 docker pull 命令时,出现错误:

[root@tom ~]# docker pull docker-dev.artifactory.company.com/docker/hello-world
Using default tag: latest
Error response from daemon: error unmarshalling content: invalid character '<' looking for beginning of value

docker login 工作正常。

[root@tom ~]# docker login docker-dev.artifactory.company.com --username admin --password password
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

在 Artifactory 服务器上,

$ cat /data/nginx/logs/access.log
ip = 10.150.16.53 user = "-" local_time = "31/May/2019:16:52:25 +0000" host = docker-dev.artifactory.company.com request = "GET /v2/ HTTP/1.1" status = 302 bytes = 0 upstream = "103.224.212.222:80" upstream_time = 0.548 request_time = 0.548 referer = "-" UA = "docker/18.09.5 go/go1.10.8 git-commit/e8ff056 kernel/3.10.0-693.17.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.5 \x5C(linux\x5C))"
ip = 10.150.16.53 user = "-" local_time = "31/May/2019:16:52:27 +0000" host = docker-dev.artifactory.company.com request = "GET /v2/docker/hello-world/manifests/latest HTTP/1.1" status = 302 bytes = 0 upstream = "103.224.212.222:80" upstream_time = 0.521 request_time = 0.521 referer = "-" UA = "docker/18.09.5 go/go1.10.8 git-commit/e8ff056 kernel/3.10.0-693.17.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.5 \x5C(linux\x5C))"

Nginx 配置:

$ cat /data/nginx/conf.d/artifactory.conf
###########################################################
## this configuration was generated by JFrog Artifactory ##
###########################################################

## add ssl entries when https has been set in config
ssl_certificate /var/opt/jfrog/nginx/ssl/example.pem;
ssl_certificate_key /var/opt/jfrog/nginx/ssl/example.key;
ssl_session_cache shared:SSL:1m;
ssl_prefer_server_ciphers on;
## server configuration
server {
listen 443 ssl;
listen 80 ;
server_name ~(?<repo>.+)\.artifactory.company.com artifactory.company.com;

if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;
}
## Application specific logs
## access_log /var/log/nginx/artifactory.company.com-access.log timing;
## error_log /var/log/nginx/artifactory.company.com-error.log;
rewrite ^/$ /artifactory/webapp/ redirect;
rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect;
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/$repo/$1/$2;
chunked_transfer_encoding on;
client_max_body_size 0;
location /artifactory/ {
proxy_read_timeout 900;
proxy_pass_header Server;
proxy_cookie_path ~*^/.* /;
if ( $request_uri ~ ^/artifactory/(.*)$ ) {
proxy_pass http://artifactory.company.com:80/artifactory/$1;
}
proxy_pass http://artifactory.company.com:80/artifactory/;
proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port/artifactory;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

我确实检查了 official guide和其他一些在线文章,但自最近两天以来无法正常工作。非常感谢您的帮助。

最佳答案

不确定这是否对以后的人有帮助,但当图像名称中的地址错误时,我遇到了同样的错误。在我的例子中,我使用了 bintray.com/jfrog/artifactory-pro:latest,而不是 jfrog-docker-reg2.bintray.io/jfrog/artifactory-pro:latest

关于docker - 解码内容错误 : invalid character '<' looking for beginning of value,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56399562/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com