logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: rotatelogs.exe crashes when used as piped logging with httpd
Author
Jens_S



Joined: 16 Apr 2015
Posts: 3
Location: Germany, Bonn

PostPosted: Thu 16 Apr '15 13:13    Post subject: rotatelogs.exe crashes when used as piped logging with httpd Reply with quote

Hi ApacheLounge,

first of all: I don't know if this is the correct subforum, I can't find a more matching one.

I've got a problem at a local customer with rotatelogs.exe and the current release of Apache HTTPD 2.4.12.

I've downloaded the 64-bit zip-file (VC11) and installed the VC11 vcredist in both 32- and 64-bit version.

The project is to upgrade apache 2.2 to apache 2.4. I've adjusted the configuration and added rotatelogs for log rotation for error_log and access_log.

The configuration is 100% correct, I can copy the line to cmd.exe and it runs correctly.

Variables are set in global environment, APACHE_HOME is set with "/" instead of "\" to get sure rotatelogs.exe is found.

Code:
ErrorLog "|%APACHE_HOME%/bin/rotatelogs.exe %APACHE_BASE%/logs/error.log_%Y%m%d 86400"


(this is out of memory but should be correct, I don't have access to the configuration right now). I tried this simple config after it didn't work with "-l -L <file> -f -c" flags.

If I start httpd with the installed service, it starts up correctly, but no error_log is created. Also, there is no rotatelogs.exe process in the taskmanager.

I tried arround a bit and the only information I can give is if I start the apache httpd via commandline as Administrator:cmd.exe, there is a windows popup which says "rotatelogs.exe command line pipe seems to have stopped working" (I don't know if this is the exact phrase in english, Screenshot attached is german sadly).

I suggest it has something to do with the environment in which apache httpd forks the rotatelogs.exe process, but I don't know where to look at and fix this issue. Currently the "workaround" is to not use rotatelogs.exe, which is acceptable in the current test environment, but not in production.

Hopefully someone can help me solving this.

Screenshot:


Regards
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 16 Apr '15 17:03    Post subject: Reply with quote

What is in your windows event log -> Application (Ereignisanzeige -> Anwendung) about that?
The screenshot doesn't show all the details.

BEX issue can be that your are not using the correct run time. (Microsoft Visual C++ Redistributable)

As far as I know apache can't use the Windows %ENV% variables in the config. Did you try to use the full path?
Back to top
Jens_S



Joined: 16 Apr 2015
Posts: 3
Location: Germany, Bonn

PostPosted: Fri 17 Apr '15 8:42    Post subject: Reply with quote

Yeah well, that is a strange thing too as there is nothing in the windows event log.

As I said, I installed the given vcredist files. Is there a way to prove the usage of the correct file?

Can you explain what you mean by saying "%ENV%"?

/Edit: ah, I got it. Apache can in fact here. It's the only situation where this works as apache forks a piped process and then it can use windows envs. But to answer your question, yes I have tryed with (win-)%ENV%, (apache-)${ENV} and full path.
Back to top


Reply to topic   Topic: rotatelogs.exe crashes when used as piped logging with httpd View previous topic :: View next topic
Post new topic   Forum Index -> Apache