tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Propes, Barry L " <barry.l.pro...@citi.com>
Subject RE: RemoteAddrValve
Date Wed, 28 Nov 2007 17:23:35 GMT
probably that path attribute is wrong, correct? Not needed on 5x?

-----Original Message-----
From: Niki Diulgerov [mailto:ndiulgerov@imx.fr]
Sent: Wednesday, November 28, 2007 10:57 AM
To: Tomcat Users List
Subject: RemoteAddrValve


Hello there,
Using tomcat 5.5.25 + jdk1.5.0_13
By default /tomcat/conf/Catalina/localhost/manager.xml looks like

<?xml version="1.0" encoding="UTF-8"?>


<Context docBase="${catalina.home}/server/webapps/manager"
         privileged="true" antiResourceLocking="false" 
antiJARLocking="false">
  <!-- Link to the user database we will get roles from -->
  <ResourceLink name="users" global="UserDatabase"
                type="org.apache.catalina.UserDatabase"/>

</Context>



I'm changing it to:



<?xml version="1.0" encoding="UTF-8"?>



<Context path="/manager"
docBase="${catalina.home}/server/webapps/manager"
         privileged="true" antiResourceLocking="false" 
antiJARLocking="false">
<Valve classname="org.apache.catalina.valves.RemoteAddrValve" 
allow="192.9.202.231"/>
  <!-- Link to the user database we will get roles from -->
  <ResourceLink name="users" global="UserDatabase"
                type="org.apache.catalina.UserDatabase"/>

</Context>


But no success to implement IP restriction for /manager
here is the error:
SEVERE: Parse error in context.xml for /manager
java.lang.NullPointerException
        at 
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2726)
        at 
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2752)
        at 
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1279)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:220)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at 
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
        at 
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:782)
        at 
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:722)
        at 
org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:987)
        at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at 
org.apache.catalina.core.StandardContext.init(StandardContext.java:5071)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3984)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at 
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        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:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Nov 28, 2007 6:50:49 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Occurred at line 30 column 86
Nov 28, 2007 6:50:51 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Nov 28, 2007 6:50:51 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Nov 28, 2007 6:50:51 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/manager] startup failed due to previous errors

what can be the reason ?

-- 
Best regards,

Nikolay Diulgerov




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


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


Mime
View raw message