503 Service Temporarily Unavailable

Discuss installation of Scalix software

Moderators: ScalixSupport, admin

alexpacio
Posts: 45
Joined: Mon Jul 31, 2006 6:33 am

503 Service Temporarily Unavailable

Postby alexpacio » Mon Jul 31, 2006 7:00 am

Hi,
i've installed Scalix 10.0.1 on a vmware machine with Centos 4.3 successfully (i've only changed /etc/hosts and /etc/redhat-release as requested by the installer).When i type http://localhost , I get the Apache test page , while when I type http://localhost/sac or http://localhost/webmail , I get "503 Service Temporarily Unavailable".I've looked the apche log files and Apache seems work flawlessly.How can I get Scalix working?

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jul 31, 2006 11:39 am

This happens if you've just started tomcat and haven't given it enough time to complete its initialisation.

If you are still getting these errors after a few minutes, there should be something logged in the Apache error log or the tomcat logs.

Cheers

Dave

alexpacio
Posts: 45
Joined: Mon Jul 31, 2006 6:33 am

Postby alexpacio » Mon Jul 31, 2006 1:12 pm

I get this message after many hours from the installation."scalix-tomcat" service is started from 3 hours...I don't see errors in apache logs.Where are tomcat logs?

Attending for your response,
Alex

alexpacio
Posts: 45
Joined: Mon Jul 31, 2006 6:33 am

Postby alexpacio » Mon Jul 31, 2006 2:00 pm

There is the last caa.log : there are 2 warns and 3 errors...
2006-07-31 20:10:30,300 INFO [SOAPDispatcherServlet.init:76] ====> CAA is starting up, standby <====
2006-07-31 20:10:30,478 WARN [CAAConfigLoader.parseConfigDocument:224] No services are configured in this config file
2006-07-31 20:10:30,828 ERROR [CAAConfigLoader.parseComponentNode:244] Service scalix.res, Component disabled has no class defined!
2006-07-31 20:10:31,066 INFO [GuidToServerCache$CleanupThread.run:39] Guid2Server cache is empty. Skipping cleanup
2006-07-31 20:10:31,067 INFO [NotificationEventListener.launch:242] Main Notification Event Listener thread launched...
2006-07-31 20:10:31,070 INFO [NotificationEventListener.launch:245] Notification Worker thread com.scalix.sac.ubermgr.events.NotificationEventListener$WorkerThread-thread-0 launched...
2006-07-31 20:10:31,072 INFO [NotificationEventListener.launch:245] Notification Worker thread com.scalix.sac.ubermgr.events.NotificationEventListener$WorkerThread-thread-1 launched...
2006-07-31 20:10:31,077 INFO [RESInitializer.initNotificationListener:220] RESMonitor-thread Thread launched...
2006-07-31 20:10:31,113 INFO [SOAPDispatcherServlet.init:118] ====> CAA started, you may fire when ready <====
2006-07-31 20:10:35,912 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: register|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local
2006-07-31 20:10:35,947 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: register|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local
2006-07-31 20:10:40,950 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: heartbeat|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local
2006-07-31 20:11:11,715 INFO [RESInitializer.terminate:256] Shutting down UberManager and all its threads...
2006-07-31 20:11:11,716 INFO [RESMonitor.halt:157] RESMonitor-thread Thread shutting down
2006-07-31 20:11:11,717 INFO [NotificationEventListener.cleanup:267] NotificationEventListener-Thread closing UDP socket...
2006-07-31 20:11:11,745 ERROR [NotificationEventListener.run:232] java.net.SocketException: Socket closed
2006-07-31 20:11:11,746 INFO [NotificationEventListener$WorkerThread.halt:119] com.scalix.sac.ubermgr.events.NotificationEventListener$WorkerThread-thread-0 Thread shutting down...
2006-07-31 20:11:11,747 INFO [NotificationEventListener$WorkerThread.halt:119] com.scalix.sac.ubermgr.events.NotificationEventListener$WorkerThread-thread-1 Thread shutting down...
2006-07-31 20:11:11,749 INFO [GuidToServerCache$CleanupThread.stopThread:54] com.scalix.sac.ubermgr.data.GuidToServerCache$CleanupThread-thread Shutting down...
2006-07-31 20:13:15,395 INFO [SOAPDispatcherServlet.init:76] ====> CAA is starting up, standby <====
2006-07-31 20:13:15,613 WARN [CAAConfigLoader.parseConfigDocument:224] No services are configured in this config file
2006-07-31 20:13:15,623 ERROR [CAAConfigLoader.parseComponentNode:244] Service scalix.res, Component disabled has no class defined!
2006-07-31 20:13:15,718 INFO [GuidToServerCache$CleanupThread.run:39] Guid2Server cache is empty. Skipping cleanup
2006-07-31 20:13:15,872 INFO [NotificationEventListener.launch:242] Main Notification Event Listener thread launched...
2006-07-31 20:13:16,078 INFO [NotificationEventListener.launch:245] Notification Worker thread com.scalix.sac.ubermgr.events.NotificationEventListener$WorkerThread-thread-0 launched...
2006-07-31 20:13:16,081 INFO [NotificationEventListener.launch:245] Notification Worker thread com.scalix.sac.ubermgr.events.NotificationEventListener$WorkerThread-thread-1 launched...
2006-07-31 20:13:16,086 INFO [RESInitializer.initNotificationListener:220] RESMonitor-thread Thread launched...
2006-07-31 20:13:16,120 INFO [SOAPDispatcherServlet.init:118] ====> CAA started, you may fire when ready <====
2006-07-31 20:13:18,480 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: register|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local
2006-07-31 20:13:18,496 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: register|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local
2006-07-31 20:13:23,503 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: heartbeat|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local
2006-07-31 20:14:16,100 INFO [RESMonitor.run:115] Server vmware.mediaspot.local up 57 secs
2006-07-31 20:14:23,517 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: heartbeat|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local
2006-07-31 20:15:16,103 INFO [RESMonitor.run:115] Server vmware.mediaspot.local up 1 mins, 57 secs
2006-07-31 20:15:23,519 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: heartbeat|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local
2006-07-31 20:16:16,106 INFO [RESMonitor.run:115] Server vmware.mediaspot.local up 2 mins, 57 secs
2006-07-31 20:16:23,527 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: heartbeat|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local
2006-07-31 20:17:16,114 INFO [RESMonitor.run:115] Server vmware.mediaspot.local up 3 mins, 57 secs
2006-07-31 20:17:23,543 INFO [NotificationEventListener$WorkerThread.run:50] Event Notification: heartbeat|http://vmware.mediaspot.local/res/RESDispatcher|LISTEN|300|vmware|vmware.mediaspot.local|10.0.1 from host:vmware.mediaspot.local

Can you give me a workaround?

dkelly
Scalix
Scalix
Posts: 593
Joined: Thu Mar 18, 2004 2:03 pm

Postby dkelly » Mon Jul 31, 2006 8:01 pm

There's no workaround I can give.

Service temporarily unavailable should log something. If nothing is in the apache error_log file, check to see if you have selinux enabled. It should be disabled or permissive.

Cheers

Dave

alexpacio
Posts: 45
Joined: Mon Jul 31, 2006 6:33 am

Postby alexpacio » Tue Aug 01, 2006 5:53 am

I've got this error in the apache error log:

[error] [client 192.168.0.129] Directory index forbidden by rule: /var/www/html/

If you'll give me a workaround, I'll become a Scalix vendor in middle Italy...:wink:

Consulvation

Postby Consulvation » Thu Aug 10, 2006 11:49 pm

Hello - I am having a similar problem with the 503 error, however, I am running Fedora 4. I do not see any errors in the tomcat logs or the Apache logs. Please advise and let me know if you need me to post any logs.

Thanks!

-edit- in looking at the caa.log file, I found this:

Code: Select all

2006-08-10 18:19:41,967 ERROR [CAAConfigLoader.parseComponentNode:244] Service scalix.res, Component disabled has no class defined!


that repeats a few times, then there is a fatal error about an hour later:

Code: Select all

