Hi Jerry, This issue seems to happen as a combination of Apache and an old version of a docker client. It seems that the older versions of docker client does not send the content length header with the request, so when the requests get to Artifactory, it returns 404 response which Apache translate to 502 error. We have manage to reproduce similar behavior locally. We have also tested it with other reverse proxy server (nginx) which seems to be 'smart enough' and calculate the gzip stream length and add it as an header, so when the request got to Artifactory it worked.
With newer client (docker 1.8 and above) docker seems to send the content-length header as it should and it seems to work with no issues. Can you check this with the latest version of Docker? On Fri, Sep 11, 2015 at 10:02 AM, Jerry C <[email protected]> wrote: > Hi, > > When pushing a docker image with size > 600MB to Artifactory docker v2 > registry behind Apache HTTPD, it failed with message below. The same image > can be push successfully through Nginx reverse proxy. Does anything have > experience with Apache HTTPD as reverse proxy help? > > Artifactory version: 4.0.2 rev 40009 > > Apache HTTPD version: > [root@tsunami conf.d]# httpd -v > Server version: Apache/2.4.6 (CentOS) > Server built: Aug 24 2015 18:11:25 > > Docker Registry version: v2 > > docker version > Client version: 1.7.0 > Client API version: 1.19 > Go version (client): go1.4.2 > Git commit (client): 0baf609 > OS/Arch (client): linux/amd64 > Server version: 1.7.0 > Server API version: 1.19 > Go version (server): go1.4.2 > Git commit (server): 0baf609 > OS/Arch (server): linux/amd64 > > > [otter@volcano Desktop]$ docker push > > tsunami:443/sigma/com.sigma.sigmaadmin.demo.node.catalogservices-admin:1.0.0 > The push refers to a repository > [tsunami:443/sigma/com.sigma.sigmaadmin.demo.node.catalogservices-admin] > (len: 1) > cb73be4d3636: Image already exists > 217d94368d2a: Image push failed > Error pushing to registry: Server error: 502 trying to push > sigma/com.sigma.sigmaadmin.demo.node.catalogservices-admin blob - > sha256:54878006f7a40a46fdb9953d7bdf76eecb616e8b9a6aa5edab2a6d4357ce4db1 > > The following errors in Artifactory request log: > > > 20150911120949|1|REQUEST|10.0.150.212|otter|POST|/api/docker/registry_v2/v2/sigma/com.sigma.sigmaadmin.demo.node.catalogservices-admin/blobs/uploads/|HTTP/1.1|202|0 > > 20150911120950|3|REQUEST|10.0.150.212|otter|PUT|/api/docker/registry_v2/v2/sigma/com.sigma.sigmaadmin.demo.node.catalogservices-admin/blobs/uploads/cede11b9-7b7b-4090-851b-85eabe01e487|HTTP/1.1|404|-1 > > 20150911122240|42|REQUEST|fe80::250:56ff:fe31:914f|docker|GET|/api/docker/registry_v2/v2/auth|HTTP/1.1|200|0 > > 20150911122246|9|REQUEST|fe80::250:56ff:fe31:914f|docker|GET|/api/docker/registry_v2/v2/_catalog|HTTP/1.1|404|0 > > In httpd error log: > [Fri Sep 11 12:09:50.129662 2015] [proxy:error] [pid 7405] (104)Connection > reset by peer: [client 10.0.150.212:50481] AH01084: pass request body > failed > to [fe80::250:56ff:fe31:914f]:8081 (tsunami) > [Fri Sep 11 12:09:50.129871 2015] [proxy_http:error] [pid 7405] [client > 10.0.150.212:50481] AH01097: pass request body failed to > [fe80::250:56ff:fe31:914f]:8081 (tsunami) from 10.0.150.212 () > > Here is my Apache httpd reverse proxy configuration: > LoadModule ssl_module modules/mod_ssl.so > > > <VirtualHost 0.0.0.0:443> > ServerName tsunami > > ErrorLog ${APACHE_LOG_DIR}/error.log > CustomLog ${APACHE_LOG_DIR}/access.log combined > > SSLEngine on > SSLCertificateFile /home/otter/certs/registry/tsunami.crt > SSLCertificateKeyFile /home/otter/certs/registry/tsunami.key > > Header always set "Docker-Distribution-Api-Version" "registry/2.0" > Header onsuccess set "Docker-Distribution-Api-Version" "registry/2.0" > > RequestHeader set X-Forwarded-Proto "https" > > ProxyRequests off > ProxyPreserveHost on > > ProxyPass / > http://tsunami:8081/artifactory/api/docker/registry_v2/ > ProxyPassReverse / > http://tsunami:8081/artifactory/api/docker/registry_v2/ > </VirtualHost> > > > > > > > > -- > View this message in context: > http://forums.jfrog.org/Push-large-size-docker-image-to-Artifactory-Docker-v2-registry-behind-Apache-httpd-tp7580464.html > Sent from the Artifactory - Users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Artifactory-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/artifactory-users >
------------------------------------------------------------------------------
_______________________________________________ Artifactory-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/artifactory-users
