Apache config's with piped CustomLog returns error

TomBG

Active Member
#1
I'm getting an error when using a CustomLog directive that pipes output to a CGI:

CustomLog "| /htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi" "%a|%u|%s"


Returns this error:

2009-02-22 22:43:10.938 [WARN] [/httpd/conf/httpd.conf//domain.com:443.conf:12] Failed to initialize pipe log file: /httpd/ /htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi!


Does anyone know how to fix this? Because we're not using the built-in configs (too much work when we have an existing template based system for creating Apache configs), there's not an option to turn ON piped logging.

Feedback appreciated.
 
Last edited:

mistwang

LiteSpeed Staff
#4
What's the error message, by removing the space, LSWS should use "/htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi" instead of adding "/httpd/".
Are you using enterprise edition?
 

TomBG

Active Member
#5
What's the error message, by removing the space, LSWS should use "/htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi" instead of adding "/httpd/".
Are you using enterprise edition?

This is the line in the conf:

CustomLog "|/htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi" "%a|%u|%s"

Here's the error:

2009-03-07 04:23:25.146 [WARN] [/httpd/conf/httpd.conf//domain.com:443.conf:12] Failed to initialize pipe log file: /htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi!
2009-03-07 04:23:25.151 [WARN] [/httpd/conf/httpd.conf//domain.com.conf:13] Failed to initialize pipe log file: /htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi!


Yes, we're using the enterprise edition. Please advise. I'm anxiously waiting for a resolution so we can begin migrating our servers to LS.
 

TomBG

Active Member
#7
OK, the fix is to add "Logger" external application with name
"/htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi"

Is there any way to eliminate this in a future release? We're doing quite a bit of piped output for these scripts and others like it, and having to add an external application for every instance would be tedious. Please let me know.
 

mistwang

LiteSpeed Staff
#8
Yes, a logger external app will be added automatically in 4.0 release. Please just test if the pipe logger works properly or not for now.
 

TomBG

Active Member
#9
Yes, a logger external app will be added automatically in 4.0 release. Please just test if the pipe logger works properly or not for now.

Still doesn't seem to be working:

2009-03-12 18:20:29.946 [ERROR] [config:server:epsr:Site Defender (domain.com)] missing <address> in <extProcessor>
2009-03-12 18:20:31.379 [WARN] [/httpd/conf/httpd.conf//domain.com:443.conf:12] Failed to initialize pipe log file: /htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi!
2009-03-12 18:20:31.385 [WARN] [/httpd/conf/httpd.conf//domain.com.conf:12] Failed to initialize pipe log file: /htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi!



These are the settings:

Name Site Defender (domain.com)

Address for remote logger (Optional) Not Set

Notes Not Set

Max Connections 1

Environment Not Set

Command /htdocs/user/domain.com/cgi-bin/sitedefender/sd.cgi

Instances 1

Priority Not Set
 

TomBG

Active Member
#12
Please download and try 4.0 release, the logger external app should be added automatically now.

I'm not sure if something happened during a recent update, but this isn't working any more. I don't have an external app defined, but I think you're saying I shouldn't have to. Correct?

I'm running 4.0.1 using the freebsd6 i386 release.
 

mistwang

LiteSpeed Staff
#13
please try 4.0.2, if it still does not work, switch back and forth between the version that works, see if it is consistent. I think it is something else.
I tested the piped logger yesterday in our lab, it works.
 
Top