Hi guys, I am having a problem with Tomcat on SuSE 10.0 namely it will not start: WARNING: Unexpected exception resolving reference java.io.FileNotFoundException: /usr/share/tomcat5/conf/tomcat-users.xml.new (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.java:462) at org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:98) at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:129) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301) at org.apache.naming.NamingContext.lookup(NamingContext.java:791) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125) at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2306) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) May 18, 2006 10:58:43 AM org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans I have not made any changes to that file and the permissions on the file which the error is complaining about are set to: ls -l /srv/www/tomcat5/base/conf/ total 96 drwxr-xr-x 3 root root 4096 2006-05-08 19:33 Catalina -rw-r--r-- 1 tomcat tomcat 6954 2005-09-12 22:20 catalina.policy -rw-r--r-- 1 tomcat tomcat 2754 2005-09-12 22:20 catalina.properties -rw-r--r-- 1 tomcat tomcat 778 2005-09-12 22:20 jk2.properties -rw-r--r-- 1 tomcat tomcat 1128 2005-09-12 22:20 server-minimal.xml -rw-r--r-- 1 tomcat tomcat 21367 2006-03-03 09:03 server.xml -rw-r--r-- 1 tomcat tomcat 2254 2006-02-13 15:20 server.xml.new -rw-r--r-- 1 tomcat tomcat 432 2006-05-10 08:48 tomcat-users.xml -rw-r--r-- 1 tomcat tomcat 38929 2005-09-12 22:20 web.xml the conf is a symlink with the following permissions: ls -l /srv/www/tomcat5/base/conf lrwxrwxrwx 1 root root 17 2005-11-08 10:12 /srv/www/tomcat5/base/conf -> /etc/tomcat5/base my base looks like this: ls -l /srv/www/tomcat5/base/ total 4 lrwxrwxrwx 1 root root 17 2005-11-08 10:12 conf -> /etc/tomcat5/base lrwxrwxrwx 1 root root 21 2005-11-08 10:12 logs -> /var/log/tomcat5/base lrwxrwxrwx 1 root root 28 2005-11-08 10:12 temp -> /var/cache/tomcat5/base/temp drwxr-xr-x 11 root root 4096 2006-05-18 10:58 webapps lrwxrwxrwx 1 root root 28 2005-11-08 10:12 work -> /var/cache/tomcat5/base/work I have 2 servers that have the same problem, is anyone else experiencing this??? It used to work maybe a few days ago and I have made some updates since then now it does not. Thanks. George
----- Original Message ---- From: George Stoianov Sent: Thursday, May 18, 2006 11:32:26 AM Subject: [SLE] Problem with Tomcat 5.0
Hi guys,
I am having a problem with Tomcat on SuSE 10.0 namely it will not start:
WARNING: Unexpected exception resolving reference java.io.FileNotFoundException: /usr/share/tomcat5/conf/tomcat-users.xml.new (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) [snip]
I have not made any changes to that file and the permissions on the file which the error is complaining about are set to:
ls -l /srv/www/tomcat5/base/conf/ total 96 drwxr-xr-x 3 root root 4096 2006-05-08 19:33 Catalina -rw-r--r-- 1 tomcat tomcat 6954 2005-09-12 22:20 catalina.policy -rw-r--r-- 1 tomcat tomcat 2754 2005-09-12 22:20 catalina.properties -rw-r--r-- 1 tomcat tomcat 778 2005-09-12 22:20 jk2.properties -rw-r--r-- 1 tomcat tomcat 1128 2005-09-12 22:20 server-minimal.xml -rw-r--r-- 1 tomcat tomcat 21367 2006-03-03 09:03 server.xml -rw-r--r-- 1 tomcat tomcat 2254 2006-02-13 15:20 server.xml.new -rw-r--r-- 1 tomcat tomcat 432 2006-05-10 08:48 tomcat-users.xml -rw-r--r-- 1 tomcat tomcat 38929 2005-09-12 22:20 web.xml
the conf is a symlink with the following permissions:
ls -l /srv/www/tomcat5/base/conf lrwxrwxrwx 1 root root 17 2005-11-08 10:12 /srv/www/tomcat5/base/conf -> /etc/tomcat5/base [snip] I have 2 servers that have the same problem, is anyone else experiencing this??? It used to work maybe a few days ago and I have made some updates since then now it does not.
It seems like tomcat tries to create a new or rename an existing file in your /usr/share/tomcat5/conf directory and according to your ls output only root has access to that folder. So, if you do not run tomcat as root, you user does not have a permission to write there. Hope it helps, Dmitry
Thanks. George
Hi,
I am having a problem with Tomcat on SuSE 10.0 namely it will not start:
WARNING: Unexpected exception resolving reference java.io.FileNotFoundException: /usr/share/tomcat5/conf/tomcat-users.xml.new (Permission denied) ... I have not made any changes to that file and the permissions on the file which the error is complaining about are set to: I have 2 servers that have the same problem, is anyone else experiencing this??? It used to work maybe a few days ago and I have made some updates since then now it does not.
I never used the tomcat rpm given by Suse so I may be wrong but when you performed a update, yast executed different scripts: probably one of these scripts modified your permissions/configuration (suse's documentation often remembers it). You have two possibilities - find that script and modifies it so that it does not happen again - if you decide to use Tomcat on a production server, my advice would be not to use the one provided by Suse but to download it from tomcat.apache.org and configure it the way you want. I've nothing against the tomcat's installationm made by Suse but this way you will 1) really understand how it's configured and 2) keep control of your installation. It's for instance the same reason why, for my zope instances, I don't use the python provided by the distribution. Obviously, it's just a personal preference. Should you decide to follow my second suggestion, I can send you a step-by-step how-to, it's not that difficult. Regards, Gaël
On 5/19/06, Gaël Lams <lamsgael@gmail.com> wrote:
Hi,
I am having a problem with Tomcat on SuSE 10.0 namely it will not start:
WARNING: Unexpected exception resolving reference java.io.FileNotFoundException: /usr/share/tomcat5/conf/tomcat-users.xml.new (Permission denied) ... I have not made any changes to that file and the permissions on the file which the error is complaining about are set to: I have 2 servers that have the same problem, is anyone else experiencing this??? It used to work maybe a few days ago and I have made some updates since then now it does not.
I never used the tomcat rpm given by Suse so I may be wrong but when you performed a update, yast executed different scripts: probably one of these scripts modified your permissions/configuration (suse's documentation often remembers it). You have two possibilities - find that script and modifies it so that it does not happen again - if you decide to use Tomcat on a production server, my advice would be not to use the one provided by Suse but to download it from tomcat.apache.org and configure it the way you want. I've nothing against the tomcat's installationm made by Suse but this way you will 1) really understand how it's configured and 2) keep control of your installation. It's for instance the same reason why, for my zope instances, I don't use the python provided by the distribution. Obviously, it's just a personal preference.
Should you decide to follow my second suggestion, I can send you a step-by-step how-to, it's not that difficult.
Yes, please send me the step by step instructions. I think what happened here is I installed the rpm from SuSE, which has always worked just fine (9.1, 9.2, 10.0) for me even though lagging behind in versions from the official stable on jakarta.apache.com. I am not sure but I think an update was available from suse for something security related and I applied it on both my machines and now I cannot start because the user database (which is a text file) cannot be loaded, stack trace is pasted above. What I do not understand is the file name it refers to as that is no where to be found by default unless it is a temp file created at start up and cached somehow it is a complete puzzle to me... I am (I think) pretty familiar with configuring Tomcat as I have used for a few years now, but I am not very familiar with editing the start up scripts in /etc/init.d/tomcat5, for example and how that relates to YaST and run levels so I am going to have a problem figuring that out. Do you have any hints on that??? I read the script tomcat5 which specifically sets the file permissions to tomcat:tomcat which I did but to no avail as I get the same error message. I am thinking of uninstalling the rpm and reinstalling from the DVD to see what happens, will post my findings. Please forward me your how to and if you have something similiar for Zope 3 I would greatly appreciated as SuSE 10.0 has only 2 I think and 3 seems to be a change in architecture which I want to have a look at. Thanks very much. Best regards George
Regards,
Gaël
I am thinking of uninstalling the rpm and reinstalling from the DVD to see what happens, will post my findings.
I reinstalled the rpm from the DVD 10.0 boxed version and started Tomcat through the run levels editor in YaST, now everything works fine here are my file permissions: ls -l tomcat5/base/ total 4 lrwxrwxrwx 1 root root 17 2006-05-19 08:46 conf -> /etc/tomcat5/base lrwxrwxrwx 1 root root 21 2006-05-19 08:46 logs -> /var/log/tomcat5/base lrwxrwxrwx 1 root root 28 2006-05-19 08:46 temp -> /var/cache/tomcat5/base/temp drwxr-xr-x 11 tomcat tomcat 4096 2006-05-19 12:41 webapps lrwxrwxrwx 1 root root 28 2006-05-19 08:46 work -> /var/cache/tomcat5/base/work ls -l tomcat5/base/conf/ total 92 drwxr-xr-x 3 tomcat tomcat 4096 2005-09-12 22:20 Catalina -rw-r--r-- 1 tomcat tomcat 6954 2005-09-12 22:20 catalina.policy -rw-r--r-- 1 tomcat tomcat 2754 2005-09-12 22:20 catalina.properties -rw-r--r-- 1 tomcat tomcat 778 2005-09-12 22:20 jk2.properties -rw-r--r-- 1 tomcat tomcat 1128 2005-09-12 22:20 server-minimal.xml -rw-r--r-- 1 tomcat tomcat 20244 2006-05-19 09:07 server.xml -rw-r--r-- 1 tomcat tomcat 2254 2006-02-13 15:20 server.xml.new -rw-r--r-- 1 tomcat tomcat 310 2006-05-19 12:42 tomcat-users.xml -rw-r--r-- 1 tomcat tomcat 38929 2005-09-12 22:20 web.xml I am checking for updates though YOU but nothing comes up ... there is a memory in my head about doing an update but it is not appearing so I am kind of confused as to what let me to this. Thanks for your help, George
Hi,
.... Yes, please send me the step by step instructions. I think what happened here is I installed the rpm from SuSE, which has always ..... Please forward me your how to and if you have something similiar for Zope 3 I would greatly appreciated as SuSE 10.0 has only 2 I think and 3 seems to be a change in architecture which I want to have a look at.
What I will be do, probably today, is registering to opensuse and add tow howto there, one for Tomcat and for one zope. I will send you the links as soon as it's done. Regards, Gaël
Here is Zope's how to http://en.opensuse.org/Zope_HOWTO It works with zope 2.9 but I'm pretty sure it will work with Zope 3.x. Let me know, should have any problem or comment. I will post tomorrow Tomcat's how to Regards, Gael
On 5/22/06, Gaël Lams <lamsgael@gmail.com> wrote:
Here is Zope's how to http://en.opensuse.org/Zope_HOWTO
It works with zope 2.9 but I'm pretty sure it will work with Zope 3.x. Let me know, should have any problem or comment.
I will post tomorrow Tomcat's how to
Thanks this is perfect :) George
Regards,
Gael
Hi, Here is Tomcat's how to http://en.opensuse.org/Tomcat_HOWTO Let me know, should have any problem or comment. Regards, Gaël
On Thursday 18 May 2006 08:32 am, George Stoianov wrote:
Hi guys,
I am having a problem with Tomcat on SuSE 10.0 namely it will not start:
WARNING: Unexpected exception resolving reference java.io.FileNotFoundException: /usr/share/tomcat5/conf/tomcat-users.xml.new (Permission denied) <snip>
I have not made any changes to that file and the permissions on the file which the error is complaining about are set to:
ls -l /srv/www/tomcat5/base/conf/ total 96 drwxr-xr-x 3 root root 4096 2006-05-08 19:33 Catalina -rw-r--r-- 1 tomcat tomcat 6954 2005-09-12 22:20 catalina.policy -rw-r--r-- 1 tomcat tomcat 2754 2005-09-12 22:20 catalina.properties -rw-r--r-- 1 tomcat tomcat 778 2005-09-12 22:20 jk2.properties -rw-r--r-- 1 tomcat tomcat 1128 2005-09-12 22:20 server-minimal.xml -rw-r--r-- 1 tomcat tomcat 21367 2006-03-03 09:03 server.xml -rw-r--r-- 1 tomcat tomcat 2254 2006-02-13 15:20 server.xml.new -rw-r--r-- 1 tomcat tomcat 432 2006-05-10 08:48 tomcat-users.xml -rw-r--r-- 1 tomcat tomcat 38929 2005-09-12 22:20 web.xml
the conf is a symlink with the following permissions:
ls -l /srv/www/tomcat5/base/conf lrwxrwxrwx 1 root root 17 2005-11-08 10:12 /srv/www/tomcat5/base/conf -> /etc/tomcat5/base
I had run across this on some of the SLES machines running at my old work. You needed to chown the files in question to make sure the symlink was pulling a file with the correct permissions. I don't remember exactly what we did, but it was along those lines. Once done, everything worked. Also, there was some issue with the conf file being executable - something about the symlink IIRC. -- kai - www.perfectreign.com www.livebeans.com - the new NetBeans community 43...for those who require slightly more than the answer to life, the universe and everything.
participants (4)
-
Dimych
-
Gaël Lams
-
George Stoianov
-
kai