Results 1 to 7 of 7

Thread: help needed - tomcat virtual hosts in server.xml

Threaded View

  1. #1
    Join Date
    Mar 2007
    Posts
    24
    Rep Power
    8

    Default help needed - tomcat virtual hosts in server.xml

    I'd like to add a virtual host <Host> container to tomcat's configuration and point it at a small custom webapp I've added to ${catalina.home}/webapps/. But, when I add a second <Host> section to server.xml.in, tomcat gives errors and fails to start.

    Are there any known issues adding virtual hosts to Zimbra's tomcat config? Please help... (-:
    zimbra: Release 4.5.0_GA_612.RHEL4_20070115193052
    OS: RHEL 4 AS

    catalina.out shows the following errors, ending in "Fatal error: terminating: PrivilegedServlet init failed"

    Code:
    Apr 16, 2007 6:05:29 PM org.apache.catalina.startup.HostConfig deployDescriptor
    WARNING: A docBase /opt/zimbra/apache-tomcat-5.5.15/webapps/zimbra inside the host appBase has been specified, and will be ignored
    log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
    log4j:WARN Please initialize the log4j system properly.
    Zimbra server reserving server socket port=110 bindaddr=null ssl=false
    Zimbra server reserving server socket port=7995 bindaddr=null ssl=true
    Zimbra server reserving server socket port=143 bindaddr=null ssl=false
    Zimbra server reserving server socket port=993 bindaddr=null ssl=true
    Zimbra server process is running as root, changing to user=zimbra uid=501 gid=501
    Zimbra server process, after change, is running with uid=501 euid=501 gid=501 egid=501
    Apr 16, 2007 6:05:32 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
    log4j:WARN Please initialize the log4j system properly.
    Zimbra server reserving server socket port=110 bindaddr=null ssl=false
    Fatal error: terminating: PrivilegedServlet init failed
    java.net.BindException: Permission denied
            at java.net.PlainSocketImpl.socketBind(Native Method)
            at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
            at java.net.ServerSocket.bind(ServerSocket.java:319)
            at com.zimbra.cs.util.NetUtil.newBoundServerSocket(NetUtil.java:111)
            at com.zimbra.cs.util.NetUtil.bindServerSocket(NetUtil.java:134)
            at com.zimbra.cs.util.NetUtil.bindTcpServerSocket(NetUtil.java:63)
            at com.zimbra.cs.servlet.PrivilegedServlet.init(PrivilegedServlet.java:94)
            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:3915)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
            at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
            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:700)
            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:585)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:406)
            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 com.zimbra.cs.launcher.TomcatLauncher.start(TomcatLauncher.java:52)
            at com.zimbra.cs.launcher.TomcatLauncher.main(TomcatLauncher.java:74)
    Here's the <Engine ...> section of my server.xml.in
    Code:
    <Engine name="Catalina" defaultHost="localhost">
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 resourceName="UserDatabase" />
    
          <!-- use the "redirector" webapp for zimbra.domain.net and webmail.domain.net -->
         <Host name="webmail.domain.net" appBase="webapps" autoDeploy="false">
            <DefaultContext reloadable="false"/>
            <Context path="" docBase="${catalina.home}/webapps/redirector"/>
         </Host>
          <Host name="localhost" appBase="webapps" autoDeploy="false">
              <DefaultContext reloadable="false"/>
              <!-- path should be "", not "/" -->
              <Context path="" docBase="${catalina.home}/webapps/zimbra" debug="0"/>
          </Host>
    
          <Valve className="org.apache.catalina.valves.AccessLogValve"
                 pattern="combined"/>
        </Engine>
    Last edited by daneturner; 04-16-2007 at 06:44 PM. Reason: added Zimbra and OS versions

Similar Threads

  1. Virtual Appliance Questions
    By riogd in forum Installation
    Replies: 2
    Last Post: 06-28-2007, 11:47 AM
  2. Fedora 5: Could not create the Java virtual machine
    By mi2enno in forum Installation
    Replies: 6
    Last Post: 06-01-2007, 03:16 AM
  3. Tomcat, Java VM Problems - RAM related? Help
    By Mo_Hong in forum Administrators
    Replies: 3
    Last Post: 03-28-2007, 02:00 PM
  4. Replies: 2
    Last Post: 09-02-2006, 07:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •