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

no Phusion Passenger(R) log file configured, discarding log output #2541

Open
hariapollo opened this issue May 9, 2024 · 5 comments
Open

Comments

@hariapollo
Copy link

hariapollo commented May 9, 2024

We are encountering the issue with log output to the container for passenger. This is the logs which shows when we do kubectl logs -f pod
[alert] 7#7: no Phusion Passenger(R) log file configured, discarding log output

Installed packages:
passenger verison: 6.0.20
nginx - 1.22.1
Os version - debian 12 (bookworm)
Installation details - https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/standalone/install/oss/bookworm.html

We've also tried to move nginx 1.22.1 from 1.24.0 as suggested by the passenger changelog though its giving trouble with package dependency.

We tried to install passenger and nginx using below.

apt-get update && apt-get install -y dirmngr gnupg apt-transport-https ca-certificates curl && \
curl https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt | gpg --dearmor | tee /etc/apt/trusted.gpg.d/phusion.gpg >/dev/null && \
sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger bookworm main > /etc/apt/sources.list.d/passenger.list' && \
apt-get update && \
apt-get install -y passenger libnginx-mod-http-passenger=1:6.0.20-1~bookworm1

apt-get update && \
apt-get -y install lsb-release ca-certificates curl && \
curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb && \
dpkg -i /tmp/debsuryorg-archive-keyring.deb && \
sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-nginx.gpg] https://packages.sury.org/nginx/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/nginx.list' && \
apt-get update && apt install nginx -y && apt install nginx-extras -y 

Installation error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libnginx-mod-http-passenger : Depends: nginx-common (< 1.22.2) but 1.24.0-4+0~20240320.34+debian12~1.gbp7180f0 is to be installed
E: Unable to correct problems, you have held broken packages.
@hariapollo hariapollo changed the title [alert] 7#7: no Phusion Passenger(R) log file configured, discarding log output no Phusion Passenger(R) log file configured, discarding log output May 9, 2024
@CamJN
Copy link
Contributor

CamJN commented May 9, 2024

You cannot use modules compiled for one nginx version with another nginx version. Our nginx module package is compiled for the distro nginx not the one provided by f5. If you want to use an nginx other than the distro provided package, you need to compile the passenger module yourself. there are instructions here: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install_as_nginx_module.html

As for the log output, by default logs are added to the nginx error log, which you can tail to stdout with a simple script like our docker images do. I'm not actually sure where the error you see is coming from.

@hariapollo
Copy link
Author

hariapollo commented May 10, 2024

Okay, the error is written over here

"no " PROGRAM_NAME " log file configured, discarding log output");

As for the log output, by default logs are added to the nginx error log, which you can tail to stdout with a simple script like our docker images do

Yes i do the same from the dockerfile though its not sending any logs here and the /dev/stdout and /dev/stderr are empty when i do tail of them

RUN ln -sf /dev/stdout /var/log/nginx/access.log \
  && ln -sf /dev/stderr /var/log/nginx/error.log
root@rails-api-6dd74cccd8-858k9:/home/app/webapp# tail -f /dev/stderr
^C
root@rails-api-6dd74cccd8-858k9:/home/app/webapp# tail -f /dev/stdout
^C
root@rails-api-6dd74cccd8-858k9:/home/app/webapp# nginx -v
nginx version: nginx/1.22.1

Is passenger version >= 6.0.18 is not compiled with nginx 1.24.0 version? as i can see in changelog it is suggested that we need to upgrade to 1.24.0 from 1.22.1 version.

and is there anything changed for the latest version of passenger for the logs config?. Per doc the log would written to /var/log/nginx/access.log and /var/log/nginx/error.log.

@CamJN
Copy link
Contributor

CamJN commented May 10, 2024

Passenger standalone (ie running passenger start) uses its own internal nginx 1.24.0 as per the change log. But you seem to want to use the nginx integration, which has nginx start passenger. That integration uses the nginx version available from the distro's repo.

That no logs are currently being forwarded makes no sense because nginx itself should be producing some logs at least. I'd recommend getting nginx configured to log how you like first, then try turning passenger back on.

@hariapollo
Copy link
Author

hariapollo commented May 10, 2024

Hi @CamJN,

I've tried with debian 11 (bullseye) docker image and latest passenger version 6.0.20 and by default nginx version installed in here is 1.18.0 and its showing logs when i do kubectl logs -f pod.

It is only giving issue with debian 12(bookworm) with passenger version 6.0.20 and nginx version 1.22.1 is not working. Is there any idea why it is failing?. seems it might be due to nginx but i am following the passenger doc to install same on ruby image 3.3.1-slim.

Would you please suggest here?

@CamJN
Copy link
Contributor

CamJN commented May 13, 2024

I would recommend getting it working without passenger, then turn passenger on.

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

2 participants