Re: General errors in virtual host setup

2009-05-14 Thread André Warnier

Dave,

from the whole collection of recent messages, it very much looks to me 
as if you are effectively trying to run 2 Tomcats on this machine, and 
that they somehow conflict in terms of ports, maybe in terms of which 
applications they run, etc..
A while ago, you mentioned another server, for flash stuff.  Are you 
sure that this program is itsef not based on Tomcat for example ?
It may also be that you are trying to start the same Tomcat code twice, 
with different parameters (this is a technical possibility).


I don't know exactly what to tell you, but it seems that some things 
don't make sense otherwise.
In any case, the Connectors that you have activated in the server.xml, 
do not seem to match the ports that are really open for listening.


Maybe you should have a look at the ps and netstat options on your 
system, and proceed calmly and one bit at a time to find out what is 
running and using which ports.

Something like :
- turn off Apache
- turn off Tomcat
- turn off the other application supposedly using port 8088
Then do a
netstat -pan | grep LISTEN
(or maybe with -o as Chuck mentioned)
and save the result (keeping only the tcp-related lines)

Then turn on Apache, and do the same netstat command, and compare the 
result.  Any additional LISTEN port is probably Apache.

Save the result again.
- turn off Apache, and turn on the flash application
Do a netstat again and compare to the first one.
Etc...

When you have identified ports that really seem to belong to one or the 
other process consistently, then it is possible, with the appropriate 
options of netstat and ps, to find out which program is really running, 
that uses these ports.



The basic principle is this : it is not possible for two distinct 
processes (Tomcat, Apache, other app), to both have the same port open 
for listening (that's what the grep LISTEN is about above).
The first one that opens the port wins, and the second one trying to 
open the same port will get an error of the kind cannot bind.. port 
already in use (and that program will generally then refuse to even 
start)(but not necessarily; depending on the program, it may still run, 
in some cramped way; but Tomcat will probably not).


It may be that you installed Tomcat once, then de-installed it, then 
re-installed it in a new location but without removing first everything 
from the first one, etc.. or something of the kind.
I don't now exactly what is going on, but something is at the moment not 
clear, and it makes it almost impossible to help you, because when you 
access a given URL on a given port, we don't even know what process is 
really answering (or not).




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



Re: General errors in virtual host setup

2009-05-14 Thread André Warnier

Dave Filchak wrote:
...


The site root is in /web/exodus.zuka.net/docs. I have added a ROOT 
directory to this. I have moved my exodus.war file into this ROOT 
directory. When I restart tomcat, the WAR file is not unpacked. I have 
verified the site by creating an index.htm file and then changing it 
to an index.jsp file and both work. Not sure why the WAR is not being 
unpacked and deployed. Here is what I currently have for a configuration:



About the ROOT etc..

suppose you have a simple Tomcat, listening on port 8080, with just one 
Host with one appBase directory (webapps), and the following file 
structure :

TOMCAT-INSTALL-DIR ( = CATALINA_HOME) :
- bin
- conf
- log
- webapps

   /ROOT
  stuff1
  WEB-INF/
web.xml
  META-INF/
context.xml

   /exodus
  stuff2
  WEB-INF/
web.xml
  META-INF/
context.xml

(the META-INF part is optional)

then you have 2 applications :
- the ROOT application, which is the *default* application.  This is the 
application that users get when they request a URL like :

http://server.company.com:8080/
- the exodus application. This is the application that users get when 
they request a URL like

http://server.company.com:8080/exodus/

You can make the exodus application be the default one, so that users 
will get the exodus application when they enter the URL

http://server.company.com:8080/

For that, you would :
- remove the current webapps/ROOT directory and all its content
- rename the directory webapps/exodus to webapps/ROOT

Note that, in that case, there would *not* be a exodus subdirectory 
under webapps/ROOT.  Your exodus directory has now become ROOT.


Similarly, if you want to deploy your application from a war-file and 
have this application be the default application, then you have to do 
the following :
- create your war-file by taking the *content* of the current exodus 
directory (not including the directory exodus itself, only its content)

- name this war-file ROOT.war
- drop this war-file ROOT.war directly in your Tomcat's webapps directory.
Tomcat will then unpack it, create the webapps/ROOT directory and its 
content, and your application will be the default application, and users 
will access it via

http://server.company.com:8080/

So, in summary, your application will be
- *either* the default application, deployed under webapps/ROOT, by 
dropping a file called ROOT.war directly into the webapps/ directory, 
and will be accessed via

http://server.company.com:8080/
- *or* the exodus application, deployed under webapps/exodus, by 
dropping a file called exodus.war directly into the webapps/ directory, 
and will be accessed via

http://server.company.com:8080/exodus

but not both.




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



RE: General errors in virtual host setup

2009-05-14 Thread Caldarale, Charles R
 From: Dave Filchak [mailto:sub...@zuka.net]
 Subject: Re: General errors in virtual host setup
 
 I can now connect to my default site as long as I add the port into the
 url. However, I have changed the port to 8081 and the connector port to
 8010. I did this because when I did a netstat -o, there were about 50
 connections in a CLOSE_WAIT state to port 8009. Now, when I restart
 tomcat I do not get any errors.

As André said, indicative that you have a second Tomcat running on this box.  
You need to find it, stop it, and delete it.

 The site root is in /web/exodus.zuka.net/docs. I have added a ROOT
 directory to this. I have moved my exodus.war file into this ROOT
 directory.

To summarize André: that's wrong.  Your .war file *must* be named ROOT.war and 
be placed in the /web/exodus.zuka.net/docs directory.  

 See anything I have screwed up?

See above.  You're not following the instructions given to you.

 - 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



Re: General errors in virtual host setup

2009-05-14 Thread Dave Filchak

Caldarale, Charles R wrote:

From: Dave Filchak [mailto:sub...@zuka.net]
Subject: Re: General errors in virtual host setup

I can now connect to my default site as long as I add the port into the
url. However, I have changed the port to 8081 and the connector port to
8010. I did this because when I did a netstat -o, there were about 50
connections in a CLOSE_WAIT state to port 8009. Now, when I restart
tomcat I do not get any errors.



As André said, indicative that you have a second Tomcat running on this box.  
You need to find it, stop it, and delete it.
  
Can I just kill all java pids and then restart the version of tomcat I 
know I installed?
  

The site root is in /web/exodus.zuka.net/docs. I have added a ROOT
directory to this. I have moved my exodus.war file into this ROOT
directory.



To summarize André: that's wrong.  Your .war file *must* be named ROOT.war and be placed in the /web/exodus.zuka.net/docs directory.  

  

See anything I have screwed up?



See above.  You're not following the instructions given to you.
  
Sorry Charles ... I don't remember being told that it had to be named 
ROOT.war. My bad I guess. I had read instructions for creating a war 
file and this was not mentioned. Is there an ultimate difference between 
deploying a WAR file and simply copying all of the needed files to a 
ROOT directory inside the appBase?

snip

  

Dave

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



RE: General errors in virtual host setup

2009-05-14 Thread Caldarale, Charles R
 From: Dave Filchak [mailto:sub...@zuka.net]
 Subject: Re: General errors in virtual host setup
 
 Can I just kill all java pids and then restart the version of tomcat I
 know I installed?

Yes, but if there's an /etc/init.d script for the one you don't want, it will 
restart when the system is rebooted.  You need to do a bit more work to find it 
and remove it.

 Is there an ultimate difference between deploying a WAR file 
 and simply copying all of the needed files to a ROOT directory
 inside the appBase?

If the .war file is named ROOT.war and located in the appBase directory, those 
are functionally identical.  (The name of the .war file or directory is the URL 
path to the webapp, with ROOT serving as a synonym for .)  Packaging as a 
.war just makes transporting the webapp easier; keeping it as an expanded 
directory makes updating pieces easier during development.

 - 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



Re: General errors in virtual host setup

2009-05-14 Thread Dave Filchak

André Warnier wrote:

Dave,

from the whole collection of recent messages, it very much looks to me 
as if you are effectively trying to run 2 Tomcats on this machine, and 
that they somehow conflict in terms of ports, maybe in terms of which 
applications they run, etc..
A while ago, you mentioned another server, for flash stuff.  Are you 
sure that this program is itsef not based on Tomcat for example ?
It may also be that you are trying to start the same Tomcat code 
twice, with different parameters (this is a technical possibility).


I don't know exactly what to tell you, but it seems that some things 
don't make sense otherwise.
In any case, the Connectors that you have activated in the server.xml, 
do not seem to match the ports that are really open for listening.


Maybe you should have a look at the ps and netstat options on your 
system, and proceed calmly and one bit at a time to find out what is 
running and using which ports.

Something like :
- turn off Apache
- turn off Tomcat
- turn off the other application supposedly using port 8088
Then do a
netstat -pan | grep LISTEN
(or maybe with -o as Chuck mentioned)
and save the result (keeping only the tcp-related lines)

Then turn on Apache, and do the same netstat command, and compare the 
result.  Any additional LISTEN port is probably Apache.

Save the result again.
- turn off Apache, and turn on the flash application
Do a netstat again and compare to the first one.
Etc...

When you have identified ports that really seem to belong to one or 
the other process consistently, then it is possible, with the 
appropriate options of netstat and ps, to find out which program is 
really running, that uses these ports.



The basic principle is this : it is not possible for two distinct 
processes (Tomcat, Apache, other app), to both have the same port open 
for listening (that's what the grep LISTEN is about above).
The first one that opens the port wins, and the second one trying to 
open the same port will get an error of the kind cannot bind.. port 
already in use (and that program will generally then refuse to even 
start)(but not necessarily; depending on the program, it may still 
run, in some cramped way; but Tomcat will probably not).


It may be that you installed Tomcat once, then de-installed it, then 
re-installed it in a new location but without removing first 
everything from the first one, etc.. or something of the kind.
I don't now exactly what is going on, but something is at the moment 
not clear, and it makes it almost impossible to help you, because when 
you access a given URL on a given port, we don't even know what 
process is really answering (or not).


OK, here is my report in response to all of this.

I shut down tomcat, red5 and apache. Issued a killall java (a couple of 
times)

Issued the command netstat -pan | grep LISTEN | grep tcp
Verified that none of the ports that I expect (in relation to this 
problem I am having) were showing up.
Started apache and ran the command again and correctly saw httpd show up 
listening on port 80 and 443.

shutdown apache
started red5 and show it show up on ports 8088 and 5080 (note these are 
not interfering with tomcat.)

killed red5 and started tomcat
Lo and behold, there were all my ports I expect for tomcat: 8081, 8005, 
8010, 8011

Started apache and still everything looked fine.
Finally, started red5 and still all looks correct. Now my site/app works 
again (well the web portion of it at least)


So, it appears to me that the server was just sort of holding on to old 
connections that were getting in the way of each other. Probably not a 
good description but that is what it looks like. All those CLOSE_WAIT 
connections on 8009 have now disappeared as well.


So I suppose this is a good step forward ... yes?

Dave



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



RE: General errors in virtual host setup

2009-05-14 Thread Caldarale, Charles R
 From: Dave Filchak [mailto:sub...@zuka.net]
 Subject: Re: General errors in virtual host setup
 
 So I suppose this is a good step forward ... yes?

Yes, but as we mentioned before, the problem may come back on the next reboot.  
It wouldn't surprise me at all that there's some other Tomcat installed on that 
box, and it's started automatically upon boot.  You should be able to test that 
by rebooting and running netstat; if those ports suddenly become active again, 
you'll need to track down the rogue Tomcat and permanently disable it 
(terminate with extreme prejudice, as they say).

 - 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



Re: General errors in virtual host setup

2009-05-13 Thread André Warnier

Trying to provide some limited help peppered across your message..

Dave Filchak wrote:
A few days ago, a number of you helped me get tomcat up and running with 
the example files shipped with the default install of tomcat. Just as a 
reminder, I am on CentOS 5.4/64 bit system using jdk1.6.1_13, apache 
tomcat 6.0.18.


I was going through this exercise because I was given a tomcat based 
site to host for the next while. Having never dealt with tomcat before, 
with the help of a few members of this list, I managed to get tomcat 
running. So then I came to the task of getting this site going. So, here 
is what I did an I hope if anyone sees anything off base (likely) they 
will point it out to me.


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


That was more likely jar -cvf exodus.war *, right ?

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 ?



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-nameroot/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).





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=2
  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 ?




 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 

Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

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-nameroot/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=2
  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/* 

Re: General errors in virtual host setup

2009-05-13 Thread André Warnier

Something doesn't square :


this :

Dave Filchak wrote:


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.




and this :


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.



So, where that /usr/opt/tomcat coming from ?
Where /is/ tomcat installed ? starting at /usr/opt/tomcat, or at 
/opt/tomcat ?  or are these two symlinked somehow ?



And what is this ?
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)
etc..

What is this Tomcat trying to connect to ?


Speparately :

According to your server.xml file, this Tomcat has a Connector set up 
for port 8080, through which you could access it directly.


So, what happens when you point your browser at
http://exodus.zuka.net:8080/exodus

and at
http://exodus.zuka.net:8080/exodus/something.html
(replace something.html by the name of a html document that is really in 
your webapps/exodus/ directory)


and at :
http://exodus.zuka.net:8080/exodus/images/someimage.gif
(replace by an image that exists there)




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



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

André Warnier wrote:

Something doesn't square :


this :

Dave Filchak wrote:


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.




and this :


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.



So, where that /usr/opt/tomcat coming from ?
Where /is/ tomcat installed ? starting at /usr/opt/tomcat, or at 
/opt/tomcat ?  or are these two symlinked somehow ?
Yes .. the actual path is /usr/opt/tomcat but the is a symlink on the 
root which makes it /opt/tomcat



And what is this ?
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)
etc..

What is this Tomcat trying to connect to ?

I do not know. This only started after I added this second domain.



Speparately :

According to your server.xml file, this Tomcat has a Connector set 
up for port 8080, through which you could access it directly.


So, what happens when you point your browser at
http://exodus.zuka.net:8080/exodus

This times out


and at
http://exodus.zuka.net:8080/exodus/something.html
(replace something.html by the name of a html document that is really 
in your webapps/exodus/ directory)

This times out as well


and at :
http://exodus.zuka.net:8080/exodus/images/someimage.gif
(replace by an image that exists there)

as does this.

Dave

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



Re: General errors in virtual host setup

2009-05-13 Thread André Warnier

Dave Filchak wrote:

André Warnier wrote:

Something doesn't square :


this :

Dave Filchak wrote:


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.




and this :


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.



So, where that /usr/opt/tomcat coming from ?
Where /is/ tomcat installed ? starting at /usr/opt/tomcat, or at 
/opt/tomcat ?  or are these two symlinked somehow ?
Yes .. the actual path is /usr/opt/tomcat but the is a symlink on the 
root which makes it /opt/tomcat



And what is this ?
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)
etc..

What is this Tomcat trying to connect to ?

I do not know. This only started after I added this second domain.



Speparately :

According to your server.xml file, this Tomcat has a Connector set 
up for port 8080, through which you could access it directly.


So, what happens when you point your browser at
http://exodus.zuka.net:8080/exodus

This times out


and at
http://exodus.zuka.net:8080/exodus/something.html
(replace something.html by the name of a html document that is really 
in your webapps/exodus/ directory)

This times out as well


and at :
http://exodus.zuka.net:8080/exodus/images/someimage.gif
(replace by an image that exists there)

as does this.


Allright.
There is something really strange going on.
Can you, from some command window it does not matter where, do
nslookup exodus.zuka.net
and check if the IP address that comes as a response is really this same 
host we are talking about ?

(you can check the current host's IP addresses with
ifconfig -a
)

Then, just for completion, start Tomcat and then do
netstat -an | grep LISTEN
and paste the output here


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



RE: General errors in virtual host setup

2009-05-13 Thread Caldarale, Charles R
 From: Dave Filchak [mailto:sub...@zuka.net]
 Subject: General errors in virtual host setup
 
 This reflected the paths in the new server.

It's generally bad form for a webapp to know where it's deployed, indicating 
some degree of laziness or ignorance on the part of the webapp developer.  
However, you're probably stuck with it.

   baseRoot/usr/opt/tomcat/webapps/exodus/baseRoot

Don't know what exodus expects here; a file system path, or a URL path?  The 
former would be unusual.  You'll need to consult whatever doc you have for 
exodus to verify correctness.

 systemLogFolder/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/
 /systemLogFolder

It's really, really bad form to write into the webapps directory; you need to 
move the logging area to somewhere else.

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

Yes, that's a problem; the two should not overlap.  Do you really need two 
Host elements?  (I suspect not.)  Regardless, setting appBase to 
webapps/exodus cannot be correct.

1) Do you expect to be hosting more domains in the future?

2) Do you want the exodus webapp to be the default webapp for exodus.zuka.net?

3) Do you need the existing Tomcat webapps to be available under 
exodus.zuka.net (or available at all)?

Your setup will vary depending on the answers to the above.

 - 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



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

André Warnier wrote:

Dave Filchak wrote:

André Warnier wrote:

Something doesn't square :


this :

Dave Filchak wrote:


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.




and this :


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.



So, where that /usr/opt/tomcat coming from ?
Where /is/ tomcat installed ? starting at /usr/opt/tomcat, or at 
/opt/tomcat ?  or are these two symlinked somehow ?
Yes .. the actual path is /usr/opt/tomcat but the is a symlink on the 
root which makes it /opt/tomcat



And what is this ?
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)
etc..

What is this Tomcat trying to connect to ?

I do not know. This only started after I added this second domain.



Speparately :

According to your server.xml file, this Tomcat has a Connector set 
up for port 8080, through which you could access it directly.


So, what happens when you point your browser at
http://exodus.zuka.net:8080/exodus

This times out


and at
http://exodus.zuka.net:8080/exodus/something.html
(replace something.html by the name of a html document that is 
really in your webapps/exodus/ directory)

This times out as well


and at :
http://exodus.zuka.net:8080/exodus/images/someimage.gif
(replace by an image that exists there)

as does this.


Allright.
There is something really strange going on.
Can you, from some command window it does not matter where, do
nslookup exodus.zuka.net
and check if the IP address that comes as a response is really this 
same host we are talking about ?

Is correct yes.

(you can check the current host's IP addresses with
ifconfig -a
)


This is also correct.

Then, just for completion, start Tomcat and then do
netstat -an | grep LISTEN
and paste the output here

netstat -an | grep LISTEN
tcp0  0 0.0.0.0:32768   
0.0.0.0:*   LISTEN 
tcp0  0 127.0.0.1:11553 
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:993 
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:2401
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:995 
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:199 
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:425 
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:3306
0.0.0.0:*   LISTEN 
tcp0  0 127.0.0.1:3310  
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:110 
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:143 
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:111 
0.0.0.0:*   LISTEN 
tcp0  0 66.207.212.58:80
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:465 
0.0.0.0:*   LISTEN 
tcp0  0 66.207.212.58:53
0.0.0.0:*   LISTEN 
tcp0  0 127.0.0.1:53
0.0.0.0:*   LISTEN 
tcp0  0 127.0.0.1:631   
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:25  
0.0.0.0:*   LISTEN 
tcp0  0 127.0.0.1:953   
0.0.0.0:*   LISTEN 
tcp0  0 0.0.0.0:443 
0.0.0.0:*   LISTEN 
tcp0  0 :::8009 
:::*LISTEN 
tcp0  0 :::127.0.0.1:5005   
:::*LISTEN 
tcp0  0 :::1935 
:::*LISTEN 
tcp0  0 :::8080 
:::*LISTEN 
tcp0  0 :::1936 
:::*LISTEN 
tcp0  0 :::21   
:::*LISTEN 
tcp0  0 :::22   
:::*LISTEN 
tcp0  0 :::66.207.212.58:5080   
:::*LISTEN 
tcp0  0 :::8088 
:::*LISTEN 
unix  2  [ ACC ] STREAM LISTENING 6567   
/usr/local/var/run/dovecot/auth-worker.3050
unix  2  [ ACC ] STREAM LISTENING 6561   

Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

Caldarale, Charles R wrote:

From: Dave Filchak [mailto:sub...@zuka.net]
Subject: General errors in virtual host setup

This reflected the paths in the new server.



It's generally bad form for a webapp to know where it's deployed, indicating 
some degree of laziness or ignorance on the part of the webapp developer.  
However, you're probably stuck with it.

  

  baseRoot/usr/opt/tomcat/webapps/exodus/baseRoot


I think so ... yes.


Don't know what exodus expects here; a file system path, or a URL path?  The 
former would be unusual.  You'll need to consult whatever doc you have for 
exodus to verify correctness.
  
If I had real documentation ... that would be good but I really do not. 
At least from a back-end point of view.
  

systemLogFolder/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/
/systemLogFolder



It's really, really bad form to write into the webapps directory; you need to 
move the logging area to somewhere else.
  

Can I simply change the path?
  

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



Yes, that's a problem; the two should not overlap.  Do you really need two 
Host elements?  (I suspect not.)  Regardless, setting appBase to 
webapps/exodus cannot be correct.

1) Do you expect to be hosting more domains in the future?
  

It is probable.

2) Do you want the exodus webapp to be the default webapp for exodus.zuka.net?
  
It will be the default app but the way the domain is now will be 
changed. Right now, this is just a staging site.

3) Do you need the existing Tomcat webapps to be available under 
exodus.zuka.net (or available at all)?
  
At this point, to the best of my knowledge, I will only need the exodus 
app available under exodus.zuka.net (as well as under the proper domain 
name when we are ready). The apps that are available currently (if it 
was working) are simply the example apps that come with the install of 
Tomcat. These, after all is said and done do not need to be available 
except for perhaps the manager app.

Your setup will vary depending on the answers to the above.


Dave



  



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



Re: General errors in virtual host setup

2009-05-13 Thread André Warnier

Dave Filchak wrote:


netstat -an | grep LISTEN

tcp0  0 66.207.212.58:800.0.0.0:* 
LISTEN


Apache, listening on just one IP address ?

tcp0  0 :::8009 :::* 
LISTEN


Ok, that seems to be the first AJP connector

tcp0  0 :::8080 :::* 
LISTEN


The Tomcat HTTP connector ..

tcp0  0 :::8088 :::* 
LISTEN


What is that one ?



No 8010 port listen?


Indeed, strange.
There is also port 8005 missing, which should be the Tomcat shutdown 
connector.

Server port=8005 shutdown=SHUTDOWN

Where is it ?

Are we really talking about the same host and same Tomcat here ?



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



Re: General errors in virtual host setup

2009-05-13 Thread André Warnier
By the way, the missing 8005 listening port probably explains this 
previous exception :


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)

I believe that the way Tomcat gets stopped, is by connecting to its own 
port 8005 and sending the magic command.



I'm almost tempted to say : scratch this Tomcat, re-install it fresh 
with just the examples, let's make sure it works and opens all ports it 
should, test an example app, and then let's re-add the exodus app 
carefully and in the right place.


And then check if that one works through port 8080, and then let's 
configure the mod_jk bit.



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



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

André Warnier wrote:

Dave Filchak wrote:


netstat -an | grep LISTEN


tcp0  0 66.207.212.58:800.0.0.0:* LISTEN

Apache, listening on just one IP address ?

tcp0  0 :::8009 :::* LISTEN

Ok, that seems to be the first AJP connector

tcp0  0 :::8080 :::* LISTEN

The Tomcat HTTP connector ..

tcp0  0 :::8088 :::* LISTEN

What is that one ?
If you are referring to the port 8088, we have a Flash media app running 
on this server using Red5 and believe it uses this port.




No 8010 port listen?


Indeed, strange.
There is also port 8005 missing, which should be the Tomcat shutdown 
connector.

Server port=8005 shutdown=SHUTDOWN

Where is it ?

I see it here:

tcp0  0 :::127.0.0.1:5005   
:::*LISTEN


Are we really talking about the same host and same Tomcat here ?

Absolutely.




-
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: General errors in virtual host setup

2009-05-13 Thread André Warnier

Dave Filchak wrote:
When I ran the url and said that it timed out ... what it actually 
eventually popped up was:


Bad Gateway

The proxy server received an invalid response from an upstream server.

Maybe this gives us a hint?


To me, it just makes it even more confusing.
;-)

Please confirm, that you really added the port :8080 in the URL when you 
did those tests.


Nevertheless, we're still missing a couple of listening ports here..
That is nowhere close to normal.
You should have :
- port 8005 (the Tomcat shurdown port)
- port 8080 (Tomcat's HTTP connector)
- port 8009 (first configured AJP connector)
- port 8010 (second configured AJP connector)
8005 and 8010 aren't there in the netstat, so where are they ?

Is the Tomcat log saying anything about these ?

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



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

snip




Indeed, strange.
There is also port 8005 missing, which should be the Tomcat shutdown 
connector.

Server port=8005 shutdown=SHUTDOWN

Where is it ?

I see it here:



Sorry ... ignore this comment. At one point in the past we had changed 
this port as part of an attempt at better security. I just did not read 
close enough
tcp0  0 :::127.0.0.1:5005   
:::*LISTEN


snip



-
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: General errors in virtual host setup

2009-05-13 Thread Dave Filchak
When I ran the url and said that it timed out ... what it actually 
eventually popped up was:


Bad Gateway

The proxy server received an invalid response from an upstream server.

Maybe this gives us a hint?

Dave

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



Re: General errors in virtual host setup

2009-05-13 Thread André Warnier

Dave Filchak wrote:

André Warnier wrote:

Dave Filchak wrote:


netstat -an | grep LISTEN


tcp0  0 66.207.212.58:800.0.0.0:* LISTEN

Apache, listening on just one IP address ?

tcp0  0 :::8009 :::* LISTEN

Ok, that seems to be the first AJP connector

tcp0  0 :::8080 :::* LISTEN

The Tomcat HTTP connector ..

tcp0  0 :::8088 :::* LISTEN

What is that one ?
If you are referring to the port 8088, we have a Flash media app running 
on this server using Red5 and believe it uses this port.




No 8010 port listen?


Indeed, strange.
There is also port 8005 missing, which should be the Tomcat shutdown 
connector.

Server port=8005 shutdown=SHUTDOWN

Where is it ?

I see it here:

tcp0  0 :::127.0.0.1:5005   
:::*LISTEN



Nope. That's 5005, not 8005 as per your server.xml.




Are we really talking about the same host and same Tomcat here ?

Absolutely.




-
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: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

André Warnier wrote:

Dave Filchak wrote:
When I ran the url and said that it timed out ... what it actually 
eventually popped up was:


Bad Gateway

The proxy server received an invalid response from an upstream server.

Maybe this gives us a hint?


To me, it just makes it even more confusing.
;-)

Please confirm, that you really added the port :8080 in the URL when 
you did those tests.
Sorry for the delay. Had to step away for a bit. yes I did at the port 
during the test.


Nevertheless, we're still missing a couple of listening ports here..
That is nowhere close to normal.
You should have :
- port 8005 (the Tomcat shurdown port)
- port 8080 (Tomcat's HTTP connector)
- port 8009 (first configured AJP connector)
- port 8010 (second configured AJP connector)
8005 and 8010 aren't there in the netstat, so where are they ?

Is the Tomcat log saying anything about these ?

Well this:

SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: 
java.net.BindExc

eption: Address already in usenull:8080

Does each host or app need to be on a different port as well?

Dave



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



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

Caldarale, Charles R wrote:

snip

O.k., then leave the extra Host element there.  However, redefine its appBase to be 
somewhere else; it doesn't have to be under the Tomcat directory tree, and it *must not* be 
under any other Host appBase.

  

2) Do you want the exodus webapp to be the default webapp
for exodus.zuka.net?
  

It will be the default app but the way the domain is now will be
changed. Right now, this is just a staging site.



Regardless, you might as well get it right from the beginning.  Whatever location you 
choose for the exodus.zuka.net Host appBase, place the exodus app in a 
directory named ROOT (case sensitive) underneath that, rather than a directory named 
exodus.
  
OK .. I have moved it into our web directory at 
/web/exodus.zuka.net/docs/ROOT/

snip

Do you have a Context element for the exodus app?  If so, please post it (or 
provide a pointer if you already did and I missed it).
  

Humm ... I have found this in the WEB-INF folder:

context-param
  param-namexmlprops/param-name
!--
  
param-value/opt/tomcat/webapps/exodus/WEB-INF/conf/environment.xml/para

m-value
--
  
param-value/usr/opt/tomcat/webapps/exodus/WEB-INF/conf/environment.xml/

param-value
  description
 Used to find path to local XML props file.
  /description
/context-param

I do not see a context.xml file anywhere. They used to be kept in the 
server.xml file ... did they not?


Dave



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

André Warnier wrote:

Dave Filchak wrote:
When I ran the url and said that it timed out ... what it actually 
eventually popped up was:


Bad Gateway

The proxy server received an invalid response from an upstream server.

Maybe this gives us a hint?


To me, it just makes it even more confusing.
;-)

Please confirm, that you really added the port :8080 in the URL when 
you did those tests.


Nevertheless, we're still missing a couple of listening ports here..
That is nowhere close to normal.
You should have :
- port 8005 (the Tomcat shurdown port)
- port 8080 (Tomcat's HTTP connector)
- port 8009 (first configured AJP connector)
- port 8010 (second configured AJP connector)
8005 and 8010 aren't there in the netstat, so where are they ?

Is the Tomcat log saying anything about these ?

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


No chance that these missing ports are caused by the firewall? These are 
all internal ... yes?


Dave

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



RE: General errors in virtual host setup

2009-05-13 Thread Caldarale, Charles R
 From: Dave Filchak [mailto:sub...@zuka.net]
 Subject: Re: General errors in virtual host setup
 
 OK .. I have moved it into our web directory at
 /web/exodus.zuka.net/docs/ROOT/

And what did you set the exodus.zuka.net Host appBase to?  It should be 
/web/exodus.zuka.net/docs.

 Humm ... I have found this in the WEB-INF folder:

No, a Context element would be in the webapp's META-INF/context.xml file, if 
it exists.  You need a Context element primarily if the webapp uses database 
connections that you want Tomcat to manage.  (There are other more esoteric 
reasons, of course.)

 I do not see a context.xml file anywhere. They used to be kept in the
 server.xml file ... did they not?

In old versions of Tomcat, Context elements had to be in server.xml; one of 
the improvements made a few years ago was to move Context elements to the 
webapp (or alternatively, to conf/Catalina/[host]/[appName].xml).

 - 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



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

Caldarale, Charles R wrote:

From: Dave Filchak [mailto:sub...@zuka.net]
Subject: Re: General errors in virtual host setup

OK .. I have moved it into our web directory at
/web/exodus.zuka.net/docs/ROOT/



And what did you set the exodus.zuka.net Host appBase to?  It should be 
/web/exodus.zuka.net/docs.

  

That is correct.

Humm ... I have found this in the WEB-INF folder:



No, a Context element would be in the webapp's META-INF/context.xml file, if it 
exists.  You need a Context element primarily if the webapp uses database 
connections that you want Tomcat to manage.  (There are other more esoteric reasons, of 
course.)

  
Well the exodus app does use a database but the connection stuff is in 
an environment.xml file.

snip


Dave



  



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



RE: General errors in virtual host setup

2009-05-13 Thread Caldarale, Charles R
 From: Dave Filchak [mailto:sub...@zuka.net]
 Subject: Re: General errors in virtual host setup
 
 SEVERE: Catalina.start
 LifecycleException:  Protocol handler initialization failed:
 java.net.BindException: Address already in usenull:8080

This looks like you already have a Tomcat instance running, using a default 
Tomcat config.  This will prevent your desired Tomcat from ever starting.  The 
-o option on netstat will show the PID associated with the port, and you should 
be able to use that to find out where that process is running from.

 Does each host or app need to be on a different port as well?

No, the Connector elements apply to all Hosts within a Service/Engine 
pair.

 - 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



RE: General errors in virtual host setup

2009-05-13 Thread Caldarale, Charles R
 From: Dave Filchak [mailto:sub...@zuka.net]
 Subject: Re: General errors in virtual host setup
 
 Well the exodus app does use a database but the connection stuff 
 is in an environment.xml file.

Then exodus must be managing its own connections.  You likely do not need a 
Context element for that webapp.

 - 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



RE: General errors in virtual host setup

2009-05-13 Thread Caldarale, Charles R
 From: Dave Filchak [mailto:sub...@zuka.net]
 Subject: Re: General errors in virtual host setup
 
 No chance that these missing ports are caused by the firewall?

Not likely; they should still show up in netstat.

 These are all internal ... yes?

No - only the shutdown port is internal (127.0.0.1); all the others are 
normally for 0.0.0.0, meaning they are active on all IP addresses configured 
for the system.

 - 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



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

Dave Filchak wrote:

André Warnier wrote:

Dave Filchak wrote:
When I ran the url and said that it timed out ... what it actually 
eventually popped up was:


Bad Gateway

The proxy server received an invalid response from an upstream server.

Maybe this gives us a hint?


To me, it just makes it even more confusing.
;-)

Please confirm, that you really added the port :8080 in the URL when 
you did those tests.
Sorry for the delay. Had to step away for a bit. yes I did at the port 
during the test.


Nevertheless, we're still missing a couple of listening ports here..
That is nowhere close to normal.
You should have :
- port 8005 (the Tomcat shurdown port)
- port 8080 (Tomcat's HTTP connector)
- port 8009 (first configured AJP connector)
- port 8010 (second configured AJP connector)
8005 and 8010 aren't there in the netstat, so where are they ?

Is the Tomcat log saying anything about these ?

Well this:

SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: 
java.net.BindExc

eption: Address already in usenull:8080

Does each host or app need to be on a different port as well?

Dave


When I run just a plain netstat, I get a ton of connections on port 8009 
and 8080. I now have nothing working. Including the default stuff I had 
running two days ago. Grrrhh!!!


Dave

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



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak
I am going to step away from this for about an hour to get a break and 
something to eat.


Just a bit before I do: tomcat was installed as a service and when I 
restart the service, I get these errors. However, when I go to 
/opt/tomcat/bin/shutdown.sh and then startup.sh, I do not appear to get 
an error.


Dave

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



Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

Dave Filchak wrote:
I am going to step away from this for about an hour to get a break and 
something to eat.


Just a bit before I do: tomcat was installed as a service and when I 
restart the service, I get these errors. However, when I go to 
/opt/tomcat/bin/shutdown.sh and then startup.sh, I do not appear to 
get an error.


Dave

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


OK .. back and have made SOME progress.

I can now connect to my default site as long as I add the port into the 
url. However, I have changed the port to 8081 and the connector port to 
8010. I did this because when I did a netstat -o, there were about 50 
connections in a CLOSE_WAIT state to port 8009. Now, when I restart 
tomcat I do not get any errors.


So, after fiddling with this, I can now properly connect to the default 
site and view the Tomcat homepage and then connect to the jsp and 
servlet examples and all seems fine. So now I moved on to the actual 
application.


The site root is in /web/exodus.zuka.net/docs. I have added a ROOT 
directory to this. I have moved my exodus.war file into this ROOT 
directory. When I restart tomcat, the WAR file is not unpacked. I have 
verified the site by creating an index.htm file and then changing it to 
an index.jsp file and both work. Not sure why the WAR is not being 
unpacked and deployed. Here is what I currently have for a configuration:


HTTPD

ServerName exodus.zuka.net
   ServerAdmin webad...@zuka.net
   DocumentRoot /web/exodus.zuka.net/docs/ROOT/
   Directory /web/exodus.zuka.net/docs/
Options none
AllowOverride None
Order allow,deny
allow from all
   /Directory
   ErrorLog logs/exodus.errors
   ScriptAlias /cgi-bin/ /web/cgi/exodus.zuka.net
   CustomLog logs/exodus.access combined
   JkMount /* exodus
   JkUnMount  /images/* exodus

workers.properties

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=8010

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

Server port=8005 shutdown=SHUTDOWN

 !--APR library loader. Documentation at /docs/apr.html --
 Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngi

ne=on /
 !--Initialize Jasper prior to webapps are loaded. Documentation at 
/docs/j

asper-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.GlobalResourcesLifecycleLis

tener /
 !-- 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=8081 protocol=HTTP/1.1
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false acceptCount=100
  connectionTimeout=2 debug=0
  redirectPort=8443 disableUploadTimeout=true /

   !-- Define an AJP 1.3 Connector on port 8011 --
   Connector port=8011 protocol=AJP/1.3 redirectPort=8443 /
   !-- Define an AJP 1.3 Connector on port 8010 --
   Connector port=8010 protocol=AJP/1.3 redirectPort=8443 /


   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=/web/exodus.zuka.net/docs/
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
   /Host

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

   /Engine
 /Service
/Server

See anything I have screwed up?

Dave




Re: General errors in virtual host setup

2009-05-13 Thread Dave Filchak

Dave Filchak wrote:

Dave Filchak wrote:
I am going to step away from this for about an hour to get a break 
and something to eat.


Just a bit before I do: tomcat was installed as a service and when I 
restart the service, I get these errors. However, when I go to 
/opt/tomcat/bin/shutdown.sh and then startup.sh, I do not appear to 
get an error.


Dave

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


OK .. back and have made SOME progress.

I can now connect to my default site as long as I add the port into 
the url. However, I have changed the port to 8081 and the connector 
port to 8010. I did this because when I did a netstat -o, there were 
about 50 connections in a CLOSE_WAIT state to port 8009. Now, when I 
restart tomcat I do not get any errors.


So, after fiddling with this, I can now properly connect to the 
default site and view the Tomcat homepage and then connect to the jsp 
and servlet examples and all seems fine. So now I moved on to the 
actual application.


The site root is in /web/exodus.zuka.net/docs. I have added a ROOT 
directory to this. I have moved my exodus.war file into this ROOT 
directory. When I restart tomcat, the WAR file is not unpacked. I have 
verified the site by creating an index.htm file and then changing it 
to an index.jsp file and both work. Not sure why the WAR is not being 
unpacked and deployed. Here is what I currently have for a configuration:


HTTPD

ServerName exodus.zuka.net
   ServerAdmin webad...@zuka.net
   DocumentRoot /web/exodus.zuka.net/docs/ROOT/
   Directory /web/exodus.zuka.net/docs/
Options none
AllowOverride None
Order allow,deny
allow from all
   /Directory
   ErrorLog logs/exodus.errors
   ScriptAlias /cgi-bin/ /web/cgi/exodus.zuka.net
   CustomLog logs/exodus.access combined
   JkMount /* exodus
   JkUnMount  /images/* exodus

workers.properties

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=8010

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

Server port=8005 shutdown=SHUTDOWN

 !--APR library loader. Documentation at /docs/apr.html --
 Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngi

ne=on /
 !--Initialize Jasper prior to webapps are loaded. Documentation at 
/docs/j

asper-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.GlobalResourcesLifecycleLis

tener /
 !-- 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=8081 protocol=HTTP/1.1
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false acceptCount=100
  connectionTimeout=2 debug=0
  redirectPort=8443 disableUploadTimeout=true /

   !-- Define an AJP 1.3 Connector on port 8011 --
   Connector port=8011 protocol=AJP/1.3 redirectPort=8443 /
   !-- Define an AJP 1.3 Connector on port 8010 --
   Connector port=8010 protocol=AJP/1.3 redirectPort=8443 /


   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=/web/exodus.zuka.net/docs/
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
   /Host

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

   /Engine
 /Service
/Server

So, while I can see the index.htm or index.jsp page when I go to exodus, 
I think it might be simply a function of how apache is set up and not 
because tomcat is actually connecting and rendering. I tried copying the 
manager directory into /web/exodus.zuka.net/docs and then also into 
/web/exodus.zuka.net/docs/ROOT but I cannot connect to the manager app. 
So not sure it is really functioning.


Dave