Tomcat fails to write in exceptions.log even after using Pro

Posted by awadheshmca12 on 08-Jul-2014 02:55

Exceptions.log permission issue after each offline backup.This stops the tomcat. 
Please advice the current permission to the log is 644.
The Database I using is Progress.
We have set the Progress workdir in startup.sh
Exception log is inaccessible (CMNMsg031)
java.io.FileNotFoundException: exceptions.log (Permission denied)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
        at com.progress.common.log.Excp.print(Excp.java:69)
        at com.progress.chimera.common.Tools.px(Tools.java:113)
        at com.progress.common.log.LogSystem.<clinit>(LogSystem.java:20)
        at com.progress.common.property.PropertyManager.<init>(PropertyManager.java:2214)
        at com.progress.common.property.PropertyManager.<init>(PropertyManager.java:2191)
        at com.progress.common.property.PropertyManager.<init>(PropertyManager.java:2185)
        at com.progress.aia.AiaProperties.<init>(AiaProperties.java:177)
        at com.progress.aia.Aia.init(Aia.java:169)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:595)
DEBUG: Index [default]: Closing.  (FullTextIndex)
INFO : Monitor [/test/apps/tomcat/webapps/search/WEB-INF/indexes/default]: Stopped monitoring.  (AbstractResourceMonitor)
Jul 7, 2014 8:30:22 AM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8090
Jul 7, 2014 8:30:22 AM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8453
Jul 7, 2014 8:30:23 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
INFO : Monitor [/test/apps/tomcat/webapps/search/WEB-INF/indexes/terms]: Stopped monitoring.  (AbstractResourceMonitor)
INFO : Monitor [/test/apps/tomcat/webapps/search/WEB-INF/indexes]: Stopped monitoring.  (AbstractResourceMonitor)
KBase followed: http://knowledgebase.progress.com/articles/Article/P23209
Let us know if more info is required.

All Replies

Posted by Srinivas Munigala on 08-Jul-2014 05:12

Can you set 777 permissions to the log file and try.

If it still doesn’t solve the problem, provide read and execute access to the directory in which the file contain:

Example: chmod o+x /home/user

Posted by Libor Laubacher on 08-Jul-2014 08:25

> Please advice the current permission to the log is 644.

For whom? and who starts the tomcat. Unless it's the owner of the file, 644 is not enough, -rw- is needed.

if it's the owner of the file who starts the tomcat, then what java is running the tomcat? 32/64-bit ? and what is the version of Progress/OE + bitness.

Posted by awadheshmca12 on 08-Jul-2014 08:54

Hi Libor,

the current permission to the log is 644 but it failed to write to that log.
-rw-r--r-- 1 abc xyz 4840 Jun 30 11:24 /test/apps/tomcat/temp/exceptions.log

The startup.sh is run by abc only the owner.
The owner only starts it.

OS: OS Version: Red Hat Enterprise Linux Server release 5.10 (Tikanga)

Java: /usr/java/jdk1.5.0_21/bin/java

java version "1.5.0_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_21-b01)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_21-b01, mixed mode)

Progress:OpenEdge Release 10.2B04 

      DLC: /test/apps/dlc
   WRKDIR: /test/apps/dlcwrk
      OEM: /test/apps/oemgmt
OEMWRKDIR: /test/apps/wrk_oemgmt


Let us know if you need more info.




Regards,
Awadhesh

Posted by Libor Laubacher on 08-Jul-2014 09:05

> We have set the Progress workdir in startup.sh

-->  WRKDIR: /test/apps/dlcwrk

--> -rw-r--r-- 1 abc xyz 4840 Jun 30 11:24 /test/apps/tomcat/temp/exceptions.log

Are you sure you set the WRKDIR in the Tomcat startup? Those 2 folders are different.

> Progress:OpenEdge Release 10.2B04

32 or 64-bit ?

Guess/thing to try: put "-d64" into JAVA_OPTS into Tomcat's setenv.sh to see if it resolves the issue.

Posted by awadheshmca12 on 08-Jul-2014 23:14

Hi Libor,
We have set the Progress variable in startup.sh of the tomcat.
As per the Progress KBase.
$WRKDIR = /test/apps/dlcwrk/
The OS is 64 bit.
Also there is no such "-d64" into JAVA_OPTS in setenv.sh.
 
Do you want us to add it explicitly ?

Regards,
Awadhesh


[collapse]
On Tue, Jul 8, 2014 at 7:23 PM, Awadhesh Kumar <aeq@qad.com> wrote:
Hi Libor,
the current permission to the log is 644 but it failed to write to that log.
-rw-r--r-- 1 abc xyz 4840 Jun 30 11:24 /test/apps/tomcat/temp/exceptions.log
The startup.sh is run by abc only the owner.
The owner only starts it.
OS: OS Version: Red Hat Enterprise Linux Server release 5.10 (Tikanga)
Java: /usr/java/jdk1.5.0_21/bin/java
java version "1.5.0_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_21-b01)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_21-b01, mixed mode)
Progress:OpenEdge Release 10.2B04 
      DLC: /test/apps/dlc
   WRKDIR: /test/apps/dlcwrk
      OEM: /test/apps/oemgmt
OEMWRKDIR: /test/apps/wrk_oemgmt
Let us know if you need more info.

Regards,
Awadhesh
[/collapse]

Posted by Libor Laubacher on 09-Jul-2014 02:35

$WRKDIR = /test/apps/dlcwrk/ does not set the variable

WRKDIR = /test/apps/dlcwrk/ does

or rather

WRKDIR = /test/apps/dlcwrk ; export WRKDIR

just to be safe.

>>

Also there is no such "-d64" into JAVA_OPTS in setenv.sh.

Do you want us to add it explicitly ?

<<

First please fix setting the WRKDIR, and retest.

you can put echo $WRKDIR in the startup.sh to see if it's set properly

Once the variable is properly set and it still does not solve the problem, then please yes, add the "-d64" into JAVA_OPTS.

Posted by Libor Laubacher on 09-Jul-2014 03:11

WRKDIR=/test/apps/dlcwrk ; export WRKDIR

to be absolutely precise, without the spaces

Posted by awadheshmca12 on 09-Jul-2014 04:14

Hi Libor,

I put that by mistake,its already like you said so no issue there.

DLC=/${QADENV}/apps/dlc; export DLC

PATH=$DLC:$DLC/bin:$PATH; export PATH

WRKDIR=/${ENV}/apps/dlcwrk/; export WRKDIR

Regarding JAVA_OPTS

Currently I have:

JAVA_HOME=`ls -td /usr/java/jdk* 2>/dev/null | head -1`;export JAVA_HOME

CATALINA_PID=`dirname $0`/../temp/tomcat_pid;export CATALINA_PID

CATALINA_OPTS="-Djava.net.preferIPv4Stack=true -Xss128k -XX:MaxPermSize=256m -XX:+UseParallelGC -Djava.awt.headless=true -server -Xms1024m -Xmx1024m -Dfile.encoding=utf-8";export CATALINA_OPTS

Posted by Libor Laubacher on 09-Jul-2014 04:55

OK. You said you have this in test environment as well? Maybe I can connect there remotely to test and see, instead of playing "ping pong" with updates. That possible ?

Posted by Michael Jacobs on 09-Jul-2014 05:46


I would suggest that if you customize the process environment Tomcat runs in, you create a ‘setenv.sh’ (setenv.bat for Windows) in the Tomcat’s ‘bin’ directory.   The primary Tomcat script for executing commands is catalina.{sh|bat}, which looks for and executes the ’setenv.{sh|bat}’ script if it exists.   Using setenv is the built-in way to customize Tomcat’s process environment and have all of Tomcat’s utilities run with the same environment variable settings you define (DLC,WRKDIR,JAVA_HOME,JAVA_OPT,…). 

Mike J.

[collapse]
From: Libor Laubacher <bounce-llaubach@community.progress.com>
Reply-To: "TU.OE.Deployment@community.progress.com" <TU.OE.Deployment@community.progress.com>
Date: Wednesday, July 9, 2014 at 5:55 AM
To: "TU.OE.Deployment@community.progress.com" <TU.OE.Deployment@community.progress.com>
Subject: RE: [Technical Users - OE Deployment] Tomcat fails to write in exceptions.log even after using Progress KBase: P23209

Reply by Libor Laubacher

OK. You said you have this in test environment as well? Maybe I can connect there remotely to test and see, instead of playing "ping pong" with updates. That possible ?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Libor Laubacher on 09-Jul-2014 08:00

Well I can reproduce this now.

Posted by awadheshmca12 on 10-Jul-2014 13:08

Hi Libor,

Currently, After discussion with R&D,we are going to do some customisation as from Progress,after raising a case regarding this issue and failure of the Progress KBase AIA fails to start with Tomcat JSE, its confirmed from their is bug and has been reported by many users.

***********************

Only my question is why tomcat user is failing to write in the exceptions.log?

Also we have two instances of same Tomcat.

*********************

Posted by awadheshmca12 on 11-Jul-2014 19:47

Hi Libor,

I was just want to confirm that if a space before export will do any harm?

# Local procedures

env() {

       # Returns the test environment the script is ran in

       echo $(cd $(dirname ${0}) ; echo $(pwd) | awk -F "/" '{ print $2 }')

}

ENV=$(env);

# Then set and export your local variables:

DLC=/${ENV}/apps/dlc; export DLC

PATH=$DLC:$DLC/bin:$PATH; export PATH

WRKDIR=/${ENV}/apps/dlcwrk/; export WRKDIR

Posted by Libor Laubacher on 14-Jul-2014 05:55

> its confirmed from their is bug ...

I am aware. I logged it myself :)

>  was just want to confirm that if a space before export will do any harm?

No, it won't.

Posted by awadheshmca12 on 28-Jul-2014 18:28

Hi Libor,

The issue has been resolved for the time being.

This thread is closed