2006-08-10 19:05:15,703 FATAL [CAAInitializerManager.loadAllInitializers:58] Exception in initializer for scalix.res
java.net.BindException: Address already in use
   at java.net.PlainDatagramSocketImpl.bind0(Native Method)
   at java.net.PlainDatagramSocketImpl.bind(Unknown Source)
   at java.net.DatagramSocket.bind(Unknown Source)
   at java.net.DatagramSocket.<init>(Unknown Source)
   at java.net.DatagramSocket.<init>(Unknown Source)
   at java.net.DatagramSocket.<init>(Unknown Source)
   at com.scalix.sac.ubermgr.events.NotificationEventListener.<init>(NotificationEventListener.java:186)
   at com.scalix.sac.ubermgr.caa.RESInitializer.initNotificationListener(RESInitializer.java:213)
   at com.scalix.sac.ubermgr.caa.RESInitializer.init(RESInitializer.java:67)
   at com.scalix.caa.framework.CAAInitializerManager.loadAllInitializers(CAAInitializerManager.java:52)
   at com.scalix.caa.soap.SOAPDispatcherServlet.init(SOAPDispatcherServlet.java:114)
   at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
   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.addChildInternal(ContainerBase.java:823)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
   at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
   at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
   at org.apache.commons.digester.Rule.end(Rule.java:276)
   at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
   at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
   at org.apache.xerces.parsers.AbstractSAXParser.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.commons.digester.Digester.parse(Digester.java:1567)
   at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
   at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
   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)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)


can someone please translate / assist? :)

Consulvation

Postby Consulvation » Sat Aug 12, 2006 1:24 pm

-bump-

any ideas?

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Sun Aug 13, 2006 2:02 am

"address already in use" usually means that there you already have an instance of tomcat running on the same machine. You might want to check if you see a process using

Code: Select all

ps auxwww | grep java


If so, you must make sure that you only run 1 process.

This might also be caused by another, non-Scalix instance of Tomcat using one of the port numbers. We use Apache/Tomcat mod_jk standard port number 8009 for communication between Apache and Tomcat.

With Scalix not running, check

Code: Select all

lsof -i :8009


if anything is listening on that port.

Cheers,
Florian.
Florian von Kurnatowski, Die Harder!

browe

Postby browe » Tue Aug 15, 2006 2:08 pm

I've got the same issues...

florian, I tried both of your suggestions but to no avail...

Any other suggestions?

Waiting on your response,
Brandon

dkelly
Scalix
Scalix
Posts: 593
Joined: Thu Mar 18, 2004 2:03 pm

Postby dkelly » Tue Aug 15, 2006 2:58 pm

Is there anything logged in /etc/httpd/logs/mod_jk.log ?

Cheers

Dave

browe

Postby browe » Wed Aug 16, 2006 8:51 am

Yes actually there are quite a few errors stacked up in there. This is just a portion of the log file:

Code: Select all

[Tue Aug 15 09:43:31 2006] [error] init_jk::mod_jk.c (2356): Initializing shm:/etc/httpd/logs/jk-runtime-status errno=13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:40 2006] [info]  jk_open_socket::jk_connect.c (444): connect to 127.0.0.1:8009 failed with errno=13
[Tue Aug 15 09:43:40 2006] [info]  ajp_connect_to_endpoint::jk_ajp_common.c (889): Failed opening socket to (127.0.0.1:800
9) with (errno=13)
[Tue Aug 15 09:43:40 2006] [info]  ajp_send_request::jk_ajp_common.c (1248): Error connecting to the Tomcat process.
[Tue Aug 15 09:43:40 2006] [info]  ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed,  recoverable ope
ration attempt=1
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:32 2006] [error] jk_child_init::mod_jk.c (2312): Attachning shm:/etc/httpd/logs/jk-runtime-status errno=
13
[Tue Aug 15 09:43:40 2006] [info]  jk_open_socket::jk_connect.c (444): connect to 127.0.0.1:8009 failed with errno=13
[Tue Aug 15 09:43:40 2006] [info]  ajp_connect_to_endpoint::jk_ajp_common.c (889): Failed opening socket to (127.0.0.1:800
9) with (errno=13)
[Tue Aug 15 09:43:40 2006] [info]  ajp_send_request::jk_ajp_common.c (1248): Error connecting to the Tomcat process.
[Tue Aug 15 09:43:40 2006] [info]  ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed,  recoverable ope
ration attempt=1
[Tue Aug 15 09:43:40 2006] [info]  jk_open_socket::jk_connect.c (444): connect to 127.0.0.1:8009 failed with errno=13



So it looks like there is an error connecting to tomcat with mod_jk. I double checked that tomcat is running with

Code: Select all

ps aux | grep tomcat | more
That command spit out this line:

Code: Select all

root      2495  0.0  7.8 1266108 162000 ?      Sl   Aug15   0:52 /usr/java/jre1.5.0_04/bin/java -server -Djava.net.preferI
Pv4Stack=true -Xms1024m -Xmx1024m -Djava.endorsed.dirs=/opt/scalix-tomcat/common/endorsed -classpath /usr/java/jre1.5.0_04
/lib/tools.jar:/opt/scalix-tomcat/bin/bootstrap.jar:/opt/scalix-tomcat/bin/commons-logging-api.jar -Dcatalina.base=/opt/sc
alix-tomcat -Dcatalina.home=/opt/scalix-tomcat -Djava.io.tmpdir=/opt/scalix-tomcat/temp org.apache.catalina.startup.Bootst
rap start
root     14317  0.0  0.0   3756   692 pts/1    S+   08:46   0:00 grep tomcat


So the scalix-tomcat appears to be running... I'm at a loss, any suggestions?

Brandon

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Wed Aug 16, 2006 8:53 am

Can you check if Tomcat is listening on the AJP1.3/mod_jk connector port:

Code: Select all

lsof -i :8009


and, if not, post the contents of your /opt/scalix-tomcat/conf/server.xml config file?

Thx,
Florian.
Florian von Kurnatowski, Die Harder!

browe

Postby browe » Wed Aug 16, 2006 9:03 am

Code: Select all

COMMAND  PID USER   FD   TYPE DEVICE SIZE NODE NAME
java    2495 root   16u  IPv4   9150       TCP localhost.localdomain:8009 (LISTEN)


Here is the XML as well:

Code: Select all

<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
     parent-child relationships with each other -->

<!-- A "Server" is a singleton element that represents the entire JVM,
     which may contain one or more "Service" instances.  The Server
     listens for a shutdown command on the indicated port.

     Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" or "Loggers" at this level.
 -->

<Server port="8005" shutdown="SHUTDOWN" debug="0">


  <!-- Comment these entries out to disable JMX MBeans support -->
  <!-- You may also configure custom components (e.g. Valves/Realms) by
       including your own mbean-descriptor file(s), and setting the
       "descriptors" attribute to point to a ';' seperated list of paths
       (in the ClassLoader sense) of files to add to the default list.
       e.g. descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"
  -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"            debug="0"/>
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
            debug="0"/>

  <!-- Global JNDI resources -->
  <GlobalNamingResources>

    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>

    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved">
    </Resource>
    <ResourceParams name="UserDatabase">
      <parameter>
        <name>factory</name>
        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
      <parameter>
        <name>pathname</name>
        <value>conf/tomcat-users.xml</value>
      </parameter>
    </ResourceParams>

  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" (and therefore the web applications visible
       within that Container).  Normally, that Container is an "Engine",
       but this is not required.

       Note:  A "Service" is not itself a "Container", so you may not
       define subcomponents such as "Valves" or "Loggers" at this level.
   -->

  <!-- Define the Tomcat Stand-Alone Service -->
  <Service name="Catalina">

    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned.  Each Connector passes requests on to the
         associated "Container" (normally an Engine) for processing.

         By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
         You can also enable an SSL HTTP/1.1 Connector on port 8443 by
         following the instructions below and uncommenting the second Connector
         entry.  SSL support requires the following steps (see the SSL Config
         HOWTO in the Tomcat 5 documentation bundle for more detailed
         instructions):
         * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
           later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
         * Execute:
             %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
             $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
           with a password value of "changeit" for both the certificate and
           the keystore itself.

         By default, DNS lookups are enabled when a web application calls
         request.getRemoteHost().  This can have an adverse impact on
         performance, so you can disable it by setting the
         "enableLookups" attribute to "false".  When DNS lookups are disabled,
         request.getRemoteHost() will return the String version of the
         IP address of the remote client.
    -->

    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
