origin icon indicating copy to clipboard operation
origin copied to clipboard

can not push images to registry

Open Jaware opened this issue 10 years ago • 6 comments

the nodejs demo can not run,error is resgistry-push problem

Version

openshift version 1.2.1 ,ubuntu 16.04

###registry start command:

oadm registry --config=./openshift.local.config/master/admin.kubeconfig --credentials=./openshift.local.config/master/openshift-registry.kubeconfig

####app start command

oc new-app openshift/nodejs-010-centos7~https://github.com/openshift/nodejs-ex.git --name=node21 --insecure-registry=true

####docker config

DOCKER_OPTS="$DOCKER_OPTS --insecure-registry=172.30.123.154:5000 "

###result error

E0905 03:54:07.545689 1 util.go:91] npm info ok I0905 03:54:21.685523 1 sti.go:267] Using provided push secret for pushing 172.30.123.154:5000/default/node21:latest image I0905 03:54:21.685560 1 sti.go:271] Pushing 172.30.123.154:5000/default/node21:latest image ... I0905 03:54:21.688569 1 sti.go:276] Registry server Address: I0905 03:54:21.688603 1 sti.go:277] Registry server User Name: serviceaccount I0905 03:54:21.688612 1 sti.go:278] Registry server Email: [email protected] I0905 03:54:21.688621 1 sti.go:283] Registry server Password: <> F0905 03:54:21.689129 1 builder.go:204] Error: build error: Failed to push image. Response from registry is: Get https://172.30.123.154:5000/v1/_ping: tls: oversized record received with length 20527

Jaware avatar Sep 05 '16 04:09 Jaware

Did you TLS secure your registry? If not, the registry is serving over http, and your docker client needs to be configured to treat it as an insecure registry

liggitt avatar Sep 05 '16 06:09 liggitt

@liggitt how can i see if it is TLS secured? if not ,how can i configure? thanks for you answer~

Jaware avatar Sep 05 '16 06:09 Jaware

very strange,i have tried several times following the guide from https://docs.openshift.org/latest/getting_started/administrators.html#getting-started-administrators and https://docs.openshift.org/latest/install_config/install/docker_registry.html but all failed/(ㄒoㄒ)/~~ ps,docker version is 1.11.2

Jaware avatar Sep 05 '16 10:09 Jaware

I think you can use the command line below to check if TLS is enabled: $ oc logs registry-pod-name | grep tls

The output will be like this: time="2016-08-24T19:39:04.768313027Z" level=info msg="listening on :5000, tls" go.version=go1.6.3 instance.id=3b1e2dcb-2757-42a6-9d01-8019d5831267

Shyckymn avatar Sep 06 '16 17:09 Shyckymn

@Shyckymn thanks ,it seemed none tls.but my error logs showed Failed to push image. Response from registry is: Get https://172.30.123.154:5000/v1/_ping: tls: oversized record received with length 20527. very strange 😭

oc logs registry-pod-name:

time="2016-09-07T02:03:14.446740458Z" level=info msg="version=v2.1.0+unknown" time="2016-09-07T02:03:14.452357875Z" level=info msg="redis not configured" go.version=go1.6 instance.id=d765aa63-a0f2-469a-b226-7c4c3321108d time="2016-09-07T02:03:14.452399109Z" level=info msg="Starting upload purge in 2m0s" go.version=go1.6 instance.id=d765aa63-a0f2-469a-b226-7c4c3321108d time="2016-09-07T02:03:14.452824134Z" level=info msg="using inmemory blob descriptor cache" go.version=go1.6 instance.id=d765aa63-a0f2-469a-b226-7c4c3321108d time="2016-09-07T02:03:14.452880991Z" level=info msg="Using Origin Auth handler" time="2016-09-07T02:03:14.453331979Z" level=debug msg="configured "openshift" access controller" go.version=go1.6 instance.id=d765aa63-a0f2-469a-b226-7c4c3321108d time="2016-09-07T02:03:14.453583445Z" level=info msg="listening on :5000" go.version=go1.6 instance.id=d765aa63-a0f2-469a-b226-7c4c3321108d 172.17.0.1 - - [07/Sep/2016:02:03:20 +0000] "GET /healthz HTTP/1.1" 200 0 "" "Go-http-client/1.1"

Jaware avatar Sep 07 '16 02:09 Jaware

ubuntu 16 use different config,14.04 works

Jaware avatar Sep 07 '16 06:09 Jaware