Skip to content

Proxy fails to reestablish connection after Docker restart #15

Description

@mprokopiev

Seems like change in #8 was dropped with commit 0d37367 after this code was removed:

if err != nil {
			log.Fatalf("could not access docker socket %v", err)
		}

Was it intended? Should introduced healthcheck feature help in this scenario? If so - socket proxy doesn't terminate when docker is restarted with the same "connection refused" errors. SOCKET_PROXY_KEEPALIVE and SOCKET_PROXY_TIMEOUT are set in container and are default values.

❯ sudo cat /proc/$(docker container inspect webservice-socket-proxy --format "{{ .State.Pid }}")/environ  | strings
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=88e47aaafbff
SOCKET_PROXY_GID=1002
SOCKET_PROXY_VOLUME=/run/proxy
SOCKET_PROXY_DOCKER_SOCKET=/run/docker.sock
TZ=Europe/Kyiv
SOCKET_PROXY_UID=3000
APP_IMAGE=11notes/socket-proxy
APP_NAME=socket-proxy
APP_VERSION=2.1.6
APP_ROOT=/
SOCKET_PROXY_KEEPALIVE=10s
SOCKET_PROXY_TIMEOUT=30s

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions