Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006337Openbravo ERPZ. Otherspublic2008-12-03 00:572008-12-13 11:45
Giuliano69 
jpabloae 
highmajoralways
closedno change required 
20Ubuntu 8.10
2.40 
 
Core
No
0006337: SEVERE: Error listenerStart
Bug similar to 5988, that was classified as closed.
Tomcat6 does not load war file. Tried to ant build and ant deploy, but each time I reboot it won't load. It doesn't seem and error conneted to ant deploy facility.
The SEVERE error reported is:

WARNING: User database is not persistable - no write permissions on directory
3-dic-2008 0.47.06 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
3-dic-2008 0.47.06 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
3-dic-2008 0.47.07 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive openbravo.war
3-dic-2008 0.47.10 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
3-dic-2008 0.47.10 org.apache.catalina.core.StandardContext start
SEVERE: Context [/openbravo] startup failed due to previous errors
3-dic-2008 0.47.17 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
1Aiuto 2NoACapo3Esci 4Esadec 5Riga
run /etc/init.d/tomcat6 start
open with firefox 3.0
http://localhost:8080/openbravo [^]

web-page won't load

It was reported to be fixed with ant buil and ant deploy, but afrer rebooted, it doesn't work.
No tags attached.
Issue History
2008-12-03 00:57Giuliano69New Issue
2008-12-03 00:57Giuliano69Assigned To => rafaroda
2008-12-03 00:57Giuliano69sf_bug_id0 => 2380269
2008-12-03 19:03pjuvaraPrioritynormal => high
2008-12-09 13:38pheenanAssigned Torafaroda => jpabloae
2008-12-09 14:03jpabloaeNote Added: 0011067
2008-12-09 14:03jpabloaeStatusnew => feedback
2008-12-09 22:39Giuliano69Note Added: 0011101
2008-12-10 08:18jpabloaeNote Added: 0011104
2008-12-10 08:20jpabloaeOS VersionrPath Linux => Ubuntu 8.10
2008-12-11 02:51Giuliano69Note Added: 0011165
2008-12-11 09:16jpabloaeNote Added: 0011169
2008-12-12 01:31Giuliano69Note Added: 0011214
2008-12-12 01:33Giuliano69Note Edited: 0011214
2008-12-12 22:16Giuliano69Note Added: 0011281
2008-12-12 22:34jpabloaeNote Added: 0011282
2008-12-12 22:34jpabloaeRegression testing => No
2008-12-12 22:34jpabloaeStatusfeedback => closed
2008-12-12 22:34jpabloaeResolutionopen => no change required
2008-12-12 23:53Giuliano69Note Added: 0011283
2008-12-13 11:45jpabloaeNote Added: 0011287

Notes
(0011067)
jpabloae   
2008-12-09 14:03   
1) You have specified that you're using rPath Linux. But then you named "/etc/init.d/tomcat6". In our community appliance it's tomcat, not tomcat6. What operating system are you using?
2) Is /var/lib/tomcat6/tmp writable by the tomcat user? Please post the results of "ls -la /var/lib/tomcat6", "ls -ld /var/tmp/tomcat6" and "ls -la /var/lib/tomcat6/webapps"
(0011101)
Giuliano69   
2008-12-09 22:39   
1)Thanks for your reply. I'm using **Ubuntu 8.10** Don't know how I misspelled it in the form as rPath (??). The default Tomcat server installed by Synaptic is tomcat6, as thought it is possible to install tomcat 5.5.
Are there any other user with the same linux system and tomcat server ?
 
2)I'm launching the tomcat server by upscaling to superuser (su command) and invoking the given script.

3) the owner of the /var/lib/tomcat6/temp directory is the tomcat6 user.

4)now the results:
giuliano@voyager1:~$ ls -la /var/lib/tomcat6
total 8
drwxr-xr-x 5 root root 74 2008-11-30 00:31 .
drwxr-xr-x 54 root root 4096 2008-11-30 20:30 ..
lrwxrwxrwx 1 root root 12 2008-11-30 00:31 conf -> /etc/tomcat6
drwxr-xr-x 2 root root 4096 2008-11-30 00:31 lib
lrwxrwxrwx 1 root root 17 2008-11-30 00:31 logs -> ../../log/tomcat6
drwxr-xr-x 2 tomcat6 root 6 2008-10-24 10:14 temp
drwxrwxr-x 4 root tomcat6 53 2008-12-03 00:35 webapps
lrwxrwxrwx 1 root root 19 2008-11-30 00:31 work -> ../../cache/tomcat6
giuliano@voyager1:~$ ls -ld /var/tmp/tomcat6
ls: cannot access /var/tmp/tomcat6: No such file or directory
giuliano@voyager1:~$ ls -la /var/lib/tomcat6/webapps
total 44268
drwxrwxr-x 4 root tomcat6 53 2008-12-03 00:35 .
drwxr-xr-x 5 root root 74 2008-11-30 00:31 ..
drwxr-xr-x 6 tomcat6 tomcat6 76 2008-12-03 00:35 openbravo
-rw-r--r-- 1 root root 45327937 2008-12-03 00:34 openbravo.war
drwxr-xr-x 3 root root 38 2008-11-30 00:31 ROOT
giuliano@voyager1:~$
---------------

hope this helps for finding the solution of the problem.
(0011104)
jpabloae   
2008-12-10 08:18   
OK. 2 things:

1) The "WARNING: User database is not persistable - no write permissions on directory" message looks like the "conf" directory is writable by the tomcat user. If you give write permissions for the tomcat6 user in /etc/tomcat6 , you should not get that message.

2) I suspect that he inability to start the listener is related to the TOMCAT6_SECURITY. Have you created a policy file, as described in the guide? [1]
Just to make sure if this is the issue, edit /etc/default/tomcat6, and set TOMCAT6_SECURITY=NO. Then restart tomcat6.

[1] http://wiki.openbravo.com/wiki/Openbravo_environment_installation#Debian_.28Ubuntu.2FKubuntu.2FLinux_Mint.29_4 [^]
(0011165)
Giuliano69   
2008-12-11 02:51   
1) the file /var/lib/tomcat6/conf is a symbolic link to /etc/tomcat6. The dir was ony owned by root.
Situation modified by
giuliano@voyager1:/etc$ su
Password:
root@voyager1:/etc# pwd
/etc
root@voyager1:/etc# chgrp tomcat6 /etc/tomcat6
root@voyager1:/etc# chmod g=rwx /etc/tomcat6
root@voyager1:/etc# ls -la
....
drwxrwxr-x 4 root tomcat6 4096 2008-12-03 00:04 tomcat6
the tomcat6 group has only giuliano as member.
I shoudl add tomcat6 member to tomcat6 grop. Shoud I ?

2) already inserted the policy in
/etc/tomcat6/policy.d/20openbravo-policy

tryied to start tomcat
root@voyager1:/etc# /etc/init.d/tomcat6 start
 * Starting Tomcat servlet engine tomcat6

But no hope

3) In which file do you want me to add
TOMCAT6_SECURITY=NO
(0011169)
jpabloae   
2008-12-11 09:16   
1) yes, tomcat6 should in the tomcat6 group.
2) ok.
3) /etc/default/tomcat6
(0011214)
Giuliano69   
2008-12-12 01:31   
(edited on: 2008-12-12 01:33)
1) tomcat6 user does not exit, It seems to be only a group. Even in the installation manual no reference to a user tomcat is present; the Openbravo installation manual only talk about the user who start the tomcat server. For clarity I added user root in the tomcat6 group

3)the file has all the option commented. Added TOMCAT6_SECURITY=NO. As the commented one states YES, I think perhaps it was already in the NO state. In the same file I found commented #TOMCAT6_USER=tomcat6, so it seems there is no tomcat6 user... am I right ?

4) NOW, it seems to work: look at the log at /var/lib/tomcat6/catalina2008xxxxxx

12-dic-2008 1.24.27 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments
 was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
12-dic-2008 1.24.27 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
12-dic-2008 1.24.27 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1017 ms
12-dic-2008 1.24.27 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
12-dic-2008 1.24.27 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
12-dic-2008 1.24.28 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive openbravo.war
12-dic-2008 1.24.52 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
12-dic-2008 1.24.53 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
12-dic-2008 1.24.53 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/127 config=null
12-dic-2008 1.24.53 org.apache.catalina.startup.Catalina start
INFO: Server startup in 26592 ms


5) More info: I Tried to remove the SECURITY=NO, stopped, restarted, and nothing works again :((( What should I fix ?
Should I leave the flag to YES, or is there a policy to be fixed ?

(0011281)
Giuliano69   
2008-12-12 22:16   
Just to be more clear :
now, if the line TOMCAT6_SECURITY=NO is added to the /etc/default/tomcat6, the problem is vanished.

BUT

if we want to keep a level of security, what else we could change to make it work, without shutting down the security ?
Do you have an idea of where else we could make it work.
Are there any other Ubuntu 8.10 user that had this problem ?
(0011282)
jpabloae   
2008-12-12 22:34   
Yes, you can create a tomcat policy file as described in the installation guide:
http://wiki.openbravo.com/wiki/Openbravo_environment_installation#Debian_.28Ubuntu.2FKubuntu.2FLinux_Mint.29_4 [^]

I'm closing the issue, because it's not a Openbravo ERP bug, but a configuration issue. If you continue having problems even with the policy file, open a post in the forums.

Thank you for taking the time to report it.
(0011283)
Giuliano69   
2008-12-12 23:53   
Thanks for your help.
In the meanwhile I found the root of the problem.
The document in the link you gave me, has an error. It ask you to install/configure the policy, using the catalina_home instead of the catalina_base variable.
The info must be changed because in tomcat6 it is erroneous.
Code follows showing the error.
Who can be forwarded the info to correct the web page ?

I show: the tomcat6 Ubuntu variable content, the policy content(as stated in your webpate), and the directory list of the directory in the policy pointed in the policy.
The error is clear (the right variable to use in the policy is catalina_base), and of course correcting it, fix the problem.
Thanks for you help. Can you forward the info to the one who is in charge of the webpage ?

--------------------

giuliano@voyager1:/$ echo $CATALINA_HOME
/usr/share/tomcat6
giuliano@voyager1:/$ echo $CATALINA_BASE
/var/lib/tomcat6

giuliano@voyager1:/$ cat /etc/tomcat6/policy.d/20openbravo.policy
// permissions for Openbravo ERP
     grant codeBase "file:${catalina.home}/webapps/openbravo/-" {
       permission java.security.AllPermission;
     };

giuliano@voyager1:/$ ls $CATALINA_HOME/webapps/openbravo/
ls: impossibile accedere a /usr/share/tomcat6/webapps/openbravo/: Nessun file o directory
giuliano@voyager1:/$ ls $CATALINA_BASE/webapps/openbravo/
index.html META-INF src-loc web WEB-INF
(0011287)
jpabloae   
2008-12-13 11:45   
You are right, that is wrong. Anyone can fix it, it's a wiki. You only need to create an account:
http://wiki.openbravo.com/wiki/Help#Editing_articles [^]

I have fixed it. Thank you.