Skip to content
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

New Relic php daemon installer does not work on 3.20 | /etc/init.d/ directory does not exist? #398

Open
sidneyprins opened this issue May 29, 2024 · 4 comments

Comments

@sidneyprins
Copy link

sidneyprins commented May 29, 2024

We use the New Relic PHP Daemon. We install this through the tar and execute the New Relic installer script

RUN curl -L https://download.newrelic.com/php_agent/archive/10.19.0.9/newrelic-php5-10.19.0.9-linux-musl.tar.gz | tar -C /tmp -zx \
    && /tmp/newrelic-php5-10.19.0.9-linux-musl/newrelic-install install \
    && rm -rf /tmp/newrelic-php5-* /tmp/nrinstall*

The above will result in the following error. I've also tried newer versions of the New Relic PHP Daemon, but that does not change anything.

1.892 FATAL: failed to copy daemon init script to /etc/init.d/newrelic-daemon
1.892 FATAL: New Relic agent installation failed.

When I do a ls -lha /etc/init.d/ I can see that this directory does not exist.

The newrelic installer executes this

    if logcmd cp -f "${ilibdir}/scripts/init.${ostype}" "${osdifile}"; then
      logcmd chmod 755 "${osdifile}" || {
        fatal "failed to set permissions on ${osdifile}"
      }
    else
      fatal "failed to copy daemon init script to ${osdifile}"
    fi

So it tries to copy a script to init.d and that's where it fails.

A workaround is pinning the version to 3.19, ex php:8.3-fpm-alpine3.19

I would like to use 3.20. How to resolve this? Do I need to do something to make this directory available? Is this something the Alpine Linux needs to fix, or New Relic in their installer?

@fvelcker
Copy link

@sidneyprins
Copy link
Author

Link to issue on the newrelic-php-agent repository

newrelic/newrelic-php-agent#905

@lavarou
Copy link

lavarou commented Jun 6, 2024

/etc/init.d (along with a few other dirs) has been removed from alpine-baselayout in https://git.alpinelinux.org/aports/commit/main/alpine-baselayout/APKBUILD?id=4c48c04055fe3d077edf9d23ddf5492901ac9259 commit. This has not been advertised in Alpine 3.20 Release Notes.

@fossdd
Copy link

fossdd commented Jun 7, 2024

Please open a issue on aports: https://gitlab.alpinelinux.org/alpine/aports/-/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants