Docker externally-accessible registry, 502 Proxy Error, TLS handshake error - linux

Docker version:
Client:
Version: 17.06.2-ce
API version: 1.30
Go version: go1.8.3
Git commit: cec0b72
Built: Tue Sep 5 19:57:21 2017
OS/Arch: linux/amd64
Server:
Version: 17.06.2-ce
API version: 1.30 (minimum version 1.12)
Go version: go1.8.3
Git commit: cec0b72
Built: Tue Sep 5 19:59:19 2017
OS/Arch: linux/amd64
Experimental: false
docker exec 96f0cb141c8b registry --version:
registry github.com/docker/distribution v2.6.2
Reproducing my error:
docker run -d --restart=always --name registry5000 -v `pwd`/certs:/certs -e REGISTRY_HTTP_ADDR=0.0.0.0:5000 -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/cert.pem -e REGISTRY_HTTP_TLS_KE
Y=/certs/privkey.pem -p 5000:5000 registry:2
docker push registry.domain.com/my-registry
output is:
*The push refers to a repository [registry.corobor.com/my-registry]
73c12ad782ae: Retrying in 1 second
98b882d4bdc0: Retrying in 1 second
f9cee97711b2: Retrying in 1 second
3de32dfabd85: Retrying in 1 second
2b0fb280b60d: Retrying in 1 second
received unexpected HTTP status: 502 Proxy Error*
The log of my registry container:
time="2017-09-15T10:04:43Z" level=warning msg="No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable." go.version=go1.7.6 instance.id=001581a2-0296-439e-b8c1-26edb84fc2b3 version=v2.6.2
2017/09/15 10:19:28 http: TLS handshake error from 10.10.10.202:44402: tls: first record does not look like a TLS handshake
2017/09/15 10:19:28 http: TLS handshake error from 10.10.10.202:44414: tls: oversized record received with length 21536
My message:
Hello,
I'm beginner on the subject. My company needs an externally-accessible registry in order to push in images which can be pull by client when they acces to registry.domain.com.
I followed the instructions from the docker official website to create this registry an I used LetsEnscrypt to get my pem certificate files. Here I use port 5000, but also use port 80 which gives the same error...
As written in "Reproducing my error", I had an 502 Proxy Error and TLS handshake error from my proxy. I've searched for many solutions in the forum but nothing convincing.
Do you please have any ideas how to fix it to make my registry available?
Thanks

Related

Guacamole container exits and couldn't authenticated with Mysql

I am trying to install Apache Guacamole container which is followed by the instructions from https://guacamole.apache.org/doc/gug/guacamole-docker.html
I am able to install the guacamole/guacd and mysql containers but when I install guacamole/guacamole container it exits as it is installed.
I reinstalled the container couple of times but there was no improvement. Guacamole container log informes the authentication didn't succeed.
In log it is written the container needs authentication with mysql but I couldn't succeed even I tried to do as in the instruction in website. I probably miss something.
docker version:
Client:
Version: 20.10.12
API version: 1.41
Go version: go1.17.3
Git commit: 20.10.12-0ubuntu4
Built: Mon Mar 7 17:10:06 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.12)
Go version: go1.17.3
Git commit: 20.10.12-0ubuntu4
Built: Mon Mar 7 15:57:50 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.5.9-0ubuntu3.1
GitCommit:
runc:
Version: 1.1.0-0ubuntu1.1
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
docker ps:
root#server:~# root#server:~# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4288a45a153f guacamole/guacamole "/opt/guacamole/bin/…" About an hour ago Exited (1) About an hour ago guacamole-guacamole
e17d224935d1 mysql "docker-entrypoint.s…" About an hour ago Up About an hour 3306/tcp, 33060/tcp guacamole-mysql
7d0e75730239 guacamole/guacd "/bin/sh -c '/usr/lo…" 2 hours ago Up 2 hours (healthy) 4822/tcp guacd-guacd
Logs of the container :
root#server:~# docker logs guacamole-guacamole
FATAL: No authentication configured
-------------------------------------------------------------------------------
The Guacamole Docker container needs at least one authentication mechanism in
order to function, such as a MySQL database, PostgreSQL database, LDAP
directory or RADIUS server. Please specify at least the MYSQL_DATABASE or
POSTGRES_DATABASE environment variables, or check Guacamole's Docker
documentation regarding configuring LDAP and/or custom extensions.

Fabric ./byfn.sh up returns error "...container_linux.go:348..." [win10 home edition]

I am try to start an fabric network according to the doc "Building Your First Network" and the prerequisite docs.
However, when I execute the command ./byfn.sh up, it returns the error below:
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "no such file or directory": unknown ERROR !!!! Test failed
I have already tried to search for this error but with no luck.
I would appreciate if anyone can help me ...
System information:
$ docker version
Client:
Version: 18.03.0-ce
API version: 1.37
Go version: go1.9.4
Git commit: 0520e24302
Built: Fri Mar 23 08:31:36 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.06.0-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:13:39 2018
OS/Arch: linux/amd64
Experimental: false
37675#DESKTOP-JU1BJMT MINGW64 /c/Users/fabric-samples_120/first-network ((v1.2.0 ))
$ go version
go version go1.10.1 windows/amd64
The complete output of byfn.sh up is here.
Please change the docker exec command to below
docker exec cli //bin//bash scripts/script.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE
Add //bin//bash to the command so it points to the bash part of the container
Later in case if it happens to throw EOL exception, because shell doesn't understand DOS/Windows-like line endings
Edit in notepad ++ Edit > EOL Conversion > select Unix/OSX
Then it woks out
I guess it is because your docker version is too new for release-1.2,
As documented in
https://hyperledger-fabric.readthedocs.io/en/release-1.2/prereqs.html#docker-and-docker-compose
Try to pin to Docker version 17.06.2-ce, it could be better

