Martin,

Thank you for your response. However, the issue does not relate to certain
locations being denied access. The problem is that during Tomcat restart, it
processes all WEB-INF folders and comes back with output like:

----------
INFO: Create Host deployer for direct deployment ( non-jmx )
May 23 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 23 org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only
StandardEngine[hosting].StandardHost[domain24.com].StandardContext[]
May 23 org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
May 23 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 23 org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only
StandardEngine[hosting].StandardHost[domain368.com].StandardContext[]
May 23 org.apache.catalina.core.StandardHost getDeployer
java.lang.reflect.InvocationTargetException
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in
.class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(
WebappClassLoader.java:1634)
at org.apache.catalina.loader.WebappClassLoader.findClass(
WebappClassLoader.java:860)
at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1307)
at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1189)
at org.apache.catalina.core.StandardWrapper$1.run(StandardWrapper.java:947)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
:943)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(
StandardContext.java:4013)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
----------

In the server.xml file, the hosts are listed like:
<Host name='www.domain1.com'
....
/>
</Host>
<Host name='www.domain2.com'
....
/>
</Host>
etc...


But during startup, as you can see from the output, it jumps around from
domain24.com to domain368.com. It seems to pick the hosts at random during
Tomcat start. The issue that arises is that we can not determine the host
causing the error. You will get the success message for domain368.com, and
then it comes back with the class error and fails to start (because of the
next <Host> in line). The only way to get it to start is to disable the host
with that code that's causing issues. Right now we're disabling large chunks
of hosts in the server.xml file until we find the one responsible.

I'm trying to figure out how Tomcat sorts the server.xml file on start so
that I can just find the next host in line after domain368.com and save
myself 2 hours of disabling random accounts.

Regards,

-Kyle


On 5/23/07, Martin Gainty <[EMAIL PROTECTED]> wrote:

Kyle-
someone probably put in a deny in your engine config in server.xml e.g.
<Engine name="Catalina" defaultHost="localhost">
//if you see a Valve declaration such as
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
         deny="192.168.1.*"/>
and replace deny with allow
and you should be good for all the addresses which were previously denied
HTH/
Martin
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please
notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message -----
From: "Kyle B" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, May 23, 2007 9:10 PM
Subject: Server.xml Sort on Start


>I am inquiring about the algorithm Tomcat uses for processing the
> server.xmlfile on startup.
>
> When Tomcat is started, it processes all hosts listed in the server.xml
> file
> for catalina policy compliance. Issues arise when there is an account
that
> does not comply with our policy file and Tomcat refuses to start up. 90%
> of
> the time, it prints the host it is processing just prior to error. This
> obviously allows us to disable that host, and Tomcat will start.
>
> However, the other 10% of the time, it will print an error and not
specify
> the host it is processing that caused that error. Therefore, we are
unable
> to determine which host to disable.
>
> This results in having to do a binary search on the server.xml,
commenting
> out large chunks of hosts until a single culprit is left. On this latter
> 10%, it will print the last successful host processed prior to the
> error...
> but this does not help, as we can not determine the next host in
> succession.
>
> I would assume that Tomcat processes the hosts on startup in the order
> they
> lie in the server.xml file. However, that is not the case. They jump all
> over the place. An example would be:
>
> <Host name='domain.com'
> debug='0'
> appBase='/path/to/java/app'
> unpackWARs='true'
> autoDeploy='false'>
> <Alias>www.domain.com</Alias>
> <Context path='' docBase='' debug='0' reloadable='false'/>
> <Valve  className='org.apache.catalina.authenticator.SingleSignOn'
> debug='0'/>
> <Valve  className='org.apache.catalina.valves.AccessLogValve'
> directory=''
> prefix='tomcat_access.'
> suffix='.log'
> pattern='common'
> resolveHosts='false'/>
> </Host>
>
>
> We have a fair number of hosts on each java box. It neither sorts the
> server.xml by alphabetic order, or file succession as it will skip from
> host
> 32, to 864, to 1026, to 127, etc... (jumping all over the place).
>
> Can anyone explain the server.xml sorting algorithm Tomcat uses on
start?
>
> Regards,
>
> -Kyle
>


---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to