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

False alarm about logfile access error on startup #1774

Closed
msva opened this issue Mar 13, 2016 · 3 comments
Closed

False alarm about logfile access error on startup #1774

msva opened this issue Mar 13, 2016 · 3 comments

Comments

@msva
Copy link

msva commented Mar 13, 2016

In latest (26) release (probably, after d67d532, but I didn't bisected) passenger now causing following warning at startup:

service nginx restart
SELinux: Authenticating mva.
 * Checking nginx' configuration...                                     [ ok ]
 * Stopping nginx...                                                    [ ok ]
 * Starting nginx...
nginx: [alert] could not open the passenger log file for writing, discarding log output (2: No such file or directory)

Although, NginX starting fine, and passenger do have access to it's logfile (specified in http{} block) and even creating it just fine if I drop it. And, yes, it do write logs there.

And, there was no that error in 25

@OnixGH
Copy link
Contributor

OnixGH commented Mar 16, 2016

It's not a false alarm in the sense that there is really a place (in the Nginx module) that cannot write to the logfile. It just happens to be that this particular code is a fallback for certain situations where stdout/stderr are not redirected during Nginx startup.

I would guess that it has something to do with the user your Nginx is running as, and its permissions on the passenger_log_file you specified. The Passenger Core also opens the logfile later on and that apparently does work so it looks to you as if everything is OK. We can make the message a bit milder.

In 5.0.25 there was probably no error because it was using a different (wrong) file.

@OnixGH OnixGH closed this as completed Mar 16, 2016
OnixGH pushed a commit that referenced this issue Mar 16, 2016
@msva
Copy link
Author

msva commented Mar 16, 2016

Actually, I see this error even if I chown file to the user, nginx running as...
// although, if I drop file — passenger recreate it as root, but it doesn't matter, since, as I said, even if I chown file to the NginX user or even do chmod 666, I still see the error on startup ☹

@OnixGH
Copy link
Contributor

OnixGH commented Jun 15, 2016

@msva maybe you can try version 5.0.29 when we release it (soon), we just fixed an issue in the code that could in some cases pass an invalid filename in the specific code responsible for this warning.

It may not be related at all (on our systems the invalid name doesn't matter) but in theory if it fails to open on your system then you'd see that warning.

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

3 participants