-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"php_network_getaddresses: getaddrinfo failed: Name or service not known[xxxx] #2503
Comments
check container working first. Ref #2507 |
Probably typo:
|
@metalcamp Not the problem, the configuration is wrong |
@pizsd: Is your redis service (in docker-compose.yml) also named reids? |
edit .env file
|
I'm getting this error too.
when i run tests from phpstorm I'm getting this. But i didn't get this when i run from terminal like My project .env
laradock .env
docker-compose.yml
|
My Solution: PhpStorm->Preferences->Languages & Frameworks->PHP->Test Frameworks Add PHPUnit by Remote Interpreter Select Docker interpreter After created you should add link ( Links section ) which one do u want to use ( mysql, redis) to docker container (click Browse in docker container section) And if you know which network is using in docker container you should write name of network ( But if you don’t know which network is using . First you should remove all unused networks ( |
Hi 👋 this issue has been automatically marked as |
Hi again 👋 we would like to inform you that this issue has been automatically |
changing Network mode from bridge to docker internal network fixed my problem |
In my case error was misleading. You have to run commands from docker container eg docker-compose exec containerName (app) php (serviceName) bin/console doctrine:migrations:migrate (service command). |
hi @ugurdnlr, Thanks in advance |
thank you! Changed |
Description:
mysql, redis This problem occurs under the debug of phpstorm. This problem does not occur directly in the browser or postman. I want to know what causes it.
error
redis
php_network_getaddresses: getaddrinfo failed: Name or service not known [tcp://reids:6379]
mysql
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
Project configuration file .env
redis
mysql
docker fo mac
dcoker:19.03
docker-compsoe:1.25.2
The text was updated successfully, but these errors were encountered: