Malicious host is crashing my server

2010-11-07 Thread Assaf
Hello,

I have a recurring visitor (from a fixed IP 
address: bzq-79-177-23-102.red.bezeqint.net) who is constantly visiting my site 
and EACH time causes the server to crash. My server actually gets a JDBC begin 
failed error for the next http calls.

Analyzing the logs, I cannot find out what is wrong. I can see it is a script 
as 
he is visiting the same pages in the same order (never downloading 
images/css/js). The only thing that I have noticed that is different with this 
user are the http headers he uses:

"Expand HTTP read ahead 1.0"

I could not google anything about those. I am running tomcat 6.0.20 on linux 
with mysql.

Anyone has an idea what this can be? How to find out? Also, what can I do to 
better protect?

Thanks,

Assaf


  

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



Re: Malicious host is crashing my server

2010-11-07 Thread Assaf
Hi,

It might be. But I am not sure how to find out more. Any suggestions?

Assaf


- Original Message 
From: Marc Boorshtein 
To: Tomcat Users List 
Sent: Sun, November 7, 2010 6:29:09 PM
Subject: Re: Malicious host is crashing my server

JDBC?  Are you sure its not an attempted SQL Injection attack?

On Sun, Nov 7, 2010 at 12:23 PM, Assaf  wrote:
> Hello,
>
> I have a recurring visitor (from a fixed IP
> address: bzq-79-177-23-102.red.bezeqint.net) who is constantly visiting my 
site
> and EACH time causes the server to crash. My server actually gets a JDBC begin
> failed error for the next http calls.
>
> Analyzing the logs, I cannot find out what is wrong. I can see it is a script 
>as
> he is visiting the same pages in the same order (never downloading
> images/css/js). The only thing that I have noticed that is different with this
> user are the http headers he uses:
>
> "Expand HTTP read ahead 1.0"
>
> I could not google anything about those. I am running tomcat 6.0.20 on linux
> with mysql.
>
> Anyone has an idea what this can be? How to find out? Also, what can I do to
> better protect?
>
> Thanks,
>
> Assaf
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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


  

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



Re: Malicious host is crashing my server

2010-11-07 Thread Assaf
I know what sql injection is. But I cannot find any clues to it. None of the 
requests have any paramers or posting. Anyone has an idea how to find if this 
is 
the case?


- Original Message 
From: Marc Boorshtein 
To: Tomcat Users List 
Sent: Sun, November 7, 2010 7:08:01 PM
Subject: Re: Malicious host is crashing my server

Do a search on SQL injection and you will get plenty of results

Sent from my iPad

On Nov 7, 2010, at 1:03 PM, "Caldarale, Charles R"  
wrote:

>> From: Martin Gainty [mailto:mgai...@hotmail.com] 
>> Subject: RE: Malicious host is crashing my server
> 
>> the culprit will change IPs
> 
> That's why I said it was a temporary workaround.  However, given the DNS name 
>in use, it is likely assigned via DHCP by the perp's ISP, so an IP mask could 
>be 
>used to take out a range of IP addresses - at the risk of annoying any 
>legitimate clients using the same ISP.
> 
> - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
>MATERIAL and is thus for use only by the intended recipient. If you received 
>this in error, please contact the sender and delete the e-mail and its 
>attachments from all computers.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

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


  

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



Re: Malicious host is crashing my server

2010-11-07 Thread Assaf
A filter to block is good. But then I would not be able to see him doing it 
again and then find out the issue.

Assaf


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Sun, November 7, 2010 6:48:20 PM
Subject: RE: Malicious host is crashing my server

> From: Assaf [mailto:ass...@yahoo.com] 
> Subject: Malicious host is crashing my server

> what can I do to better protect?

As a temporary preventive measure, you can disable access from this particular 
IP address by configuring the RemoteAddrValve in server.xml:



That should give you some time to work out the real fix.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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


  

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



Re: Malicious host is crashing my server

2010-11-08 Thread Assaf
DumpFilter is a good idea. For the time being we have decided to just block the 
ip address. If it comes again from a different IP, I guess we will need to 
further examine!

Thanks for all the good ideas

Assaf


- Original Message 
From: David Fisher 
To: Tomcat Users List 
Cc: Tomcat Users List 
Sent: Mon, November 8, 2010 12:00:49 AM
Subject: Re: Malicious host is crashing my server

You could modify the RequestDumpFilter to only dump the request for that ip 
address.

Regards,
Dave

Sent from my iPhone

On Nov 7, 2010, at 12:28 PM, Assaf  wrote:

> A filter to block is good. But then I would not be able to see him doing it 
> again and then find out the issue.
> 
> Assaf
> 
> 
> - Original Message 
> From: "Caldarale, Charles R" 
> To: Tomcat Users List 
> Sent: Sun, November 7, 2010 6:48:20 PM
> Subject: RE: Malicious host is crashing my server
> 
>> From: Assaf [mailto:ass...@yahoo.com] 
>> Subject: Malicious host is crashing my server
> 
>> what can I do to better protect?
> 
> As a temporary preventive measure, you can disable access from this 
> particular 

> IP address by configuring the RemoteAddrValve in server.xml:
> 
>  deny="79\.177\.23\.102"/>
> 
> That should give you some time to work out the real fix.
> 
> - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

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


  

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



cluste failure to initiate

2006-10-11 Thread Assaf Flatto

Hello List

i just upgraded my tomcat to 5.5.17 mdk , since we wanted to test the
replication mechanism of the tomcat 5.5 .

after i added the  definitions in the server.xml i get the
following error :

3543 [main] ERROR org.apache.catalina.mbeans.ServerLifecycleListener  -
Exception handling NamingResources property change
javax.management.MBeanException: Cannot load ModelMBean class
org.apache.catalina.mbeans.ContextResourceMBean nested exception
is java.lang.ClassNotFoundException:
org.apache.catalina.mbeans.ContextResourceMBean
java.lang.ClassNotFoundException:
org.apache.catalina.mbeans.ContextResourceMBean
   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
   at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
   at
org.apache.commons.modeler.ManagedBean.createMBean(ManagedBean.java:409)
   at
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:248)
   at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:403)
   at
org.apache.catalina.mbeans.ServerLifecycleListener.processNamingResourcesPropertyChange(ServerLifecycleListener.jav
a:1315)


i looked and found that the class reported as missing in available and
readable:

