我已在关系服务器https://nexus.mycompany.com中配置了Docker注册表(托管),并在8083上启用了HTTP连接器端口。

我无法将图像从我的Jenkins服务器推送到Docker存储库。

我已在Jenkins服务器.x的不安全注册表中添加了nexus服务器

$ cat /etc/docker/daemon.json

{
  "insecure-registries": [
     "nexus.mycompany.com:8082",
     "nexus.mycompany.com:8083"
  ]
}

当我跑步

docker 登录-u管理员-p xxxxx nexus.mycompany.com:8083

我收到以下错误

警告!通过CLI使用--password是不安全的。使用--password-stdin。
来自守护程序的错误响应:获取http://nexus.mycompany.com:8083/v2/:拨打tcp xxx.xx.0.xx:8083:connect:没有路由到主机


我已经在Apache Jenkins服务器中配置了SSL vis apache httpd,这是我的conf.d文件。我在代理设置中缺少什么吗?
<VirtualHost xxx.xx.x.xx:80>

ServerName jenkins.mycompany.com
ProxyRequests Off
RewriteEngine on

ProxyPass /jenkins http://xxx.xx.x.xx:8080/jenkins
ProxyPassReverse /jenkins  http://xxx.xx.x.xx:8080/jenkins


ProxyPreserveHost On

LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
ErrorLog  /var/log/httpd/jenkins-error.log
CustomLog  /var/log/httpd/jenkins-access.log combined

#Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"

</VirtualHost>



<VirtualHost xxx.xx.x.xx:443>
ServerName jenkins.mycompany.com

TimeOut 900

<Directory />
Order allow,deny
Allow from all
</Directory>

SSLEngine On
SSLCertificateKeyFile   /etc/httpd/conf.d/.ssl/mycompany.com.key
SSLCertificateFile      /etc/httpd/conf.d/.ssl/mycompany.com.crt
SSLCertificateChainFile /etc/httpd/conf.d/.ssl/mycompany.comca.crt

ProxyRequests Off
RewriteEngine on

ProxyPass /jenkins  http://xxx.xx.x.xx:8080/jenkins
ProxyPassReverse /jenkins  http://xxx.xx.x.xx:8080/jenkins


ProxyPreserveHost On
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"

LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
ErrorLog  /var/log/httpd/jenkins-ssl-error.log
CustomLog  /var/log/httpd/jenkins-ssl-access.log combined

</VirtualHost>```



I can connect to the Docker registry from the nexus server.
Jenkins server ports
Below are my port settings on the Jenkins server.

```Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -
tcp6       0      0 ::1:25                  :::*                    LISTEN      -
tcp6       0      0 :::443                  :::*                    LISTEN      -
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      15505/java
tcp6       0      0 :::8009                 :::*                    LISTEN      15505/java
tcp6       0      0 :::8080                 :::*                    LISTEN      15505/java
tcp6       0      0 :::80                   :::*                    LISTEN      -
.```

最佳答案

这是简单的端口问题。尽管端口8083正在监听,但它不接受流量。

我编辑了iptables,添加了8083以接受入站流量,并且我能够登录。

09-04 08:14