[RTFACT-15805] HTTPS on Artifactory's Tomcat does not support Docker Registries Created: 02/Feb/18  Updated: 17/Feb/19  Resolved: 06/May/18

Status: Resolved
Project: Artifactory Binary Repository
Component/s: Docker, Tomcat
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Patrick Russell Assignee: Unassigned
Resolution: Won't Do Votes: 2
Labels: None

Issue Links:
is duplicated by RTFACT-15867 pushing to docker registry returns ma... Resolved


Symptoms: With an Artifactory's bundled Tomcat server configured to host the Artifactory application on an HTTPS port (Such as 8443), Docker requests will fail when using the "Embedded Tomcat" method.

Steps to reproduce:
0. Have / create a pair of SSL certificates to use with Artifactory:

openssl req -newkey rsa:2048 -nodes -keyout domain.key -x509 -days 365 -out domain.crt

1. Configure Artifactory's Tomcat server to host an HTTPS port by modifying the $ART_HOME/tomcat/conf/server.xml (Add the below snippet to this file):
<Connector port="8081" scheme="https" secure="true" SSLEnabled="true" SSLCertificateFile="/home/jfrog/programs/artifactory-pro-5.2.1/certs/domain.crt" SSLCertificateKeyFile="/home/jfrog/programs/artifactory-pro-5.2.1/certs/domain.key" SSLProtocol="TLSv1" />

2. Add the insecure registry to the Docker Daemon (/etc/docker/daemon.json):

{ "insecure-registries":["localhost:8443"] }

3. Attempt a "docker login":
docker login localhost:8443
Username (admin): admin
Login Succeeded

4. Attempt a pull or push and observe a timeout:
docker push localhost:8443/docker/tag-new

The push refers to a repository [localhost:8443/docker/tag-new]

f999ae22f308: Pushing [==================================================>] 3.584 kB

malformed HTTP response "\x15\x03\x03\x00\x02\x02P"

In the Artifactory request logs, instead of the usual Docker requests, there are instead 202 "Accepted" HTTP replies, indicating Artifactory is not sending the correct information to the Docker client:




Generated at Thu Jul 02 08:39:12 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.