Apache config's with piped CustomLog returns error

Discussion in 'Install/Configuration' started by TomBG, Feb 25, 2009.

  1. TomBG

    TomBG Active Member

    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: Mar 6, 2009
  2. mistwang

    mistwang LiteSpeed Staff

    try to remove the space between "|" and "/htdocs/....".
  3. TomBG

    TomBG Active Member

    That did not fix the problem. Any other ideas?
  4. mistwang

    mistwang LiteSpeed Staff

    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?
  5. TomBG

    TomBG Active Member

    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.
  6. mistwang

    mistwang LiteSpeed Staff

    OK, the fix is to add "Logger" external application with name
  7. TomBG

    TomBG Active Member

    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.
  8. mistwang

    mistwang LiteSpeed Staff

    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.
  9. TomBG

    TomBG Active Member

    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
  10. mistwang

    mistwang LiteSpeed Staff

    Please download and try 4.0 release, the logger external app should be added automatically now.
  11. TomBG

    TomBG Active Member

    This appears to have fixed the issue. Thanks!
  12. TomBG

    TomBG Active Member

    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.
  13. mistwang

    mistwang LiteSpeed Staff

    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.

Share This Page