1 Reply Latest reply on Feb 18, 2013 10:43 AM by 991071

    Unable to write/rotate 'WLLogFile' from Apache's Piped 'rotatelog' feature


      I have a Apache.2.2.22 in web-tier and WebLogic-10.3.5 in app-tier. I'm using Apache's piped logfile feature to rotate log files every night and is working fine as expected for "Access_Log", "Error_Log", "SSL_Request_Log" - but not for WebLogic-Proxy-Log (WLLogfile).

      I'm not sure whether WebLogic Module supports this feature or not.... please let me know if any way to rotate WL-Proxy logs every day by using Apache's 'rotatelog' feature.

      Below are my settings.
      LoadModule weblogic_module modules/mod_wl_22.so

      <IfModule mod_weblogic.c>
      KeepAliveEnabled ON
      KeepAliveSecs 120
      SecureProxy ON
      TrustedCAFile /cust/apache-2.2.22/ssl/certificate.crt
      Debug ALL
      WLLogFile "|/cust/apache-2.2.22/bin/rotatelogs /tmp/wl-proxy.log.%Y%m%d 86400 -480"
      RequireSSLHostMatch false
      WLIOTimeOutSecs 600
      Idempotent OFF

      Same 'rotatelogs' syntax (Below) are working fine for Access/Error/SSL Logs.
      ErrorLog "|/cust/apache-2.2.22/bin/rotatelogs /cust/apache-2.2.22/logs/error.log.%Y%m%d 86400 -480"
      CustomLog "|/cust/apache-2.2.22/bin/rotatelogs /cust/apache-2.2.22/logs/access.log.%Y%m%d 86400 -480" combined

      Any idea to rotate 'WLLogFile' logs would be highly appreciated.

      If you also observe the log location of 'WLLogFile' and 'Access.log'; WLLogFile is set to write in /tmp/ directory whereas other logs have been set to write under /cust/... directory.
      The reason is, when Apache starts up it tries to create/write WL-Proxy file with 'daemon' user group and other log files like "access.log", "error.log", "ssl_request.log" are being created with 'root' user group. If we manually create a file under /cust/... and give write permission to other group, then logs will be writing up here.

      Any idea why this file is being creating/writing as 'daemon' ?? Is there any way to come across this issue?
      I don't want to use /tmp directory to write logs, because it has very less space.
      I do understand its not best practice to manually create/rotate WL-proxy file and give permissions permissions every time under /cust/...

      Please suggest on above issues.....

      Raghavendra, Gs
        • 1. Re: Unable to write/rotate 'WLLogFile' from Apache's Piped 'rotatelog' feature
          Its not possible to rotate 'WLLogfile' using Apache's piped log rotation. I have raised an case with Oracle support team and they recommended to disable 'WLLogFile' in Prod.

          Below is an update from Oracle Support Team -

          To answer your query,
          - WLLogFile is part of the plugin and not WLS itself. Log rotation (WLProxyLog is not possible at the plugin level from WLS.

          This query was also raised with WLS engineering in the past and they have confirmed that log rotation is not possible at the plugin level, it is only possible at the WLS level(server level).

          Added Info:
          More importantly, In production, you should not have the WLProxyLog enabled.

          I donot think there is any way to rotate WLLogFile. However, will discuss it internally and update you once we have more findings.

          Its always recommended not to enable Debug or WLProxyLog in production unless and untill its highly required as to some issues encounters and you need to resolve or find root cause for the issue.
          Simple reason, Logging will very huge and unnecessary logging are captured which would occupy more physical space and might further lead to performance issues / OOM issue on the long run.

          Its Oracle's recommendation not to enable debug or WLProxyLog in production until its required as stated above.

          Hope this explains.

          Many Thanks,
          Oracle Support Team

          In this case, either we have to disable Weblogic Proxy logs or needs to use Linux log rotation feature where in requires restart of Apache at the time of log rotation.

          Raghavendra, Gs