Unable to connect to PHP on ECS AWS cluster


PHP Agent version: newrelic-php5-
PHP service image base: php:7.0-fpm-alpine

Hello guys from new relic, how are you doing?

I have problems using PHP Agent on my infrastructure. Problems started to appear after migrating EC2 instances to ECS AWS clusters. Now, there is a PHP service within a cluster that performs two tasks. The Docker image used to build the PHP service is based on Alpine Linux.

By increasing the log level to “verbosedug”, I realized that the connection with the daemon is not successful, I looked in the suport forum for cases similar to mine, but I couldn’t find in any of them a solution that could help me.

When trying to connect by default (newrelic.daemon.address = “/tmp/.newrelic.sock”), the log returns: errno=ENOENT. According to another post (Returned -1 errno=ENOENT. Failed to connect to the newrelic-daemon), I found that abstract sockets don’t work in Docker containers. My last attempt was to use a TCP port and the log returns: errno=ECONNREFUSED.

The installation binary used by the container is the newrelic-php5-, I realize that the binary I use is not compiled by musl and is not in its latest version.

I ask your help, I tried in several ways to make PHP Agent work again, but I was unsuccessful.


Hi @talyson.leocadio

I’m good, thanks for asking and how about you?

Just to confirm, have you tried to change the socket to an abstract one and it didn’t work?

Like said in that post, changing newrelic.daemon.port= "@newrelic-daemon"

If not could you please try again?

Also, I’m wondering which of the PHP Applications of your dashboard you are talking about?