unzip -l /var/lib/tomcat5/server/lib/catalina.jar | grep
ContextEnvironmentMBean
1698  07-19-06 10:42
org/apache/catalina/mbeans/ContextEnvironmentMBean.class


what appears to be the problem is that the

is calling WebappClassLoader which fails to load and work .

google and archives didn't help me on this so ..

any ideas on how i can make this work ?

Thanks

Assaf



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



new tomcat installation failes to start

2006-10-16 Thread Assaf Flatto

hello


i've just installed a tomcat on a clean OS ( MDK 2007) .

When i try and start the tomcat service i get the following error

Created MBeanServer with ID: 1d05c81:10e51d8bab4:-8000:www01.pjoker.com:1
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:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Caused by: java.lang.NoClassDefFoundError: org/xml/sax/ext/Attributes2
at org.apache.xerces.parsers.AbstractSAXParser.(Unknown 
Source)

at org.apache.xerces.parsers.SAXParser.(Unknown Source)
at org.apache.xerces.parsers.SAXParser.(Unknown Source)
at 
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl.(Unknown Source)
at 
org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
at 
org.apache.tomcat.util.digester.Digester.getParser(Digester.java:691)
at 
org.apache.tomcat.util.digester.Digester.getXMLReader(Digester.java:899)
at 
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)

at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
... 6 more


i googled and looked in archives but couldn't find the source of this 
problem .

packages installed are :
tomcat5-jasper-5.5.17-3.1.2mdv2007.0
tomcat5-5.5.17-3.1.2mdv2007.0
tomcat5-webapps-5.5.17-3.1.2mdv2007.0
tomcat5-servlet-2.4-api-5.5.17-3.1.2mdv2007.0
tomcat5-jsp-2.0-api-5.5.17-3.1.2mdv2007.0
tomcat5-server-lib-5.5.17-3.1.2mdv2007.0
tomcat5-common-lib-5.5.17-3.1.2mdv2007.0
jakarta-commons-fileupload-1.0-5.1mdv2007.0
jakarta-commons-daemon-1.0.1-4.1mdv2007.0
jakarta-oro-2.0.8-2.3mdv2007.0
jakarta-commons-logging-1.1-3.2mdv2007.0
jakarta-commons-beanutils-1.7.0-4.2mdv2007.0
jakarta-commons-httpclient-3.0.1-1mdv2007.0
jakarta-commons-digester-1.7-4.1mdv2007.0
jakarta-commons-pool-1.3-2.1mdv2007.0
jakarta-commons-modeler-1.1-7.1mdv2007.0
jakarta-commons-launcher-1.1-1.1mdv2007.0
jakarta-taglibs-standard-1.1.2-2mdv2007.0
jakarta-commons-collections-3.2-1.1mdv2007.0
jakarta-commons-discovery-0.3-2.1mdv2007.0
jakarta-commons-el-1.0-6.2mdv2007.0
jakarta-commons-dbcp-1.2.1-5.1mdv2007.0
jakarta-commons-validator-1.3.0-1.1mdv2007.0


the java is pointing to :

update-alternatives --display java
java - status is auto.
 link currently points to /usr/lib/jvm/jre-1.4.2-sun/bin/java
/usr/lib/jvm/java-1.4.2-jamvm-1.4.2.0/jre/bin/java - priority 1420
 slave rmiregistry: 
/usr/lib/jvm/java-1.4.2-jamvm-1.4.2.0/jre/bin/rmiregistry

 slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-jamvm
 slave jre: /usr/lib/jvm/jre-1.4.2-jamvm
/usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1420
 slave rmiregistry: /usr/lib/jvm/jre-1.4.2-gcj/bin/rmiregistry
 slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-gcj
 slave jre: /usr/lib/jvm/jre-1.4.2-gcj
 slave keytool: /usr/lib/jvm/jre-1.4.2-gcj/bin/keytool
/usr/lib/jvm/jre-1.4.2-sun/bin/java - priority 1423
 slave rmiregistry: /usr/lib/jvm/jre-1.4.2-sun/bin/rmiregistry
 slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-sun
 slave jre: /usr/lib/jvm/jre-1.4.2-sun
 slave keytool: /usr/lib/jvm/jre-1.4.2-sun/bin/keytool
 slave klist.1: /usr/share/man/man1/klist-java-1.4.2-sun-compat.1
 slave policytool.1: /usr/share/man/man1/policytool-java-1.4.2-sun-compat.1
 slave rmid: /usr/lib/jvm/jre-1.4.2-sun/bin/rmid
 slave java.1: /usr/share/man/man1/java-java-1.4.2-sun-compat.1
 slave tnameserv.1: /usr/share/man/man1/tnameserv-java-1.4.2-sun-compat.1
 slave orbd.1: /usr/share/man/man1/orbd-java-1.4.2-sun-compat.1
 slave ktab.1: /usr/share/man/man1/ktab-java-1.4.2-sun-compat.1
 slave javaws: /usr/lib/jvm/jre-1.4.2-sun/javaws
 slave policytool: /usr/lib/jvm/jre-1.4.2-sun/bin/policytool
 slave orbd: /usr/lib/jvm/jre-1.4.2-sun/bin/orbd
 slave keytool.1: /usr/share/man/man1/keytool-java-1.4.2-sun-compat.1
 slave rmid.1: /usr/share/man/man1/rmid-java-1.4.2-sun-compat.1
 slave tnameserv: /usr/lib/jvm/jre-1.4.2-sun/bin/tnameserv
 slave servertool.1: /usr/share/man/man1/servertool-java-1.4.2-sun-compat.1
 slave kinit.1: /usr/share/man/man1/kinit-java-1.4.2-sun-compat.1
 slave javaws.1: /usr/share/man/man1/javaws-java-1.4.2-sun-compat.1
 slave servertool: /usr/lib/jvm/jre-1.4.2-sun/bin/servertool
 slave rmiregistry.1: 
/usr/share/man/man1/rmiregistry-java-1.4.2-sun-compat.1

