Nginx error. [emerg] 1#1: host not found in upstream "laravel" in /etc/nginx/conf.d/default.conf:59
leeh11 opened this issue · 11 comments
I have been using version 1.0, when I upgraded to the latest version, I got this error.
[emerg] 1#1: host not found in upstream "laravel" in /etc/nginx/conf.d/default.conf:59
Hello
Just tested and I can't simulate error mentioned above. Maybe you have some local changes inside docker-compose.yml or somewhere else. Please try to delete your local docker containers and rebuild from the scratch.
I created a new instance on OCI for test this issue, I got the same error.
nginx: [emerg] host not found in upstream "laravel" in /etc/nginx/conf.d/default.conf:59 /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: Getting the checksum of /etc/nginx/conf.d/default.conf 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh /docker-entrypoint.sh: Configuration complete; ready for start up 2022/09/14 09:43:06 [emerg] 1#1: host not found in upstream "laravel" in /etc/nginx/conf.d/default.conf:59 nginx: [emerg] host not found in upstream "laravel" in /etc/nginx/conf.d/default.conf:59
Hello
Please check if all containers are running after "make start". Also please provide next:
1)docker version
2)docker compose version
3)OS
4)output for command "docker ps"
5)details steps how to simulate
Also please make sure that you haven't custom changes inside your local environment.
Thanks in Advance
Docker version 20.10.17, build 100c701
Docker Compose version v2.6.0
Linux instance-20220821-2217 5.4.17-2136.309.5.el8uek.aarch64 #2 SMP Sat Jul 16 13:56:15 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux
I have tested every version and the error has appeared since v2.1 (v2.0 worked fine)
I haven't custom changes, just replaced 'docker-compose' to 'docker compose' in Makefile files.
still waiting requested data for item 4 above. Did you check if laravel container started?
As you can see laravel container is not running and you need to find the reason why it is not running on your local pc. Please check stdoutput for laravel container and which errors do you have there.
The logs is here.
[opc@instance-20220821-2217 docker-nginx-php-laravel]$ sudo docker logs environment3_laravel
[14-Sep-2022 12:17:48] ERROR: [pool www] please specify user and group other than root
[14-Sep-2022 12:17:48] ERROR: [pool www] please specify user and group other than root
[14-Sep-2022 12:17:48] ERROR: FPM initialization failed
[14-Sep-2022 12:17:48] ERROR: FPM initialization failed
I'm not very good at docker environment, but I can provide any information you need.
please write on our support email your skype and we will try to help with OS user issue.
If it's an OS problem then I don't bother you, I will try to fix it myself when I have time.
I'm already using v2.0 version on my project.
Thanks a lot!
It is not OS problem but try do not use root user for the docker for security reason and create a new one user and add it into docker group. We also have such note in readme.md "sudo usermod -aG docker $USER".

