I
Immich2y ago
Seion

IPV6 Setup Issues

I setup and see where IPV6 is listening on port 2283 on the host but am getting the following error on my NGINX host proxy
2023/07/25 12:51:33 [error] 156775#156775: *13 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: hiddenIPV6addresshere, server: hiddenhosthere, request: "GET / HTTP/1.1", upstream: "http://[::1]:2283/", host: "hiddenHostHere"
2023/07/25 12:51:33 [error] 156775#156775: *13 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: hiddenIPV6addresshere, server: hiddenhosthere, request: "GET / HTTP/1.1", upstream: "http://[::1]:2283/", host: "hiddenHostHere"
I also cannot access immich at http://[hostIPV6address]:2283
33 Replies
Kryptonian
Kryptonian2y ago
2283 is the API aka server container, not web though?
Seion
SeionOP2y ago
2283 -> 8080 ? in the Proxy container
bo0tzz
bo0tzz2y ago
What do the logs in the immich_proxy container say?
Kryptonian
Kryptonian2y ago
That snippet was from that, bo0tzz.
bo0tzz
bo0tzz2y ago
oh I thought that was from an upstream reverse proxy, my bad
Seion
SeionOP2y ago
the snippet is from my NGINX proxy
Kryptonian
Kryptonian2y ago
Oh
Seion
SeionOP2y ago
so its double proxy technically
bo0tzz
bo0tzz2y ago
Can you post the full logs from immich_proxy as well?
Seion
SeionOP2y ago
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-set-env-variables.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/07/25 16:01:10 [notice] 1#1: using the "epoll" event method
2023/07/25 16:01:10 [notice] 1#1: nginx/1.25.0
2023/07/25 16:01:10 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4)
2023/07/25 16:01:10 [notice] 1#1: OS: Linux 6.1.0-10-amd64
2023/07/25 16:01:10 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-set-env-variables.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/07/25 16:01:10 [notice] 1#1: using the "epoll" event method
2023/07/25 16:01:10 [notice] 1#1: nginx/1.25.0
2023/07/25 16:01:10 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4)
2023/07/25 16:01:10 [notice] 1#1: OS: Linux 6.1.0-10-amd64
2023/07/25 16:01:10 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023/07/25 16:01:10 [notice] 1#1: start worker processes
2023/07/25 16:01:10 [notice] 1#1: start worker process 41
2023/07/25 16:01:10 [notice] 1#1: start worker process 42
2023/07/25 16:01:10 [notice] 1#1: start worker process 43
2023/07/25 16:01:10 [notice] 1#1: start worker process 44
2023/07/25 16:01:10 [notice] 1#1: start worker process 45
2023/07/25 16:01:10 [notice] 1#1: start worker process 46
2023/07/25 16:01:10 [notice] 1#1: start worker process 47
2023/07/25 16:01:10 [notice] 1#1: start worker process 48
2023/07/25 16:01:10 [notice] 1#1: start worker process 49
2023/07/25 16:01:10 [notice] 1#1: start worker process 50
2023/07/25 16:01:10 [notice] 1#1: start worker process 51
2023/07/25 16:01:10 [notice] 1#1: start worker process 52
2023/07/25 16:01:10 [notice] 1#1: start worker process 53
2023/07/25 16:01:10 [notice] 1#1: start worker process 54
2023/07/25 16:01:10 [notice] 1#1: start worker process 55
2023/07/25 16:01:10 [notice] 1#1: start worker process 56
2023/07/25 16:01:10 [notice] 1#1: start worker process 57
2023/07/25 16:01:10 [notice] 1#1: start worker process 58
2023/07/25 16:01:10 [notice] 1#1: start worker process 59
2023/07/25 16:01:10 [notice] 1#1: start worker process 60
2023/07/25 16:01:10 [notice] 1#1: start worker process 61
2023/07/25 16:01:10 [notice] 1#1: start worker process 62
2023/07/25 16:01:10 [notice] 1#1: start worker process 63
2023/07/25 16:01:10 [notice] 1#1: start worker process 64
2023/07/25 16:01:10 [notice] 1#1: start worker process 65
2023/07/25 16:01:10 [notice] 1#1: start worker process 66
2023/07/25 16:01:10 [notice] 1#1: start worker process 67
2023/07/25 16:01:10 [notice] 1#1: start worker process 68
2023/07/25 16:01:10 [notice] 1#1: start worker processes
2023/07/25 16:01:10 [notice] 1#1: start worker process 41
2023/07/25 16:01:10 [notice] 1#1: start worker process 42
2023/07/25 16:01:10 [notice] 1#1: start worker process 43
2023/07/25 16:01:10 [notice] 1#1: start worker process 44
2023/07/25 16:01:10 [notice] 1#1: start worker process 45
2023/07/25 16:01:10 [notice] 1#1: start worker process 46
2023/07/25 16:01:10 [notice] 1#1: start worker process 47
2023/07/25 16:01:10 [notice] 1#1: start worker process 48
2023/07/25 16:01:10 [notice] 1#1: start worker process 49
2023/07/25 16:01:10 [notice] 1#1: start worker process 50
2023/07/25 16:01:10 [notice] 1#1: start worker process 51
2023/07/25 16:01:10 [notice] 1#1: start worker process 52
2023/07/25 16:01:10 [notice] 1#1: start worker process 53
2023/07/25 16:01:10 [notice] 1#1: start worker process 54
2023/07/25 16:01:10 [notice] 1#1: start worker process 55
2023/07/25 16:01:10 [notice] 1#1: start worker process 56
2023/07/25 16:01:10 [notice] 1#1: start worker process 57
2023/07/25 16:01:10 [notice] 1#1: start worker process 58
2023/07/25 16:01:10 [notice] 1#1: start worker process 59
2023/07/25 16:01:10 [notice] 1#1: start worker process 60
2023/07/25 16:01:10 [notice] 1#1: start worker process 61
2023/07/25 16:01:10 [notice] 1#1: start worker process 62
2023/07/25 16:01:10 [notice] 1#1: start worker process 63
2023/07/25 16:01:10 [notice] 1#1: start worker process 64
2023/07/25 16:01:10 [notice] 1#1: start worker process 65
2023/07/25 16:01:10 [notice] 1#1: start worker process 66
2023/07/25 16:01:10 [notice] 1#1: start worker process 67
2023/07/25 16:01:10 [notice] 1#1: start worker process 68
I can't connect to the container via console, only see the logs in the portainer view I have portainer working via IPV6 through docker also
Kryptonian
Kryptonian2y ago
There should be access logs...
Seion
SeionOP2y ago
let me see if I can connect via command line I got in with sh cat access.log just sits there and never returns lol
Seion
SeionOP2y ago
yea just saw the sym link...
Kryptonian
Kryptonian2y ago
Oh, right in Immich proxy container.
Seion
SeionOP2y ago
that file is owned by root so can't change it I wonder if its all the forwarding inside the network through IPV4 or maybe not I dont know... I turned that access log on but its still symlinked to stdout
Kryptonian
Kryptonian2y ago
That's not how it works. You need to use docker logs to see them
Seion
SeionOP2y ago
well there is nothing in the docker logs thats different nor do I see really anything in the docker logs when I try to access http://[IPV6]:2283
jrasm91
jrasm912y ago
When Nginx starts (in immich) it should execute the 10-listen-on-iv6-by-default script and log some stuff to indicate if ipv6 is enabled or not.
Seion
SeionOP2y ago
in netstat -a I see it listening on 2283 on IPV6 tcp6 0 0 [::]:2283 [::]:* LISTEN on the host machine
jrasm91
jrasm912y ago
Are you expecting inter-container communication to use ipv6?
Seion
SeionOP2y ago
I am expecting IPV6 all the way to the container at least so from browser to container, but it should be able to do inter-ctainer communication IPV6
jrasm91
jrasm912y ago
It looks like it is listening on ipv6.
Seion
SeionOP2y ago
I setup IPV6 on the network docker network that the containers are using and they have FD00: addresses
Seion
SeionOP2y ago
No description
jrasm91
jrasm912y ago
What's the error right now?
Seion
SeionOP2y ago
well with the proxy on the host
2023/07/25 12:51:33 [error] 156775#156775: *13 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: hiddenIPV6addresshere, server: hiddenhosthere, request: "GET / HTTP/1.1", upstream: "http://[::1]:2283/", host: "hiddenHostHere"
2023/07/25 12:51:33 [error] 156775#156775: *13 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: hiddenIPV6addresshere, server: hiddenhosthere, request: "GET / HTTP/1.1", upstream: "http://[::1]:2283/", host: "hiddenHostHere"
Thats using the domain.com address I have setup for it But if I do [IPV6address of host]:2283 it does not load inside the network
jrasm91
jrasm912y ago
I don't understand. Can't you connect directly to 2283 via ipv6?
Seion
SeionOP2y ago
inside my home network where the host lives (and outside) no but I can access other services through IPV6 on the same host just not the 2283 immich service so for example portainer is running on docker on the same host and I can access it through [IPV6]:9000 and same for a few other services but trying to get immich to work also through IPV6
jrasm91
jrasm912y ago
Can you upload the logs for all the immich containers? There had to be some errors that indicate the connection is failing somewhere. Not sure what the issue is unless you can find that. I don't know if anyone has run inter container communication via ipv6 to my knowledge
Seion
SeionOP2y ago
yea im not seeing any errors in the containers ill switch back to IPV4 for now and look into pulling it into a local machine to do a bunch of testing
jrasm91
jrasm912y ago
We might have to validate that, even though the container is assigned an ipv6 address, that they bind/listen to that interface too
Seion
SeionOP2y ago
I looked a the server and in the log it just showed 0.0.0.0:3000 so it might not be doing that on IPV6 also If I turn up an simple express app with listen(port) I am able to connect to http://[::1]:port so express might handle listening on both ports automatically

Did you find this page helpful?