Something strange is happening with my Laravel installation. When I run
php artisan config:cache
I get the following error:
php_network_getaddresses: getaddrinfo failed: Name or service not known
Exception message:
Redis::connect(): php_network_getaddresses:
getaddrinfo failed: Name or service not known
When I clear the cache using php artisan config:clear
the exception disappears. Does someone know where this comes from?
EDIT:
- Redis-Host in
.env
is127.0.0.1
, so no address resolution is needed. - Also the error occures when calling
$redis = new \Redis(); $redis->connect(env('REDIS_HOST'));