WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  when i doing log rotation in IHS i am getting following error?

    Posted Fri April 26, 2013 08:02 AM
    i have opened the httpd.conf file under conf and i have commentd on

    #CustomLog logs/access.log common
    and added folloowing parameters to it,
    CustomLog "|C:\IBM HTTP Server\bin\rotatelogs.exe -l C:\IBM HTTP Server\logs\access%Y_%m_%d_%H_%M_%S.log 10" common

    and then i saved httpd.conf file and when restarting the IHS webserver i am getting the following error.


    C:\IBM HTTP Server\bin>Apache.exe -k start
    unable to start piped log program 'C:/IBM HTTP Server/bin/rotatelogs.exe -l C:/I
    BM HTTP Server/logs/access%Y_%m_%d_%H_%M_%S.log 10': The system cannot find the
    file specified.
    Unable to open logs could any one rectify this error.
     



     


     


  • 2.  when i doing log rotation in IHS i am getting following error?

    Posted Fri April 26, 2013 03:04 PM
    HI Saravana

    you forgot mention the size in the form of Bytes. it should be 5M not 5. Please check below log formates , please use which are suitable for ur environment


    CustomLog "|/path/to/IHS/bin/rotatelogs /var/logs/logfile 86400" common



    This creates the files /var/logs/logfile.nnnn where nnnn is the system time at which the log nominally starts (this time will always be a multiple of the rotation time, so you can synchronize cron scripts with it). At the end of each rotation time (here after 24 hours) a new log is started.



    CustomLog "|/path/to/IHS/bin/rotatelogs -l /var/logs/logfile.%Y.%m.%d 86400" common



    This creates the files /var/logs/logfile.yyyy.mm.dd where yyyy is the year, mm is the month, and dd is the day of the month. Logging will switch to a new file every day at midnight, local time.



    CustomLog "|/path/to/IHS/bin/rotatelogs /var/logs/logfile 5M" common



    This configuration will rotate the logfile whenever it reaches a size of 5 megabytes.



    ErrorLog "|/path/to/IHS/bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M"

    THanks




  • 3.  when i doing log rotation in IHS i am getting following error?

    Posted Sat April 27, 2013 01:13 AM
    thank you adminappula for giving reply,
    i have changed the value in httpd.conf file and i have tired in both ways
    CustomLog "|C:\IBM HTTP Server\bin\rotatelogs.exe -l C:\IBM HTTP Server\logs\access%Y_%m_%d_%H_%M_%S.log 3600" common 

    CustomLog "|C:\IBM HTTP Server\bin\rotatelogs.exe -l C:\IBM HTTP Server\logs\access.log %Y_%m_%d_%H_%M_%S 3600" common

    but when i restarting the webserver it showing following error:
    C:\IBM HTTP Server\bin>Apache.exe -k start

    unable to start piped log program 'C:\IBM HTTP Server\bin\rotatelogs.exe -l C:\I
    BM HTTP Server\logs\access%Y_%m_%d_%H_%M_%S.log 3600': The system cannot find th
    e file specified.
    Unable to open logs

    i am suggesting you to see what the error message it is pointing out.