<!-- DISABLED BY SCALIX INSTALLER
    <Connector port="8080"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />
     DISABLED BY SCALIX INSTALLER -->
    <!-- Note : To disable connection timeouts, set connectionTimeout value
     to 0 -->

        <!-- Note : To use gzip compression you could set the following properties :

                           compression="on"
                           compressionMinSize="2048"
                           noCompressionUserAgents="gozilla, traviata"
                           compressableMimeType="text/html,text/xml"
        -->

    <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
    <!--
    <Connector port="8443"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" disableUploadTimeout="true"
               acceptCount="100" debug="0" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
    -->

    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
               address="127.0.0.1"
               enableLookups="false" redirectPort="8443" debug="0"
               protocol="AJP/1.3" />

    <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
    <!-- See proxy documentation for more information about using this. -->
    <!--
    <Connector port="8082"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false"
               acceptCount="100" debug="0" connectionTimeout="20000"
               proxyPort="80" disableUploadTimeout="true" />
    -->

    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host). -->

    <!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :
    <Engine name="Standalone" defaultHost="localhost" debug="0" jvmRoute="jvm1">
    -->

    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost" debug="0">

      <!-- The request dumper valve dumps useful debugging information about
           the request headers and cookies that were received, and the response
           headers and cookies that were sent, for all requests received by
           this instance of Tomcat.  If you care only about requests to a
           particular virtual host, or a particular application, nest this
           element inside the corresponding <Host> or <Context> entry instead.

           For a similar mechanism that is portable to all Servlet 2.4
           containers, check out the "RequestDumperFilter" Filter in the
           example application (the source for this filter may be found in
           "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
           Request dumping is disabled by default.  Uncomment the following
           element to enable it. -->
      <!--      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
      -->
      <!-- Global logger unless overridden at lower levels -->
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"
              timestamp="true"/>
      <!-- Because this Realm is here, an instance will be shared globally -->
      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 debug="0" resourceName="UserDatabase"/>
      <!-- Comment out the old realm but leave here for now in case we
           need to go back quickly -->
      <!--
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
      -->
      <!-- Replace the above Realm with one of the following to get a Realm
           stored in a database and accessed via JDBC -->
      <!--
      <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
             driverName="org.gjt.mm.mysql.Driver"
          connectionURL="jdbc:mysql://localhost/authority"
         connectionName="test" connectionPassword="test"
              userTable="users" userNameCol="user_name" userCredCol="user_pass"
          userRoleTable="user_roles" roleNameCol="role_name" />
      -->
      <!--
      <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
             driverName="oracle.jdbc.driver.OracleDriver"
          connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
         connectionName="scott" connectionPassword="tiger"
              userTable="users" userNameCol="user_name" userCredCol="user_pass"
          userRoleTable="user_roles" roleNameCol="role_name" />
      -->
      <!--
      <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
             driverName="sun.jdbc.odbc.JdbcOdbcDriver"
          connectionURL="jdbc:odbc:CATALINA"
              userTable="users" userNameCol="user_name" userCredCol="user_pass"
          userRoleTable="user_roles" roleNameCol="role_name" />
      -->
      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

        <!-- Defines a cluster for this node,
             By defining this element, means that every manager will be changed.
             So when running a cluster, only make sure that you have webapps in there
             that need to be clustered and remove the other ones.
             A cluster has the following parameters:

             className = the fully qualified name of the cluster class

             name = a descriptive name for your cluster, can be anything
             debug = the debug level, higher means more output

             mcastAddr = the multicast address, has to be the same for all the nodes

             mcastPort = the multicast port, has to be the same for all the nodes

             mcastBindAddr = bind the multicast socket to a specific address

             mcastTTL = the multicast TTL if you want to limit your broadcast

             mcastSoTimeout = the multicast readtimeout

             mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat

             mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received

             tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amo
unt of threads as nodes

             tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
                                in case of multiple ethernet cards.
                                auto means that address becomes
                                InetAddress.getLocalHost().getHostAddress()

             tcpListenPort = the tcp listen port

             tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
                                  has a wakup bug in java.nio. Set to 0 for no timeout

             printToScreen = true means that managers will also print to std.out

             expireSessionsOnShutdown = true means that

             useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called
.
                            false means to replicate the session after each request.
                            false means that replication would work for the following piece of code:
                            <%
                            HashMap map = (HashMap)session.getAttribute("map");
                            map.put("key","value");
                            %>
             replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
                               * Pooled means that the replication happens using several sockets in a synchronous way. Ie,
 the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of
 sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tc
p threads that you have dealing with replication.
                               * Synchronous means that the thread that executes the request, is also the
                               thread the replicates the data to the other nodes, and will not return until all
                               nodes have received the information.
                               * Asynchronous means that there is a specific 'sender' thread for each cluster node,
                               so the request thread will queue the replication request into a "smart" queue,
                               and then return to the client.
                               The "smart" queue is a queue where when a session is added to the queue, and the same sessi
on
                               already exists in the queue from a previous request, that session will be replaced
                               in the queue instead of replicating two requests. This almost never happens, unless there i
s a
                               large network delay.
        -->
        <!--
            When configuring for clustering, you also add in a valve to catch all the requests
            coming in, at the end of the request, the session may or may not be replicated.
            A session is replicated if and only if all the conditions are met:
            1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
            2. a session exists (has been created)
            3. the request is not trapped by the "filter" attribute

            The filter attribute is to filter out requests that could not modify the session,
            hence we don't replicate the session after the end of this request.
            The filter is negative, ie, anything you put in the filter, you mean to filter out,
            ie, no replication will be done on requests that match one of the filters.
            The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
            filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
            ending with .gif and .js are intercepted.
            The deployer element can be used to deploy apps cluster wide.
            Currently the deployment only deploys/undeploys to working members in the cluster
            so no WARs are copied upons startup of a broken node.
            The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
            When a new war file is added the war gets deployed to the local instance,
            and then deployed to the other instances in the cluster.
            When a war file is deleted from the watchDir the war is undeployed locally
            and cluster wide
        -->
        <!--
        <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                 managerClassName="org.apache.catalina.cluster.session.DeltaManager"
                 expireSessionsOnShutdown="false"
                 useDirtyFlag="true">
            <Membership
                className="org.apache.catalina.cluster.mcast.McastService"
                mcastAddr="228.0.0.4"
                mcastPort="45564"
                mcastFrequency="500"
                mcastDropTime="3000"/>
            <Receiver
                className="org.apache.catalina.cluster.tcp.ReplicationListener"
                tcpListenAddress="auto"
                tcpListenPort="4001"
                tcpSelectorTimeout="100"
                tcpThreadCount="6"/>
            <Sender
                className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                replicationMode="pooled"/>
            <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
                   filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
            <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
                      tempDir="/tmp/war-temp/"
                      deployDir="/tmp/war-deploy/"
                      watchDir="/tmp/war-listen/"
                      watchEnabled="false"/>
        </Cluster>
        -->
        <!-- Normally, users must authenticate themselves to each web app
             individually.  Uncomment the following entry if you would like
             a user to be authenticated the first time they encounter a
             resource protected by a security constraint, and then have that
             user identity maintained across *all* web applications contained
             in this virtual host. -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn"
                   debug="0"/>
        -->
        <!-- Access log processes all requests for this virtual host.  By
             default, log files are created in the "logs" directory relative to
             $CATALINA_HOME.  If you wish, you can specify a different
             directory with the "directory" attribute.  Specify either a relative
             (to $CATALINA_HOME) or absolute path to the desired directory.
        -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="localhost_access_log." suffix=".txt"
                 pattern="common" resolveHosts="false"/>
        -->
        <!-- Logger shared by all Contexts related to this virtual host.  By
             default (when using FileLogger), log files are created in the "logs"
             directory relative to $CATALINA_HOME.  If you wish, you can specify
             a different directory with the "directory" attribute.  Specify either a
             relative (to $CATALINA_HOME) or absolute path to the desired
             directory.-->
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
            timestamp="true"/>
      </Host>
    </Engine>
  </Service>
</Server>

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Wed Aug 16, 2006 9:07 am

OK, that's the way it should be... looking at the log again - failed to connect, errno=13 (permission denied)...

could it be that you have SELinux running on this machine?

Thx,
Florian.
Florian von Kurnatowski, Die Harder!


Return to “Installation”



Who is online

Users browsing this forum: No registered users and 9 guests