Open fengwang opened 4 years ago
This seems like something wrong with docker networking. This docker-compose file works well on a fresh installation of docker. Make sure you use the latest version of docker and docker-compose and check if you have changed any networking related confogiration. Maybe the resolver 127.0.0.11
line in the nginx config file does not fit your configuration of docker.
获取 Outlook for Androidhttps://aka.ms/ghei36
From: feng wang notifications@github.com Sent: Monday, May 11, 2020 9:11:50 AM To: sysu-ipv6/UNIT3D-Deploy UNIT3D-Deploy@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [sysu-ipv6/UNIT3D-Deploy] How to solve the proble of '1 app could not be resolved' (#2)
I installed it to a machine with ip '192.168.1.11' at port 8100, but when I am trying to visit it from a local machine '192.168.1.5', I encountered '502 Bad Gateway' error, and found such error message from nginx container:
2020/05/11 01:07:43 [error] 6#6: *1 app could not be resolved (3: Host not found), client: 192.168.1.5, server: _, request: "GET / HTTP/1.1", host: "192.168.1.11:8100"
― You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsysu-ipv6%2FUNIT3D-Deploy%2Fissues%2F2&data=02%7C01%7C%7Ce53594c90a16457183b908d7f5484a3d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637247563132935369&sdata=%2FBFsDYyCAmCkDhTc%2BQXj2WNKvOs6shahf%2FWvsXtoBjs%3D&reserved=0, or unsubscribehttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABIB3OSG6W4HVUSFYRK2HWDRQ5GFNANCNFSM4M5PU47Q&data=02%7C01%7C%7Ce53594c90a16457183b908d7f5484a3d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637247563132945364&sdata=350MZFBvnGJk2jiteYiz%2B01HHN7g%2Fa1rCIPxdI6NdmU%3D&reserved=0.
My docker and docker-compose is up to date. But I noticed that when running the 5th command docker-compose -f docker-compose.init.yml run init
, there were two erros:
✗ docker-compose -f docker-compose.init.yml run init
Starting unit3d-deploy_redis_1 ... done
Starting unit3d-deploy_laravel_echo_server_init_1 ... done
In EncryptionServiceProvider.php line 80:
No application encryption key has been specified.
In StreamHandler.php line 110:
The stream or file "/app/storage/logs/laravel-2020-05-21.log" could not be opened: failed to open stream: Permission denied
Could that be the reason? If so, how can I solve it?
My docker and docker-compose is up to date. But I noticed that when running the 5th command
docker-compose -f docker-compose.init.yml run init
, there were two erros:✗ docker-compose -f docker-compose.init.yml run init Starting unit3d-deploy_redis_1 ... done Starting unit3d-deploy_laravel_echo_server_init_1 ... done In EncryptionServiceProvider.php line 80: No application encryption key has been specified. In StreamHandler.php line 110: The stream or file "/app/storage/logs/laravel-2020-05-21.log" could not be opened: failed to open stream: Permission denied
Could that be the reason? If so, how can I solve it?
The first error means the application could not find an APP_KEY in .env file. This may be a bug because the init process is supposed to generate one instead of using one. The second error is related to Linux file permissions. The user running the app is unprivileged in the container (not root).
Your app didn't start normally so your nginx could not find it.
I installed it to a machine with ip '192.168.1.11' at port 8100, but when I am trying to visit it from a local machine '192.168.1.5', I encountered '502 Bad Gateway' error, and found such error message from nginx container: