You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Konstantin Kolinko <kn...@gmail.com> on 2009/10/04 20:38:50 UTC

Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

I have not dug through all the log output that you are citing, but at
least the following things are difference between your startup.sh and
jsvc command lines:

1) The value of -Djava.io.tmpdir
2) The value of -Djava.security.policy

The -Djava.security.policy value of jsvc is certainly wrong. There
must be a double equal sign there:

-Djava.security.policy==/srv/apache2/wsites/myportal/catalina/conf/catalina.policy

That is, the value starts with a '='.  See java security docs for the meaning.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

Posted by André Warnier <aw...@ice-sa.com>.
Peter Crowther wrote:
...

> and Tomcat in general.  Symlinks in webapps will not work by default -
> look up "allowLinking" to allow them, and be Very Careful if you do as
> I seem to recall that undeploying a webapp with a symlink in it can
> delete all the files in the area that you've linked to.
> 
As things happen, I just spent 2 hours this morning wondering why an old 
webapp that worked fine under Tomcat 4.1, didn't work anymore when moved 
to Tomcat 5.5.  Until I saw your message above, and added a context.xml 
in the webapp with allowLinking=true.
It seems that the old Tomcat 4.1 had such a <Context> element in 
server.xml, which disappeared in the move to 5.5.

(catalina_base)/webapps/myapp/META-INF/context.xml :
<Context allowLinking="true" />

did it.

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

Posted by Linux sysadmin <sy...@pattersunx.com>.
thanks Peter for this recommendation ...
have a nice day

Peter Crowther wrote:
> 2009/10/5 Linux sysadmin <sy...@pattersunx.com>:
>   
>>  The truth is that i make a link from the ${catalina.home}/conf in the
>> ${catalina.base}/conf regarding the web.conf, thus it's the default from
>> tomcat original distribution ...
>>     
>
> This should work for conf, but be very careful about symbolic links
> and Tomcat in general.  Symlinks in webapps will not work by default -
> look up "allowLinking" to allow them, and be Very Careful if you do as
> I seem to recall that undeploying a webapp with a symlink in it can
> delete all the files in the area that you've linked to.
>
> Many UNIX admins are used to being able to use symlinks and they Just
> Work.  This is not always true for Java in general, and Tomcat in
> particular.
>
> - Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

Posted by Peter Crowther <pe...@melandra.com>.
2009/10/5 Linux sysadmin <sy...@pattersunx.com>:
>  The truth is that i make a link from the ${catalina.home}/conf in the
> ${catalina.base}/conf regarding the web.conf, thus it's the default from
> tomcat original distribution ...

This should work for conf, but be very careful about symbolic links
and Tomcat in general.  Symlinks in webapps will not work by default -
look up "allowLinking" to allow them, and be Very Careful if you do as
I seem to recall that undeploying a webapp with a symlink in it can
delete all the files in the area that you've linked to.

Many UNIX admins are used to being able to use symlinks and they Just
Work.  This is not always true for Java in general, and Tomcat in
particular.

- Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

Posted by Linux sysadmin <sy...@pattersunx.com>.
Hi back konstantin,

   The truth is that i make a link from the ${catalina.home}/conf in the 
${catalina.base}/conf regarding the web.conf, thus it's the default from 
tomcat original distribution ...

  In my ${catalina.base} there is only those dirs : "conf" and 
"webapps". there is link for logs, work and temp pointed to other 
directories ...
  Thanks for the idea of using an dir "lib" for shared libraries as see 
in the catalina.properties using "shared.loader=".

  When running tomcat with "jsrvd" i am deleting of the files in the 
"logs" and "work" directories that being sure that i would not have 
rights access permission denied or something like this ...

  I am looking forward your next email ;-)

Gerald

Konstantin Kolinko wrote:
> 5 октября 2009 г. 1:41 пользователь Linux sysadmin
> <sy...@pattersunx.com> написал:
>   
>
> It should be not the web.xml of your application, but the default one.
>
> See conf/web.xml in the official distribution of Tomcat from tomcat.apache.org.
>
> The distinct feature is that it has a long list of mime-types. It is
> also the one that defines the JSP and default servlets. Of course, all
> of them can be in webapp's web.xml.
>   
> See RUNNING.txt in the official distribution.
>
> When using CATALINA_BASE, the following folders are moved there:
> /conf
> /logs
> /webapps
> /work
> /temp
>
> You can remove those folders from CATALINA_HOME.
>
>
> The following folder can be created for the sake of placing
> "setenv.sh" (setenv.bat) file there:
> /bin
>
> The rest of /bin files remain in CATALINA_HOME. That is, there are the
> following folders:
> /bin
> /lib
>
> Also I usually have some shared libraries in CATALINA_BASE. That is, I
> have a /lib folder there, but for that you need to edit your
> conf/catalina.properties file, or wait for Tomcat 6.0.21. Such feature
> is proposed to be included in that release.
>
>   
>
> Access rights? Or may be you did not shutdown your previous Tomcat instance?
>
> Also, if there were confusions with what user was used to start the
> Tomcat, please check what user is the owner of your log files (maybe:
> delete them all) and remove the files that are in the /work folder
> before starting Tomcat.
>
> Best regards,
> Konstantin Kolinko
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

Posted by Konstantin Kolinko <kn...@gmail.com>.
5 октября 2009 г. 1:41 пользователь Linux sysadmin
<sy...@pattersunx.com> написал:
> Hi back Konstantin,
>
>  When i put a web.xml in ${catalina.base}/conf  it's working, that's great,
> thanks Konstantin for this remarks ;-)
>

It should be not the web.xml of your application, but the default one.

See conf/web.xml in the official distribution of Tomcat from tomcat.apache.org.

The distinct feature is that it has a long list of mime-types. It is
also the one that defines the JSP and default servlets. Of course, all
of them can be in webapp's web.xml.



>  But what i really wanted, is not using an web.xml in ${catalina.base}/conf
>  but use the web.xml of each application, and use the master web.xml in
> ${catalina.home} in the case of a web.xml missing in an application ....
>
>  Perhaps i am misunderstanding the  concept of   CATALINA_HOME and
>  CATALINA_BASE  !!!
>

See RUNNING.txt in the official distribution.

When using CATALINA_BASE, the following folders are moved there:
/conf
/logs
/webapps
/work
/temp

You can remove those folders from CATALINA_HOME.


The following folder can be created for the sake of placing
"setenv.sh" (setenv.bat) file there:
/bin

The rest of /bin files remain in CATALINA_HOME. That is, there are the
following folders:
/bin
/lib

Also I usually have some shared libraries in CATALINA_BASE. That is, I
have a /lib folder there, but for that you need to edit your
conf/catalina.properties file, or wait for Tomcat 6.0.21. Such feature
is proposed to be included in that release.


> If it's working with the java command without the web.xml in
> ${catalina.base}/conf    why it's not working with  the  "jsvc" command,
> that's my bigger interrogation for now ...
>
> Nevertheless thanks you very much for giving me this light on this case ...
>

Access rights? Or may be you did not shutdown your previous Tomcat instance?

Also, if there were confusions with what user was used to start the
Tomcat, please check what user is the owner of your log files (maybe:
delete them all) and remove the files that are in the /work folder
before starting Tomcat.

Best regards,
Konstantin Kolinko

> I am analysing the strace logs for trying to have an answer ....
>
> Cheers
>
> Gerald
>
>
> Konstantin Kolinko wrote:
>>
>>  1316 INFO: No default web.xml
>>
>> That message is about ${catalina.base}/conf/web.xml
>>
>> You have -user jsrvd  on your jsvс command line. Are those files
>> readable by that user?
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> 2009/10/4 Linux sysadmin <sy...@pattersunx.com>:
>>
>>>
>>> Thank Konstantin and Peter for your fast reply,
>>>
>>>  Unfortunately  i put  2 "=" like in the java command but still the same
>>> error as tomcat not finding the web.xml of my webapp !!!
>>>
>>> Regarding the answer of  Peter i am doing an strace on it, answer is up
>>> to
>>> come ...
>>>
>>>
>>> Peter Crowther wrote:
>>>
>>>>
>>>> Try Konstantin's fix first, as the security policy could certainly
>>>> cause the problems you're seeing.  I suspect that's the issue (it came
>>>> in while I was writing this).
>>>>
>>>> If you can eliminate that and the problem's still there, time for a
>>>> little more debugging.  Depending on your flavour of UNIX, there will
>>>> almost certainly be something that you can use to monitor the system
>>>> calls that the Java process makes as it's failing to load web.xml.
>>>> It's strace(1) on most Linuxes, for example.  It would be very
>>>> interesting to see what the process is doing as it looks for that
>>>> web.xml.  In particular: does it look and find it?  Does it look and
>>>> get permission denied?  Or, the really interesting case, does it never
>>>> look - in which case there's probably a Java security policy setting
>>>> preventing access.
>>>>
>>>> - Peter
>>>>
>>>
>>> Konstantin Kolinko wrote:
>>> I have not dug through all the log output that you are citing, but at
>>> least the following things are difference between your startup.sh and
>>> jsvc command lines:
>>>
>>>>
>>>> 1) The value of -Djava.io.tmpdir
>>>> 2) The value of -Djava.security.policy
>>>>
>>>> The -Djava.security.policy value of jsvc is certainly wrong. There
>>>> must be a double equal sign there:
>>>>
>>>>
>>>>
>>>> -Djava.security.policy==/srv/apache2/wsites/myportal/catalina/conf/catalina.policy
>>>>
>>>> That is, the value starts with a '='.  See java security docs for the
>>>> meaning.
>>>>
>>>> Best regards,
>>>> Konstantin Kolinko
>>>>
>>>>
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

Posted by Linux sysadmin <sy...@pattersunx.com>.
Hi back Konstantin,

  When i put a web.xml in ${catalina.base}/conf  it's working, that's 
great, thanks Konstantin for this remarks ;-)

  But what i really wanted, is not using an web.xml in 
${catalina.base}/conf  but use the web.xml of each application, and use 
the master web.xml in ${catalina.home} in the case of a web.xml missing 
in an application ....

  Perhaps i am misunderstanding the  concept of   CATALINA_HOME and  
CATALINA_BASE  !!!

 If it's working with the java command without the web.xml in 
${catalina.base}/conf    why it's not working with  the  "jsvc" command, 
that's my bigger interrogation for now ...

Nevertheless thanks you very much for giving me this light on this case ...

I am analysing the strace logs for trying to have an answer ....

Cheers

Gerald


Konstantin Kolinko wrote:
>  1316 INFO: No default web.xml
>
> That message is about ${catalina.base}/conf/web.xml
>
> You have -user jsrvd  on your jsvс command line. Are those files
> readable by that user?
>
> Best regards,
> Konstantin Kolinko
>
> 2009/10/4 Linux sysadmin <sy...@pattersunx.com>:
>   
>> Thank Konstantin and Peter for your fast reply,
>>
>>  Unfortunately  i put  2 "=" like in the java command but still the same
>> error as tomcat not finding the web.xml of my webapp !!!
>>
>> Regarding the answer of  Peter i am doing an strace on it, answer is up to
>> come ...
>>
>>
>> Peter Crowther wrote:
>>     
>>> Try Konstantin's fix first, as the security policy could certainly
>>> cause the problems you're seeing.  I suspect that's the issue (it came
>>> in while I was writing this).
>>>
>>> If you can eliminate that and the problem's still there, time for a
>>> little more debugging.  Depending on your flavour of UNIX, there will
>>> almost certainly be something that you can use to monitor the system
>>> calls that the Java process makes as it's failing to load web.xml.
>>> It's strace(1) on most Linuxes, for example.  It would be very
>>> interesting to see what the process is doing as it looks for that
>>> web.xml.  In particular: does it look and find it?  Does it look and
>>> get permission denied?  Or, the really interesting case, does it never
>>> look - in which case there's probably a Java security policy setting
>>> preventing access.
>>>
>>> - Peter
>>>       
>> Konstantin Kolinko wrote:
>> I have not dug through all the log output that you are citing, but at
>> least the following things are difference between your startup.sh and
>> jsvc command lines:
>>     
>>> 1) The value of -Djava.io.tmpdir
>>> 2) The value of -Djava.security.policy
>>>
>>> The -Djava.security.policy value of jsvc is certainly wrong. There
>>> must be a double equal sign there:
>>>
>>>
>>> -Djava.security.policy==/srv/apache2/wsites/myportal/catalina/conf/catalina.policy
>>>
>>> That is, the value starts with a '='.  See java security docs for the
>>> meaning.
>>>
>>> Best regards,
>>> Konstantin Kolinko
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

Posted by Konstantin Kolinko <kn...@gmail.com>.
 1316 INFO: No default web.xml

That message is about ${catalina.base}/conf/web.xml

You have -user jsrvd  on your jsvс command line. Are those files
readable by that user?

Best regards,
Konstantin Kolinko

2009/10/4 Linux sysadmin <sy...@pattersunx.com>:
> Thank Konstantin and Peter for your fast reply,
>
>  Unfortunately  i put  2 "=" like in the java command but still the same
> error as tomcat not finding the web.xml of my webapp !!!
>
> Regarding the answer of  Peter i am doing an strace on it, answer is up to
> come ...
>
>
> Peter Crowther wrote:
>>
>> Try Konstantin's fix first, as the security policy could certainly
>> cause the problems you're seeing.  I suspect that's the issue (it came
>> in while I was writing this).
>>
>> If you can eliminate that and the problem's still there, time for a
>> little more debugging.  Depending on your flavour of UNIX, there will
>> almost certainly be something that you can use to monitor the system
>> calls that the Java process makes as it's failing to load web.xml.
>> It's strace(1) on most Linuxes, for example.  It would be very
>> interesting to see what the process is doing as it looks for that
>> web.xml.  In particular: does it look and find it?  Does it look and
>> get permission denied?  Or, the really interesting case, does it never
>> look - in which case there's probably a Java security policy setting
>> preventing access.
>>
>> - Peter
>
> Konstantin Kolinko wrote:
> I have not dug through all the log output that you are citing, but at
> least the following things are difference between your startup.sh and
> jsvc command lines:
>>
>> 1) The value of -Djava.io.tmpdir
>> 2) The value of -Djava.security.policy
>>
>> The -Djava.security.policy value of jsvc is certainly wrong. There
>> must be a double equal sign there:
>>
>>
>> -Djava.security.policy==/srv/apache2/wsites/myportal/catalina/conf/catalina.policy
>>
>> That is, the value starts with a '='.  See java security docs for the
>> meaning.
>>
>> Best regards,
>> Konstantin Kolinko
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: resource not available : Apache Tomcat/6.0.20 with java jdk1.6.0_16 on linux 2.6.30.1

Posted by Linux sysadmin <sy...@pattersunx.com>.
Thank Konstantin and Peter for your fast reply,

  Unfortunately  i put  2 "=" like in the java command but still the 
same error as tomcat not finding the web.xml of my webapp !!!

Regarding the answer of  Peter i am doing an strace on it, answer is up 
to come ...


Peter Crowther wrote:
> Try Konstantin's fix first, as the security policy could certainly
> cause the problems you're seeing.  I suspect that's the issue (it came
> in while I was writing this).
>
> If you can eliminate that and the problem's still there, time for a
> little more debugging.  Depending on your flavour of UNIX, there will
> almost certainly be something that you can use to monitor the system
> calls that the Java process makes as it's failing to load web.xml.
> It's strace(1) on most Linuxes, for example.  It would be very
> interesting to see what the process is doing as it looks for that
> web.xml.  In particular: does it look and find it?  Does it look and
> get permission denied?  Or, the really interesting case, does it never
> look - in which case there's probably a Java security policy setting
> preventing access.
>
> - Peter
Konstantin Kolinko wrote:
I have not dug through all the log output that you are citing, but at
least the following things are difference between your startup.sh and
jsvc command lines:
> 1) The value of -Djava.io.tmpdir
> 2) The value of -Djava.security.policy
>
> The -Djava.security.policy value of jsvc is certainly wrong. There
> must be a double equal sign there:
>
> -Djava.security.policy==/srv/apache2/wsites/myportal/catalina/conf/catalina.policy
>
> That is, the value starts with a '='.  See java security docs for the meaning.
>
> Best regards,
> Konstantin Kolinko
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org