docker: Error response from daemon: rpc error: code = 2 desc = "oci runtime error: exec format error

I have installed docker.io and the docker status is running and active. I acreaa group and added docker. I also added my user to docker group. When I run docker run hello-world , I am ending up with the error docker: Error response from daemon: rpc error: code = 2 desc = "oci runtime error: exec format error". I restarted my machine and docker, still no go.
Docker version output:
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.6.2
Git commit: b9f10c9
Built: Thu, 16 Jun 2016 21:17:51 +1200
OS/Arch: linux/386
Server:
Version: 1.11.2
API version: 1.23
Go version: go1.6.2
Git commit: b9f10c9
Built: Thu, 16 Jun 2016 21:17:51 +1200
OS/Arch: linux/386

Docker on RHEL 7 in AWS can’t pull images

We're looking to incorporate docker on our project and I'm having some difficulty.
I installed Docker via the instructions here: https://docs.docker.com/engine/installation/linux/rhel/ and had no problems. However, when I try to pull any images from docker hub, it just hangs and nothing ever happens:
┌─[user#hostname]─(~)
└─[11:53]$ docker pull alpine:latest
Here's my docker version info:
┌─[user#hostname]─(~)
└─[11:53]$ docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:23:11 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:23:11 2016
OS/Arch: linux/amd64
This is a redhat 7.2 instance in a VPC. I'm using another rhel 7.2 instance to handle NAT through iptables. This issue is the first connectivity problem I've had.
I read elsewhere that specifying an http proxy would solve the issue, so I set up a squid proxy on my nat server, but to no avail. I followed the instructions here to set the proxy for docker to use: https://docs.docker.com/engine/admin/systemd/#/http-proxy
The proxy is getting the requests, but docker still can't pull any images. Here's the out put of my squid logs:
1467475616.376 110 10.0.0.50 TCP_MISS/200 3250 CONNECT registry-1.docker.io:443 - HIER_DIRECT/52.71.80.248 -
1467475616.415 35 10.0.0.50 TCP_MISS/200 4444 CONNECT auth.docker.io:443 - HIER_DIRECT/52.204.167.32 -
I'm running out of things to try here. Any help would be greatly appreciated.
EDIT
Got a new error! After tweaking the squid proxy configuration, I now get this error when attempting to pull an image:
┌─[user#hostname]─(~)
└─[15:15]$ sudo docker pull alpine
Using default tag: latest
Pulling repository docker.io/library/alpine
Error while pulling image: Get https://index.docker.io/v1/repositories/library/alpine/images: Service Unavailable
Here's the output of ping:
┌─[user#hostname]─(~)
└─[15:15]$ ping index.docker.io
PING us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com (54.173.200.203) 56(84) bytes of data.
^C
--- us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
And wget can download a json file from the url in the docker error message:
┌─[user#hostname]─(~)
└─[15:17]$ wget https://index.docker.io/v1/repositories/library/alpine/images
--2016-07-02 15:17:20-- https://index.docker.io/v1/repositories/library/alpine/images
Resolving index.docker.io (index.docker.io)... 54.173.200.203, 52.22.190.106, 52.203.138.237
Connecting to index.docker.io (index.docker.io)|54.173.200.203|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: ‘images’
[ <=> ] 6,900 --.-K/s in 0s
2016-07-02 15:17:20 (185 MB/s) - ‘images’ saved [6900]

'Kubectl' throws error 'failed to negotiate an api version' while installing using docker

I installed docker in machine using the guide in https://docs.docker.com/engine/installation/linux/ubuntulinux/ and I also installed Kubernetes in my local machine by using http://kubernetes.io/docs/getting-started-guides/docker/.
But once I run "kubectl get nodes" I get the error error: failed to negotiate an api version; server supports: map[], client supports: map[v1:{} metrics/v1alpha1:{} extensions/v1beta1:{} componentconfig/v1alpha1:{} batch/v1:{} autoscaling/v1:{} authorization.k8s.io/v1beta1:{}].
The docker version on my machine is as follows.
Client:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Tue Apr 26 23:30:23 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Tue Apr 26 23:30:23 2016
OS/Arch: linux/amd64
Looks like the server responded with an empty list of api versions that it supports.
Can you post the output of kubectl version?
That will print the git versions of kubectl and api server and will help us find if there is any incompatibility between the two.
Ive tried using v1.3.0-alpha.3 of kubernetes with the same version of docker as the OP. I`m still having the same issue though. Should this be fixed in alpha.3 or do I need to wait for a new version ?

Resources