André Warnier wrote:
Trying to provide some limited help peppered across your message..

<snip>


First I created a war file of the site pages using java -cvf exodus.war *

That was more likely "jar -cvf exodus.war *", right ?
Errr ... yes correct.

I then put the war file inside my webapps directory at /usr/opt/tomcat/webapps/ (this is the same directory for my default host)

Ok, so we assume your tomcat's CATALINA_HOME and CATALINA_BASE are both /usr/opt/tomcat, and below that you have directories like
- bin
- conf
- webapps
- logs
right ?
Correct.



I then restarted tomcat and it expanded the war file to create a directory under webapps called exodus In this new directory, there is a WEB-INF directory and a META-INF directory.

That looks ok so far.

I edited the web.xml file from inside WEB-INF to reflect the current server environment, which included the following:
   <context-param>
  <param-name>root</param-name>

.. etc..
that unfortunately is a part we cannot help you with, probably. It is a series of parameters specific to that "exodus" application which probably nobody here knows.

That comment extends all the way to
...

</paths> (Sorry if the above was not necessary to send but wanted to be thorough).


Yes well I do not know that much about this app either and truthfully, once I had tomcat set up I was expecting the developer to do this .... but .... you know how these things go.
My server.xml file was edited to look like this:

<?xml version='1.0' encoding='utf-8'?>

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

 <!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
 <Listener className="org.apache.catalina.core.JasperListener" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html --> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListen
er" />
<!-- <Listener className="org.apache.ajp.tomcat.config.ApacheConfig" modJk="/usr/local/apache2/modules/mod_jk.so" /> -->

 <!-- Global JNDI resources
      Documentation at /docs/jndi-resources-howto.html
 -->
 <GlobalNamingResources>
   <!-- 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"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
             pathname="conf/tomcat-users.xml" />
 </GlobalNamingResources>

 <Service name="Catalina">

   <Connector port="8080" protocol="HTTP/1.1"
              connectionTimeout="20000"
              redirectPort="8443" />

   <!-- Define an AJP 1.3 Connector on port 8009 -->
   <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


Note that, apparently, you only have an AJP connector listening on port 8009. You do not have one for port 8010.


   <Engine name="Catalina" defaultHost="localhost">
   <Host name="localhost" appBase="webapps"
         unpackWARs="true" autoDeploy="true"
             xmlValidation="false" xmlNamespaceAware="false">
       </Host>

   <Host name="exodus.zuka.net" appBase="webapps/exodus"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
   </Host>

So, are we to think that this server is known in DNS by the name "exodus.zuka.net" ?
Yes ... for now.


     <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
            resourceName="UserDatabase"/>

   </Engine>
 </Service>
</Server>

With this, I am wondering if I have the exodus directory in the right place as it crosses into the default host space.

My workers.properties file now looks like:

worker.list=rosewood,exodus

#
# Defining a worker named ajp13w and of type ajp13
# Note that the name and the type do not have to match.
#

worker.rosewood.type=ajp13
worker.rosewood.host=localhost
worker.rosewood.port=8009

worker.exodus.type=ajp13
worker.exodus.host=exodus.zuka.net

Here you should better say, also,
> worker.exodus.host=localhost


worker.exodus.port=8010

That is why I am surprised that there is no <Connector> for port 8010 in your server.xml. If we are talking all about the same single host, then you need to add it. Just copy the one for 8009 and change the port number.

Otherwise, the worker "exodus" won't be able to connect to Tomcat.

(In fact, if this is all on the same system, I think you can simplify this configuration, but let's first try and make this one work).


Again, this is all for now, but there will be more so I would like to prepare for this now, rather than later. I have changes the line to worker.exodus.host=localhost

I have then modified the apache conf and added:

JkMount /exodus/* exodus
JkUnMount  /images/* exodus


<snip>

Note however that "/images/*" does not match "/exodus/*", so what you really meant may have been :
JkUnMount /exodus/images/* exodus
Done.


(and of course that would mean that you do have a subdirectory /exodus/images/ under your Apache DocumentRoot, with presumably images in it. If that is not the case, then just comment out this JkUnMount and let those images be served by Tomcat also. (Because then you presumably have a directory /usr/opt/tomcat/webapps/exodus/images. Do you ?)
yes.


> So, what is currently happening when I go to the site is that, the
> index.jsp page gets rendered as text. I have added index.jsp as a
> default page in httpd.conf but it says to me that apache is NOT speaking
> to tomcat properly in this configuration. Hopefully someone can put me
> straight on this. And sorry for all the info but again, I wanted to make
> sure that I had showed all that I had done.

That, I do not really understand. But hopefully with the above you should be getting one step further.

Ok .. well I made these changes as you suggested but things are pretty much the same. Upon restarting tomcat, catalina.out shows the following:

Shutting down Razuna Tomcat:
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:       /usr/opt/jdk1.6.0_13
May 13, 2009 3:02:39 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
   at java.net.PlainSocketImpl.socketConnect(Native Method)
   at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
   at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
   at java.net.Socket.connect(Socket.java:519)
   at java.net.Socket.connect(Socket.java:469)
   at java.net.Socket.<init>(Socket.java:366)
   at java.net.Socket.<init>(Socket.java:180)
   at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:421)
   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:597)
   at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:337)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
done.
Starting Razuna Tomcat:
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:       /usr/opt/jdk1.6.0_13
done.




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

Reply via email to