Current `best' version is /usr/lib/jvm/jre-1.4.2-sun/bin/java.



anyone got an idea ?

thanks

Assaf


-
To start a new topic, e-mail: users@tomca

RE: new tomcat installation failes to start

2006-10-16 Thread Assaf Flatto
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at 
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at 
org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:351)
at 
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1034)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:260)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4119)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)

at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Oct 16, 2006 6:20:40 PM 
org.apache.catalina.mbeans.ServerLifecycleListener propertyChange


Any thoughts anyone ?


Assaf



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: new tomcat installation failes to start

2006-10-18 Thread Assaf Flatto

Martin


locate jmx
/usr/share/java/mx4j/boa/mx4j-rjmx-boa-3.0.1.jar
/usr/share/java/mx4j/mx4j-jmx-3.0.1.jar
/usr/share/java/mx4j/mx4j-jmx.jar
/usr/share/java/mx4j/mx4j-rjmx-3.0.1.jar
/usr/share/java/mx4j/mx4j-rjmx.jar
/usr/share/java/tomcat5/catalina-ant-jmx-5.5.17.jar
/usr/share/java/tomcat5/catalina-ant-jmx.jar
/usr/share/java/jmxri.jar
/usr/share/tomcat5/bin/jmxaccessor-tasks.xml
/usr/lib/gcj/tomcat5/catalina-ant-jmx-5.5.17.jar.db
/usr/lib/gcj/tomcat5/catalina-ant-jmx-5.5.17.jar.so
/var/lib/rpm/alternatives/jmxri
/var/lib/tomcat5/server/lib/catalina-ant-jmx.jar
/var/lib/tomcat5/common/endorsed/jmx.jar
/etc/alternatives/jmxri



as you can see - the jmx is not the issue in this case .


Assaf

Martin Gainty wrote:

Assaf-

you're missing Java Management package jmx.jar..On my box I have it at 
%TOMCAT_HOME%/bin
http://java.sun.com/products/JavaManagement/download.html

Martin--

This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
- Original Message - 
From: "Assaf Flatto" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Monday, October 16, 2006 11:27 AM
Subject: RE: new tomcat installation failes to start



hello

found the problem and fixed it , but now i have another issue :
when i start it with the minimal server.xml it comes up fine , but wen i 
add my servr.xml :








  
  
  className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>


  
  







  

  

  
  











   keystorepass="changeit" 
keystoreFile="/etc/tomcat5/keystore"/>



   enableLookups="false" redirectPort="8443" 
protocol="AJP/1.3" />













  
  

  


  

  
  

  

 connectionName="postgres" connectionPassword="" 
resourceName="UserDatabase" />





  


  
  autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
  directory="logs" prefix="localhost_access_log."

 suffix=".txt" pattern="common" resolveHosts="false"/>

crossContext="true">









className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"


managerClassName="org.apache.catalina.cluster.session.DeltaManager"
  expireSessionsOnShutdown="false"
   useDirtyFlag="true"
notifyListenersOnReplication="true">

mcastDropTime="3000"/> 
   

className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>


   
   className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener" 
/>
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>














  



  





when i start the service , i get the following error

SEVERE: Exception handling NamingResources property change
javax.management.MBeanException: Cannot load ModelMBean class 
org.apache.catalina.mbeans.ContextResourceMBean nested exception
 is java.lang.ClassNotFoundException: 
org.apache.catalina.mbeans.ContextResourceMBean
java.lang.ClassNotFoundException: 
org.apache.catalina.mbeans.ContextResourceMBean
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at 
org.apache.commons.modeler.ManagedBean.createMBean(ManagedBean.java:409)
at 
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:248)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:403)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.processNamingResourcesPropertyChange(ServerLifecycleListener.jav

a:1315)
at 
org.apache.catalina.mbeans.ServerLifecycleListener.propertyChange(ServerLifecycleListener.java:234)
at 
java.beans.PropertyChangeSupport.fireProperty

Re: new tomcat installation failes to start

2006-10-18 Thread Assaf Flatto

David

#rpm -qa *sun-compat*
java-1.4.2-sun-compat-1.4.2.10-1jpp


As you can see the compat rpm is installed.

Assaf

David Smith wrote:
These messages make me think you are trying to run tomcat 5.5 on a 
1.4.x  JVM.   If so, download and install the compat package and install 
it.  It's on the same page as the other tomcat release downloads.


--David

Assaf Flatto wrote:


hello

found the problem and fixed it , but now i have another issue :
when i start it with the minimal server.xml it comes up fine , but wen 
i add my servr.xml :








  
  
  className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" 
/>
  className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/> 



  
  







  

  

  
  




   enableLookups="false" redirectPort="8443" 
acceptCount="100"

   connectionTimeout="2" disableUploadTimeout="true" />

   



   keystorepass="changeit" 
keystoreFile="/etc/tomcat5/keystore"/>
   

   enableLookups="false" redirectPort="8443" 
protocol="AJP/1.3" />














  
  

  


  

  
  

  

  connectionName="postgres" connectionPassword="" 
resourceName="UserDatabase" />
   

 


  
  autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
  directory="logs" prefix="localhost_access_log."
 suffix=".txt" pattern="common" 
resolveHosts="false"/>
   docBase="mc-tap-winasugo" debug="0" reloadable="true" 
crossContext="true">

validationQuery="SELECT id FROM currencies LIMIT 
1" />








className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"


managerClassName="org.apache.catalina.cluster.session.DeltaManager"
  expireSessionsOnShutdown="false"
   useDirtyFlag="true"
notifyListenersOnReplication="true">


className="org.apache.catalina.cluster.mcast.McastService"

mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"

mcastDropTime="3000"/> 
   

className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>

className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"

replicationMode="pooled"
ackTimeout="15000"
waitForAck="true"/>
className="org.apache.catalina.cluster.tcp.ReplicationValve"
 
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/> 

   className="org.apache.catalina.cluster.deploy.FarmWarDeployer"

 tempDir="/tmp/TAP-temp/"
   deployDir="/tmp/TAP-deploy/"
 watchDir="/tmp/TAP-listen/"
   watchEnabled="false"/>
   className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener" 
/>
 className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

 












  



  





when i start the service , i get the following error

SEVERE: Exception handling NamingResources property change
javax.management.MBeanException: Cannot load ModelMBean class 
org.apache.catalina.mbeans.ContextResourceMBean nested exception
 is java.lang.ClassNotFoundException: 
org.apache.catalina.mbeans.ContextResourceMBean
java.lang.ClassNotFoundException: 
org.apache.catalina.mbeans.ContextResourceMBean
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352) 

at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198) 

at 
org.apache.commons.modeler.ManagedBean.createMBean(ManagedBean.java:409)
at 
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:2

org.xml.sax.SAXParseException

2006-10-18 Thread Assaf Flatto

Hello list

Starting my tomcat (5.5.117) i get the following error, i validated the 
xml's and the pass , i matched the DTD and the also are defined properly


has anyone encountered this behavior before ?

thanks


Assaf


5863 [main] INFO  org.apache.struts.validator.ValidatorPlugIn  - Loading 
validation rules file from '/WEB-INF/validator-rules.xml'
5863 [main] INFO  org.apache.struts.validator.ValidatorPlugIn  - Loading 
validation rules file from '/WEB-INF/validation.xml'
6028 [main] ERROR org.apache.commons.digester.Digester  - Parse Error at 
line 49 column 76: Attribute "position" must be declared for element 
type "arg1".
org.xml.sax.SAXParseException: Attribute "position" must be declared for 
element type "arg1".
at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
Source)

at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown 
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown 
Source)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown 
Source)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown 
Source)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

at org.apache.commons.digester.Digester.parse(Digester.java:1666)
at 
org.apache.commons.validator.ValidatorResources.(ValidatorResources.java:156)
at 
org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:237)
at 
org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:162)
at 
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
at 
org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)

at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)

at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



changing the length of the jsessionid

2006-10-23 Thread Assaf Flatto

Hello

Does anyone know how i can shorten the length of the jsessionid from 32 
chars to 30 ?



thanks

Assaf


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: changing the length of the jsessionid

2006-10-26 Thread Assaf Flatto

thanks but i'm not working with the 5.5 tomcat
the version i'm working with is 5.0.28 and the option you specified is 
not available in the 5.0.x version.



Any other way to make the jsessionid shorter ?

Thanks

Assaf

Bill Barker wrote:
"Assaf Flatto" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Hello

Does anyone know how i can shorten the length of the jsessionid from 32 
chars to 30 ?




Set sessionIdLength="15" on the  tag for your context.


thanks

Assaf


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: changing the length of the jsessionid

2006-11-06 Thread Assaf Flatto
I took the sources of the 5.0.30 tomcat and made the changes, recompiled 
the RPM and installed it on  one of my QC servers .
the session id that is generated from the tomcat is indeed 30 chars but 
now it seems that the jvmroute and the balancer in front of it are not 
adding the ".x" to the jsessionid .



my balancer config is :

ProxyPass / balancer://mycluster/  lbmethod=bytraffic 
stickysession=jsessionid nofailover=Off

  
   BalancerMember ajp://172.31.1.1:8081 ttl=60  route=1
#BalancerMember http://172.31.1.2:8080 ttl=60  route=2
#BalancerMember ajp://172.31.1.3:8080 ttl=60  route=3
   Order Allow,Deny
   Allow from all
   


I specifically changed the ajp port to 8081 - it is not an error , the 
connector on the tomcat is defined :


protocol="AJP/1.3" />


and the jvmroute is defined :



but the end result is  cookie: JSESSIONID=FB5B5218F8A9021652FDE8C270F991

any guess why that is ?


Thanks


Christopher Schultz wrote:

Assaf,

  

Does anyone know how i can shorten the length of the jsessionid from 32
chars to 30 ?



In Tomcat 4.1, the class org.apache.catalina.session.ManagerBase creates
sessions and assigns ids to them. The source I'm looking at right now
uses a message digest algorithm (it's not clear which one, but probably
MD5) which returns a fixed-width string.

I suppose you could modify this file directly and re-package it with
your deployment, or possibly even subclass it and somehow install it
without having to modify Tomcat's internals (I don't know how to specify
which Manager gets used by Tomcat... someone else will have to answer that).

Any particular reason you want to shorten the session id?

-chris


  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



replication not working

2006-11-06 Thread Assaf Flatto

Hello

I have 3 servers with tomcat 5.0.30 , and i want to run them with data 
replication .
I manage to see the servers coming up and i can see in the log the other 
servers identifying the other members of the cluster , however when 
starting to test the replication between servers - there is non .


Server 1 :
2006-11-06 18:04:44,954 [Cluster-MembershipReceiver] INFO  
org.apache.catalina.cluster.tcp.SimpleTcpCluster  - Replication member 
added:org.apache.catalina.cluster.mcast.McastMember[tcp://172.31.1.1:4001,172.31.1.1,4001, 
alive=42788]


Server 2:
006-11-06 18:04:46,464 [Cluster-MembershipReceiver] INFO  
org.apache.catalina.cluster.tcp.SimpleTcpCluster  - Replication member 
added:org.apache.catalina.cluster.mcast.McastMember[tcp://172.31.1.2:4001,172.31.1.2,4001, 
alive=2]



I can not upgrade to tomcat 5.5 so an answer along those lines is not 
helpful .


anyone got an idea as to what can be the cause of this ?

Assaf

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: replication not working

2006-11-06 Thread Assaf Flatto

my bad i forgot to add the  definitions of my server.xml


managerClassName="org.apache.catalina.cluster.session.D

expireSessionsOnShutdown="false" useDirtyFlag="true">
   className="org.apache.catalina.cluster.mcast.McastService" 
mcastAddr="228.0.0.4"
mcastPort="45564" 
mcastFrequency="500" mcastDropTime="3000"/>
   className="org.apache.catalina.cluster.tcp.ReplicationListener" 
tcpListenAddress="auto"
tcpListenPort="4001" 
tcpSelectorTimeout="100" tcpThreadCount="25"/>
   className="org.apache.catalina.cluster.tcp.ReplicationTransmitter" 
replicationMode="pooled"/>
   filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.
   className="org.apache.catalina.cluster.deploy.FarmWarDeployer" 
tempDir="/tmp/temp/"
   deployDir="/tmp/deploy/" 
watchDir="/tmp/listen/" watchEnabled="false"/>



thanks

Assaf

Assaf Flatto wrote:

Hello

I have 3 servers with tomcat 5.0.30 , and i want to run them with data 
replication .
I manage to see the servers coming up and i can see in the log the 
other servers identifying the other members of the cluster , however 
when starting to test the replication between servers - there is non .


Server 1 :
2006-11-06 18:04:44,954 [Cluster-MembershipReceiver] INFO  
org.apache.catalina.cluster.tcp.SimpleTcpCluster  - Replication member 
added:org.apache.catalina.cluster.mcast.McastMember[tcp://172.31.1.1:4001,172.31.1.1,4001, 
alive=42788]


Server 2:
006-11-06 18:04:46,464 [Cluster-MembershipReceiver] INFO  
org.apache.catalina.cluster.tcp.SimpleTcpCluster  - Replication member 
added:org.apache.catalina.cluster.mcast.McastMember[tcp://172.31.1.2:4001,172.31.1.2,4001, 
alive=2]



I can not upgrade to tomcat 5.5 so an answer along those lines is not 
helpful .


anyone got an idea as to what can be the cause of this ?

Assaf

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



j_security_check exception

2006-11-07 Thread Assaf Flatto

Hello

working with Tomcat i am unable to get the replication to preform 
smoothly , when i start an authentication session (login) i see my 
application finishing the login procedure correctly but the replication 
is throwing this exception and the application and tomcat freeze.


Any one ever encountered this behavior before ?

Thanks


Assaf



2006-11-07 14:22:34,951 [http-8443-Processor25] DEBUG 
org.apache.catalina.cluster.tcp.ReplicationValve  - Invoking replication

request on /jsp/pages/j_security_check
2006-11-07 14:22:35,086 [http-8443-Processor25] ERROR 
org.apache.coyote.tomcat5.CoyoteAdapter  - An exception or error 
occurred in the container during the r

equest processing
java.lang.ClassCastException
   at 
org.apache.catalina.cluster.session.DeltaRequest.setPrincipal(DeltaRequest.java:89)
   at 
org.apache.catalina.cluster.session.DeltaSession.setPrincipal(DeltaSession.java:567)
   at 
org.apache.catalina.cluster.session.DeltaSession.setPrincipal(DeltaSession.java:561)
   at 
org.apache.catalina.authenticator.AuthenticatorBase.register(AuthenticatorBase.java:818)
   at 
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:176)
   at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at 
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:141)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
   at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
   at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
   at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

   at java.lang.Thread.run(Thread.java:534)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



New tomcat and Jasper error

2006-11-12 Thread Assaf Flatto

hello list

i have a brand new installation of tomcat 5.5.17 , with the following 
packages :


tomcat5-common-lib-5.5.17-3.1.2mdv2007.0
tomcat5-jasper-5.5.17-3.1.2mdv2007.0
tomcat5-jsp-2.0-api-5.5.17-3.1.2mdv2007.0
tomcat5-server-lib-5.5.17-3.1.2mdv2007.0
tomcat5-servlet-2.4-api-javadoc-5.5.17-3.1.2mdv2007.0
tomcat5-admin-webapps-5.5.17-3.1.2mdv2007.0
tomcat5-servlet-2.4-api-5.5.17-3.1.2mdv2007.0
tomcat5-jsp-2.0-api-javadoc-5.5.17-3.1.2mdv2007.0
tomcat5-webapps-5.5.17-3.1.2mdv2007.0
tomcat5-jasper-javadoc-5.5.17-3.1.2mdv2007.0
tomcat5-5.5.17-3.1.2mdv2007.0


jakarta-commons-discovery-0.3-2.1mdv2007.0
jakarta-commons-modeler-1.1-7.1mdv2007.0
jakarta-commons-el-1.0-6.2mdv2007.0
jakarta-commons-daemon-1.0.1-4.1mdv2007.0
jakarta-commons-collections-3.2-1.1mdv2007.0
jakarta-commons-beanutils-1.7.0-4.2mdv2007.0
jakarta-commons-digester-1.7-4.1mdv2007.0
jakarta-commons-fileupload-1.0-5.1mdv2007.0
jakarta-commons-pool-1.3-2.1mdv2007.0
jakarta-commons-logging-1.1-3.2mdv2007.0
jakarta-commons-validator-1.3.0-1.1mdv2007.0
jakarta-commons-httpclient-3.0.1-1mdv2007.0
jakarta-commons-dbcp-1.2.1-5.1mdv2007.0
jakarta-commons-launcher-1.1-1.1mdv2007.0
jakarta-commons-collections-javadoc-3.2-1.1mdv2007.0


i use the minimal-server.xml as the server.xml , but i still get the error:
java.lang.NoClassDefFoundError: org.apache.jasper.servlet.JspServlet.


Any ideas ?

Thanks

Assaf

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ProxyDirContext.lookupCache Error on a new Tomcat install

2006-12-05 Thread Assaf Flatto

Hello

I've installed a new server , with  the tomcat that comes with the 
mandrake 2007 RPM's . (tomcat 5.5.17)
when i load up my application and access the website i get multiple 
errors like the one below , At first i thought it was due to the fact 
that some of images are located on the loadbalancer proxy and the fact 
that the server doesn't see them , but even after redirecting the  
traffic via the proxy the error appeared.


Any one ever encountered this error before ?

I've added the error stack trace and the server .xml


Thank you

Assaf


2006-12-04 19:16:27,255 [main] DEBUG 
org.apache.commons.modeler.Registry  - Found 
jar:file:/usr/share/java/tomcat5/catalina-5.5.17.jar!/org/apache/catalina/u

sers/mbeans-descriptors.xml
2006-12-04 19:16:27,264 [main] DEBUG 
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource  - Reading 
descriptors ( dom ) 8

...skipping...
) for servlet default threw exception
java.lang.NoSuchMethodError: 
org.apache.naming.resources.ProxyDirContext.lookupCache(Ljava/lang/String;)Lorg/apache/naming/resources/CacheEntry;
   at 
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:679)
   at 
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:354)

   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

   at tap.web.TAPRequestFilter.doFilter(TAPRequestFilter.java:35)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

   at java.lang.Thread.run(Thread.java:534)


Server.xml looks like this :




className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />


   
   type="org.apache.catalina.UserDatabase"  description="User 
database that can be updated and saved"
  
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"  
pathname="conf/tomcat-users.xml" />

   
   
   
   


   minSpareThreads="25" maxSpareThreads="75" enableLookups="false"
redirectPort="8443" acceptCount="100" debug="0" 
connectionTimeout="2" disableUploadTimeout="true"/>
   
   minSpareThreads="25" maxSpareThreads="75" enableLookups="false"
disableUploadTimeout="true" acceptCount="100" 
debug="0" />
   
   debug="0">
   unpackWARs="true"
autoDeploy="true" xmlValidation="false" 
xmlNamespaceAware="false">
   className="org.apache.catalina.valves.AccessLogValve" directory="logs" 
prefix="test.foo.com_access_log."
suffix=".txt" pattern="common" 
resolveHosts="false"/>
   className="org.apache.catalina.logger.FileLogger" directory="logs" 
prefix="test.foo.com_log."

suffix=".txt" timestamp="true"/>

Error in dependencyCheck

2006-12-19 Thread Assaf Flatto

Hello


I've installed tomcat 5.5.17 - this is the 8th server i install in a row 
and the first one that displays this error when i start tomcat.


I googled it a bit and it refers to TOC of the war file , whoever the 
same war file has been used on 2 other servers and with no issues .


Any one got any ideas what might be generating the problem ?

i added the stack output  of the catalina.out log file   



2006-12-19 18:26:14,239 [main] INFO  
org.apache.catalina.core.StandardService  - Starting service Catalina
2006-12-19 18:26:14,246 [main] INFO  
org.apache.catalina.core.StandardEngine  - Starting Servlet Engine: 
Apache Tomcat/5.5.17
2006-12-19 18:26:14,258 [main] INFO  
org.apache.catalina.core.StandardHost  - XML validation disabled
2006-12-19 18:26:14,475 [main] ERROR 
org.apache.catalina.core.StandardContext  - Error in dependencyCheck

java.util.zip.ZipException: missing entry name
   at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:227)
   at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:73)
   at java.util.jar.JarInputStream.(JarInputStream.java:58)
   at java.util.jar.JarInputStream.(JarInputStream.java:43)
   at 
org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:372)
   at 
org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:183)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4035)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
   at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
   at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
   at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)

   at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
   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:294)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2006-12-19 18:26:14,505 [main] ERROR 
org.apache.catalina.core.StandardContext  - Error getConfigured
2006-12-19 18:26:14,506 [main] ERROR 
org.apache.catalina.core.StandardContext  - Context [] startup failed 
due to previous errors



Thanks

Assaf

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Generating Autoindex in Tomcat

2006-12-27 Thread Assaf Flatto

Hello

I am running tomcat 5.5.17 and i want to generate an auto index for the 
applications located on my server so i can pick which one i want to work 
with.


basically what i want is like this , in directory foo i have 3 
applications , i want the tomcat to present a page listing the 
"applications" ( file names) and when i add or remove an application it 
will know this automatically ( similar to the auto index in apache.)


Is there a directive for that in Tomcat ?


Assaf


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Troubleshooting load problems with on linux tomcat servers

2006-12-27 Thread Assaf Flatto
This error seems to indicate that you XML is faulty and not closed 
properly on all parameters .


If you are running it on Linux - use the xmllint to check the validation 
of the xml .


Assaf

Ragnar Moller (MA/EAF) wrote:

We have a big Tomcat application with a number of servers. Some of the
server have higher than expected loads on some of them.

Load average on identical servers is either 5, 2 or 0.05. On the servers
which have a hig value it remains high.

No of running processes is identical on all servers.

On some servers, Tomcat restarts have been seen where the servers
signals non matching tags, but I don't know if this is significant.
[Fatal Error] :1:239: The element type "root-layout" must be terminated
by the matching end-tag "".

Ideas for troubleshooting and diagnostics would be appreciated. 


Br,

R Moller




  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 6 fail to detect a matching certificate and stuck in an infinite loop

2008-08-03 Thread Assaf Vizner
 

Hi

I have a .keystore file which doesn't matches the SSL definitions in the
server.xml.

 tomcat 4 handled it well - it was unable to connect to it but the logs
showed a friendly messages and the server continue working fine.

However in tomcat 6 when I configured the connectors in the server.xml
with default settings or as" org.apache.coyote.http11.Http11Protocol" 

And I started the service the tomcat get in an infinite loop which holds
the CPU in 90% and keep writing to catalina log the following error:

 

03/08/2008 11:09:37 org.apache.tomcat.util.net.JIoEndpoint$Acceptor run

SEVERE: Socket accept failed

java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException:
No available certificate or key corresponds to the SSL cipher suites
which are enabled.

at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocke
tFactory.java:150)

at
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310
)

at java.lang.Thread.run(Thread.java:619)

03/08/2008 11:09:37 org.apache.tomcat.util.net.JIoEndpoint$Acceptor run

 

When I configure the connectors to work with
"org.apache.coyote.http11.Http11NioProtocol" the problem seems to
disappear

 

Any ideas?

 

Thanks

 

Assaf Vizner
NextNine.LTD
4 Ha-Nechoshet
Tel-Aviv 69710 Israel
E-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Tel: +972(3)7673012
Mobile: +972(528)466746
Fax: +972(3)6497810

 



IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-08 Thread Assaf Urieli
Hi all,

I'm attempting to set up a multi-host system with a separate SSL
certificate per host.
According to the documentation, this is problematic using name-based
virtual hosting:
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html#General_Tips_on_Running_SSL
"Finally, using name-based virtual hosts on a secured connection can be
problematic."

So, I'm trying to accomplish this via IP-based virtual hosting, using the
useIPVHosts="true" flag.
(Note: I've tried name-based virtual hosting with useIPVHosts="false", and
it doesn't work either)

I've gone through the full thread discussing this at:
http://mail-archives.apache.org/mod_mbox/tomcat-users/201005.mbox/%3c4bfb9c17.20...@cox.net%3E

However, I'm still not managing to access the domain2.com host via SSL (4th
connector on list below).

* Tomcat version: 6.0.24 (standalone)
* OS: Ubuntu 10.0.4LTS
* JVM: java 1.6.0_22 (Sun distribution)

I've setup my server.xml as follows:













1.2.3.4
domain1.com
www.domain1.com




5.6.7.8
domain2.com
www.domain2.com






On the Ubuntu OS, I've configured my /etc/hosts file as follows:
127.0.0.1localhost.localdomain  localhost
1.2.3.4www.domain1.com domain1.com domain1
5.6.7.8www.domain2.com domain2.com domain2

My DNS settings contain the following A records:
for domain1.com
[blank]   1.2.3.4
www  1.2.3.4

for domain2.com
[blank] 5.6.7.8
www5.6.7.8

When I use HTTP (without SSL), it works fine, as it's using the name-based
virtual hosting.
When I use HTTPS (with SSL and useIPVHosts="true"), I'm always sent to the
default host.

When I look at the log files generated by the AccessLogValve, I'm always
getting IP address 1.2.3.4 for the Local IP address (%A), regardless of how
I access the websites on the browser - via HTTP or HTTPs, and via IP
address or domain name.
Even if I enter the IP address http://5.6.7.8 or https://5.6.7.8 in the
browser, the access logs list 1.2.3.4 as the local IP.

Any suggestions on how to troubleshoot?

Thanks in advance,
Assaf


Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-08 Thread Assaf Urieli
Hello,


> Looking at the code, the value used for host name in IP-based virtual
> hosts is ServletRequest.getLocalName(). It is not getLocalAddr() and
> there is no pattern in AccessLogValve that prints it. You can write
> simple JSP page that will display its value.
>

Ok, this is strange. I created a test.jsp page that prints
request.getLocalName(), request.getServerName(), and request.getLocalAddr().
I tried various scenarios in the browser: http://domain1.com,
http://www.domain1.com, http:/1.2.3.4, http://domain2.com,
http://www.domain2.com, http://5.6.7.8, as well as all of the above with
https.
The only parameter that changes in all these scenarios is
request.getServerName().
request.getLocalName() = www.domain1.com (always!)
request.getLocalAddr() = 1.2.3.4 (always!)
request.getServerName() = domain1.com, www.domain1.com, 1.2.3.4, domain2.com,
www.domain2.com, 5.6.7.8


> Quote:
> [[[
>if (connector.getUseIPVHosts()) {
>serverName = req.localName();
> ]]]
>
> Which explains why useIPVHosts changes nothing for me -
request.getLocalName() is always giving the same result.
What is it that sets request.getLocalName() in the first place? In what
scenario would the name be different?


> >
> > Even if I enter the IP address http://5.6.7.8 or https://5.6.7.8 in the
> > browser, the access logs list 1.2.3.4 as the local IP.
> >
>
> This is odd.
>
> How 5.6.7.8 is configured at OS level? Do you have separate network
> card for it or it is something else?
>

My /etc/network/interfaces file looks like this:
# The loopback interface
auto lo
iface lo inet loopback

# Configuration for eth0 and aliases

# This line ensures that the interface will be brought up during boot.
auto eth0 eth0:0
#iface eth0 inet dhcp

# eth0 - This is the main IP address that will be used for most outbound
connections.
# The address, netmask and gateway are all necessary
iface eth0 inet static
 address 1.2.3.4
 netmask 255.255.255.0
 gateway 1.2.3.1
pre-up iptables-restore < /etc/iptables.conf

# eth0:0
# This is a second public IP address.
iface eth0:0 inet static
 address 5.6.7.8
 netmask 255.255.255.0
 gateway 5.6.7.1
pre-up iptables-restore < /etc/iptables.conf

>
> Your connector with address="5.6.7.8" - did it start successfully and
> did bind to the specified address? Tomcat itself will continue
> starting even if one of its connectors fails. (There is a system
> property that changes this behaviour of ignoring an error, though I do
> not remember whether it works in 6.0.24).
>

How does one find out if a connector starts successfully and binds at a
specific address? Is there a log somewhere for this information? Nothing
obvious was written to the catalina.-MM-dd.log indicating failure.

>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
Best regards,
Assaf


Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-14 Thread Assaf Urieli
Thanks Mark & Konstantin for your replies.

I'm still having no luck here.
I've tried to apply all of Mark's suggestions to Ubuntu.
SAN certificates are not currently an option for me (because of pricing,
and also because the two domains do not officially belong to the same legal
entity).

My question is:
* When an HTTP/HTTPS request is made, when and how do
request.getLocalName() and request.getLocalAddr() get filled in?

Note that in my case, http://1.2.3.4 and http:/5.6.7.8 are directed to the
correct server, but they are always getting the following settings:
* request.getLocalAddr():  the IP address from the primary interface in
/etc/network/interfaces
* request.getLocalName(): the name corresponding to the primary interface
IP from /etc/hosts

Rgds,
Assaf

PS, regarding Mark's info, I posted my /etc/network/interfaces file in a
previous post.
The only change I made now is that I removed the gateway from the second
interface (see updated file below).
All interfaces come up correctly, and I can ping both gateways.

My updated interfaces file below:

auto lo
iface lo inet loopback

auto eth0 eth0:0

iface eth0 inet static
 address 1.2.3.4
 netmask 255.255.255.0
 gateway 1.2.3.1
pre-up iptables-restore < /etc/iptables.conf

iface eth0:0 inet static
 address 5.6.7.8
 netmask 255.255.255.0
pre-up iptables-restore < /etc/iptables.conf


I've also updated server.xml to contain only 3 connectors.
Only one for HTTP (name-based virtual hosting) - no address, and
useIPVHosts = false:


And as before, for HTTPS for address 1.2.3.4:
  

And one for HTTPS for address 5.6.7.8:


>
>


Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-14 Thread Assaf Urieli
Answering my own question to a certain extent:


* When an HTTP/HTTPS request is made, when and how do
> request.getLocalName() and request.getLocalAddr() get filled in?
>
>
>From v6.0.35 source code, org/apache/catalina/connector/CoyoteAdapter.java,
line 489:

if (connector.getUseIPVHosts()) {
serverName = req.localName();

When I dig deeper into the source code to where the request's local name is
getting set in the first place, it seems to be getting set from
socket.getLocalAddress(), on
org/apache/catalina/http11/Http11Processor.java, line 1063.

if ((localName == null) && (socket != null)) {
InetAddress inetAddr = socket.getLocalAddress();
if (inetAddr != null) {
localName = inetAddr.getHostName();
}
}

So my question is now: why would socket.getLocalAddress() always return the
default interface, rather than resolving the domain/IP in the request
header to the correct interface?
As stated before, in my case, http://1.2.3.4 and http:/5.6.7.8 are both
directed correctly to my web server, but they are always getting the
following settings:
* request.getLocalAddr():  the IP address from the primary interface in
/etc/network/interfaces = http://1.2.3.4
* request.getLocalName(): the name corresponding to the primary interface
IP from /etc/hosts = www.domain1.com
Is there any way to troubleshoot this?

Rgds,
Assaf


Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-15 Thread Assaf Urieli
Hi Chris,

>
> On 6/8/12 11:12 AM, Assaf Urieli wrote:
> > Ok, this is strange. I created a test.jsp page that prints
> > request.getLocalName(), request.getServerName(), and
> > request.getLocalAddr(). I tried various scenarios in the browser:
> > http://domain1.com, http://www.domain1.com, http:/1.2.3.4,
> > http://domain2.com, http://www.domain2.com, http://5.6.7.8, as well
> > as all of the above with https.
>
> What /real/ URLs are you using to hit your server? I dont see a port
> number anywhere.
>

Sorry, I was trying to keep it generic up to now to see if I was simply
doing something stupid, but I'll go ahead and publish my real domains/IPs.

So, my test page code is:
Java Version:<%= System.getProperty( "java.version" ) %>
Local name:<%= request.getLocalName() %>
Server name:<%= request.getServerName() %>
Local IP:<%= request.getLocalAddr() %>

So, the addresses to test are:
http://www.joli-ciel.com/test.jsp
http://www.moyshele.com/test.jsp
http://178.79.152.69/test.jsp
http://176.58.107.88/test.jsp

And exactly the same four, but with HTTPS:
https://www.joli-ciel.com/test.jsp
https://www.moyshele.com/test.jsp
https://178.79.152.69/test.jsp
https://176.58.107.88/test.jsp

Now, every single one of these gives the exact same values for
request.getLocalName() and request.getLocalAddr().
request.getLocalName(): www.joli-ciel.com
request.getLocalAddr(): 178.79.152.69
And this is why, even when useIPVHosts=true, I always get the HTTPS
Connector corresponding to 178.79.152.69, which gives the wrong SSL
certificate for https://www.moyshele.com

For info, my /etc/network/interfaces file:

auto lo
iface lo inet loopback

auto eth0 eth0:0

iface eth0 inet static
 address 178.79.152.69
 netmask 255.255.255.0
 gateway 178.79.152.1
pre-up iptables-restore < /etc/iptables.conf

iface eth0:0 inet static
 address 176.58.107.88
 netmask 255.255.255.0
pre-up iptables-restore < /etc/iptables.conf


Note (in case it's relevent) that /etc/iptables.conf is mapping port 8080
to port 80 and port 8443 to port 443  - relevent portions below:

*nat
:PREROUTING ACCEPT [11:3512]
:POSTROUTING ACCEPT [13:844]
:OUTPUT ACCEPT [13:844]
-A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A OUTPUT -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
-A OUTPUT -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
COMMIT


My /etc/hosts file:

127.0.0.1localhost.localdomain  localhost
178.79.152.69www.joli-ciel.com bilbo.joli-ciel.com bilbo.aplikaterm.com
www.aplikaterm.com joli-ciel.com  bilbo
176.58.107.88www.moyshele.com www.flyingpencil.com moyshele.com
flyingpencil.com moyshele

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


The relevent portions of my server.xml file:

  







  

  
178.79.152.69
aplikaterm.com
www.aplikaterm.com
joli-ciel.com
www.joli-ciel.com


  

176.58.107.88
moyshele.com
www.moyshele.com




  


By the way, if I run netstat (with or without useIPVHosts=true), I get:

sudo netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address
State   PID/Program name
tcp0  0 0.0.0.0:22  0.0.0.0:*
LISTEN  1967/sshd
tcp0  0 127.0.0.1:5432  0.0.0.0:*
LISTEN  2082/postgres
tcp6   0  0 127.0.0.1:8005  :::*
LISTEN  16815/java
tcp6   0  0 :::8080 :::*
LISTEN  16815/java
tcp6   0  0 :::22   :::*
LISTEN  1967/sshd
tcp6   0  0 176.58.107.88:8443  :::*
LISTEN  16815/java
tcp6   0  0 178.79.152.69:8443  :::*
LISTEN  16815/java



Re: IP-based virtual hosting with useIPVHosts=true always goes to default host

2012-06-18 Thread Assaf Urieli
Hi all,

I solved this issue following a parallel discussion on another forum:
http://forum.linode.com/viewtopic.php?f=19&t=8991

Basically, I had IPTables firewall rules rerouting port 443 traffic to port
8443, and port 80 traffic to port 8080.
This is because the tomcat6 user cannot access ports < 1024 (only root can).
However, this rerouting was always rerouting to my default IP.

To solve this, I changed my iptables.conf file from:
> -A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
> -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
> -A OUTPUT -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
> -A OUTPUT -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080

to:
-A PREROUTING -p tcp -m tcp --dst 178.79.152.69 --dport 443 -j DNAT
--to-destination 178.79.152.69:8443
-A PREROUTING -p tcp -m tcp --dst 176.58.107.88 --dport 443 -j DNAT
--to-destination 176.58.107.88:8443
-A PREROUTING -p tcp -m tcp --dst 178.79.152.69 --dport 80 -j DNAT
--to-destination 178.79.152.69:8080
-A PREROUTING -p tcp -m tcp --dst 176.58.107.88 --dport 80 -j DNAT
--to-destination 176.58.107.88:8080
-A OUTPUT -p tcp -m tcp --src 178.79.152.69 --dport 443 -j REDIRECT
--to-ports 8443
-A OUTPUT -p tcp -m tcp --src 176.58.107.88 --dport 443 -j REDIRECT
--to-ports 8443
-A OUTPUT -p tcp -m tcp --src 178.79.152.69 --dport 80 -j REDIRECT
--to-ports 8080
-A OUTPUT -p tcp -m tcp --src 176.58.107.88 --dport 80 -j REDIRECT
--to-ports 8080


>  Comment 
>
> And here's your first problem. You need to specifically state
> NM_CONTROLLED=no.
>
> Also, you need to add ONPARENT=yes to the eth0:0 interface file.
>
> I've included copies of the interface files in a previous message
>
>  Comment 
>

Mark - unfortunately the NM_CONTROLLED and ONPARENT options don't exist in
Ubuntu, but I've solved this by rewriting my IPTables rules (see above).
Thanks for your suggestions & time taken to answer in detail.

Anyway, I've now got each of my websites serving its own SSL certificate
correctly.
When you go to:
https://www.moyshele.com/test.jsp
https://www.joli-ciel.com/test.jsp
You can see that the local IP and local name are now correct.

Thanks all for your help!
Best regards,
Assaf