With the default httpd configuration, if using the daemon mode like
WSGIDaemonProcess koji lang=en_US.UTF-8 WSGIProcessGroup koji
the logging of koji (hub/web) doesn't work correctly
Metadata Update from @tkopecek: - Custom field Size adjusted to None - Issue set to the milestone: 1.24
@julian8628 Is there more info (or do you want to fix it by yourself?)
Metadata Update from @julian8628: - Issue assigned to julian8628
I'm going to fix this. you can find this problem on brew web or QE env's hub
Related: #2641
I don't think we've ever validated running kojihub or web this way. We do not specify WSGIDaemonProcess in our example httpd configs.
Our logging handler here is simply a logging.StreamHandler() instance, which logs to stderr. Perhaps in wsgi daemon mode this doesn't go to the httpd logs? That seems surprising too. I can't find anything about that in the mod_wsgi docs.
logging.StreamHandler()
In any case, we may want to just go ahead and make our log destination configurable. Admins have asked before if the koji logs could be separated from the httpd logs. We could still keep stderr as the default behavior.
I'm not sure how #2641 is related?
That's the reason why we hit #2641 - if we don't set UTF-8, ascii is expected in open calls.
open
Just found that: a default vhost entry in httpd conf leads to the loss of stderr, even it is empty
stderr
<VirtualHost _default_:80> </VirtualHost>
Simply moving WSGIDaemonProcess ... directive to system config(out of VirtualHost) fixes this problem. This seems to make the vhosts sharing the daemon process setting, then it could recognize the ErrorLog location correctly.
WSGIDaemonProcess ...
ErrorLog
Metadata Update from @julian8628: - Issue close_status updated to: Dropped - Issue status updated to: Closed (was: Open)
Metadata Update from @tkopecek: - Issue set to the milestone: None (was: 1.24)
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/2480
Please continue any further discussion there.