Ticket #305 (closed defect: invalid)

Opened 6 years ago

Last modified 6 years ago

print module java error are outputed into /var/log/apache2/error.log

Reported by: ochriste Owned by: pvalsecc
Priority: critical Milestone:
Component: Print.server Version: SVN
Keywords: Cc:
State:

Description

in a common c2c infrastructure we do not have right access to the file /var/log/apache2/error.log where the java print module output its error.

the error should go to the vhost error log (/var/www/vhost/logs/error.log)

set as critical because if we dont have a sysadmin with root right under the hand we have a serious problem.

Change History

Changed 6 years ago by elemoine

i fail to see how this relates to the print module. I'll wait for Patrick's opinion closing that ticket.

Changed 6 years ago by pvalsecc

Is it while using the python controller for the print module?

That guy is using the standard pylons logging infrastructure. I'd look in that direction and see how it is configured... should be in the {myProject}.ini file.

Changed 6 years ago by pvalsecc

I'd add that if I remember well, by default, it outputs to stderr. That means your problem comes from your apache configuration.

Changed 6 years ago by pvalsecc

  • status changed from new to closed
  • resolution set to invalid

OK, it's a problem coming from mod_wsgi. Read the end of this chapter: http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess

Here is the interesting part:

When WSGIDaemonProcess is associated with a virtual host, the error log
associated with that virtual host will be used for all Apache error log
output from mod_wsgi rather than it appear in the main Apache error log.

To fix that, you have to use a different WSGI daemon for each virtual server. Add those two lines after your WSGIScripAlias directive in your apache configuration:

 WSGIDaemonProcess blah.toto.net
 WSGIProcessGroup blah.toto.net

With blah.toto.net being the name of your virtual server, for example.

Note: See TracTickets for help on using tickets.