You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Mast <jh...@gmail.com> on 2009/04/08 18:13:23 UTC

Installing Tomcat

I'm trying to get Tomcat 6 running on a RedHat box.

I don't want to build deamon with jsvc as the docs say I should do, at least
not yet.  Is this the extent of the official documentation for setting up
Tomcat on Linux?

I installed JDK 6 and Tomcat 6, defined JAVA_HOME and TOMCAT_HOME and setup
have a Host and Context in server.xml for www.mysite.com.  I invoke
catalina.sh start and get a process running, but I can't reach mysite.

I should say that apache httpd 2.0 is already running on this machine and my
www.mysite.com is reachable there, so I figured www.mysite.com:8080 would
take me to tomcat.  Is that a correct assumption? IE. Should I be able to by
httpd by tacking :8080 onto the url?

If I kill apache httpd (I have no intention of using it going forward), will
updating server.xml with port 80 rather than port 8080 automagically get
everything to work, or is there other stuff I need to do before Tomcat will
run as a standalone webserver?

thanks,

Re: Installing Tomcat

Posted by André Warnier <aw...@ice-sa.com>.
And have you

Seriously. Posted. Your. Server. Dot. XML. File. ?

Or should we guess ?

(at least post the sections which are uncommented and say
<Connector ...>


Jonathan Mast wrote:
> Has anyone figured out whats happening here?
> 
> On Thu, Apr 9, 2009 at 11:20 AM, Jonathan Mast
> <jh...@gmail.com>wrote:
> 
>> ok, here is the plain vanilla, immaculate server.xml, straight from a fresh
>> untarring of the tomcat 6 dist that i just re-installed, its still not
>> working.
>>
>> thanks
>>
>>
>> On Wed, Apr 8, 2009 at 6:28 PM, Christopher Schultz <
>> chris@christopherschultz.net> wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Jonathan,
>>>
>>> On 4/8/2009 1:29 PM, Jonathan Mast wrote:
>>>> Furthermore, I can tell you that "netstat -a" indicated no listener for
>>> port
>>>> 8080 and that that Catalina logs look ok.
>>> Seriously. Post. Your. Server. Dot. XML. File.
>>>
>>> - -chris
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.9 (MingW32)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>>
>>> iEYEARECAAYFAkndJQ8ACgkQ9CaO5/Lv0PC0dgCgmuaMEPpIUteUHtg8z0OUXLRV
>>> Y/UAoJeoGgajogSBhVoW01Rqwh1dS+up
>>> =xuuf
>>> -----END PGP SIGNATURE-----
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
> 


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


Re: Installing Tomcat

Posted by Jonathan Mast <jh...@gmail.com>.
Has anyone figured out whats happening here?

On Thu, Apr 9, 2009 at 11:20 AM, Jonathan Mast
<jh...@gmail.com>wrote:

> ok, here is the plain vanilla, immaculate server.xml, straight from a fresh
> untarring of the tomcat 6 dist that i just re-installed, its still not
> working.
>
> thanks
>
>
> On Wed, Apr 8, 2009 at 6:28 PM, Christopher Schultz <
> chris@christopherschultz.net> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Jonathan,
>>
>> On 4/8/2009 1:29 PM, Jonathan Mast wrote:
>> > Furthermore, I can tell you that "netstat -a" indicated no listener for
>> port
>> > 8080 and that that Catalina logs look ok.
>>
>> Seriously. Post. Your. Server. Dot. XML. File.
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAkndJQ8ACgkQ9CaO5/Lv0PC0dgCgmuaMEPpIUteUHtg8z0OUXLRV
>> Y/UAoJeoGgajogSBhVoW01Rqwh1dS+up
>> =xuuf
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>

Re: Installing Tomcat

Posted by Hassan Schroeder <ha...@gmail.com>.
On Tue, Apr 14, 2009 at 6:00 PM, Jonathan Mast
<jh...@gmail.com> wrote:

> I've pretty much concluded that the problem is that the machine in question
> is SELinux-enabled and that is cause of Tomcat's inability to access the
> 8080 port (even though I can see tomcat on the process list, a "netstat -a"
> indicates shows no entry for 8080).

sounds fixable...

> 1) Why not run Tomcat as root?  We have Tomcat running as root on our
> current setup (Httpd 1.3.33, Tomcat 5.5, JDK 1.4), I presume Tomcat 6 (JDK
> 1.6) running by itself must be more secure than our current situation.  Any
> comments?

Exposures are usually in apps; running any application with the
lowest possible privilege level reduces risk. But there's no law
against living dangerously -- we've probably all done it :-)

> 2) My problem with jsvc is multiple:

> c) really, if all this stuff is the "correct" way to run Tomcat on linux,
> why doesn't come as part of the distribution?

uhhh... it does. And I've never had to do more than ./configure and
make on any platform to get it going.

But as already pointed out -- run Tomcat on any non-privileged port
and connect it to port 80 with iptables.

> 4) I really want to avoid the complexity of httpd (see 2.a)

An easy goal to reach, luckily. :-)

FWIW,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

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


Re: Installing Tomcat

Posted by Hassan Schroeder <ha...@gmail.com>.
On Wed, Apr 15, 2009 at 10:49 AM, Jonathan Mast
<jh...@gmail.com> wrote:

> By Jakarta-Whatever, I'm referring to the commons-daemon package, as
> indicated on the setup page:
> <quote>
> Download a commons-daemon binary from the Jakarta Commons download page, and
> place jsvc.tar.gz and commons-daemon.jar in the $CATALINA_HOME/bin folder.
> </quote>

Well, I haven't looked at those docs in a while, but ...

> Why can't they even link to this project?

the tar file of jsvc source is included in the Tomcat bin directory...

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

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


Re: Installing Tomcat

Posted by Jonathan Mast <jh...@gmail.com>.
Yeah Selinux is a big pain from what I've read about it and I've given up on
the machine on which it runs.  As you may have guessed, I'm not in charge of
the tech department of a secret government spy agency ;-) so I'll leave
SELinux to the spooks who invented it.

I've found another box on which I can install a fresh linux dist.  Pondering
whether to use Slackware, Gentoo or Cent....

By Jakarta-Whatever, I'm referring to the commons-daemon package, as
indicated on the setup page:
<quote>
Download a commons-daemon binary from the Jakarta Commons download page, and
place jsvc.tar.gz and commons-daemon.jar in the $CATALINA_HOME/bin folder.
</quote>

Why can't they even link to this project?  I just wish the docs were more
detailed about why this kludgy trampoline is needed, there aren't any links
to the Jsvc project either!

No I'm not a big fan of C, C programming should be left to the hobbits who
develop the OS and who know all the magical incantations needed to use it
safely.

thanks

On Wed, Apr 15, 2009 at 1:12 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jonathan,
>
> On 4/14/2009 9:00 PM, Jonathan Mast wrote:
> > I've pretty much concluded that the problem is that the machine in
> question
> > is SELinux-enabled and that is cause of Tomcat's inability to access the
> > 8080 port (even though I can see tomcat on the process list, a "netstat
> -a"
> > indicates shows no entry for 8080).
>
> Ooooh... SELinux can be tough to deal with if you don't know what you're
> doing. It's /super/ restrictive, and rightly so. I would have expected
> an error message like "cannot bind to port 8080" in your catalina.out
> file if you really couldn't bind to port 8080, though.
>
> > 1) Why not run Tomcat as root?
>
> Security, security, security. There really is no need to run Tomcat as
> root, so why would you? If you have a misbehaving (or rogue) web
> application, it can really cause chaos if it's running as root. If you
> run it as a lowly common user, it can't do nearly so much damage. The
> same argument applies for not running MSIE on Windows as Administrator:
> if you get malware (and you /will/), you can't affect the machine's
> configuration, etc. unless you are an admin.
>
> > We have Tomcat running as root on our
> > current setup (Httpd 1.3.33, Tomcat 5.5, JDK 1.4), I presume Tomcat 6
> (JDK
> > 1.6) running by itself must be more secure than our current situation.
>  Any
> > comments?
>
> Yes, Tomcat alone should be more secure but there really is no reason to
> run Tomcat as root unless you are just really, really lazy. It's not
> that hard to run jsvc or set up iptables appropriately.
>
> > 2) My problem with jsvc is multiple:
> > a) it involves a language so evil it can only be referred to in
> paraphrase:
> > the letter between B and D.  Have you actually read the instructions for
> it?
>
> I must admit that I didn't download it and read the instructions, but
> the wep site says it pretty plain and simple:
>
> $ ./configure --with-java=/path/to/java
> $ make
>
> Oh! The horror!
>
> Have you ever built anything using C before? This is how much packages
> work, and they work really well using the 'configure' business.
>
> Okay, I broke down and downloaded it. Here are the instructions for
> building from the README file at the top-level of the tarball:
>
> "
>  cd src/native/unix; configure; make
> "
>
> The only problem with that is they forgot to include the "./" in front
> of 'configure' for those who don't have '.' in the search path (which is
> actually most people).
>
> It took somewhere in the neighborhood of 3 seconds to complete both the
> 'configure' and 'make' steps for me.
>
> > b) can't they even bother to link to the Jakarta-Whatever package that I
> > must now download and lug around? I mean c'mon ;-[
>
> What is Jakarta-Whatever? I don't see any dependencies of any kind, here.
>
> > c) really, if all this stuff is the "correct" way to run Tomcat on linux,
> > why doesn't come as part of the distribution?
>
> Because jsvc is someone else's project. I suppose Tomcat could bundle it
> into the distro, but they haven't chosen to do so. There are also lots
> of people who don't use it. For instance, I run Tomcat on non-privileged
> ports and use httpd to front it. So, bundling it would not help people
> like me at all (but certainly wouldn't hurt us).
>
> The biggest problem with this kind of bundling is the fact that *NIX
> systems are so varied in configuration that jsvc really must be built on
> each individual system (hence the super-simple 'configure/make'
> procedure above).
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAknmFXEACgkQ9CaO5/Lv0PDLKACeNOWfXcT6TbJp9dw5ThuG0qRS
> CwUAoK7/K6wv7FrmlpqGaMjYqIzlfHaG
> =mHxZ
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Installing Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan,

On 4/14/2009 9:00 PM, Jonathan Mast wrote:
> I've pretty much concluded that the problem is that the machine in question
> is SELinux-enabled and that is cause of Tomcat's inability to access the
> 8080 port (even though I can see tomcat on the process list, a "netstat -a"
> indicates shows no entry for 8080).

Ooooh... SELinux can be tough to deal with if you don't know what you're
doing. It's /super/ restrictive, and rightly so. I would have expected
an error message like "cannot bind to port 8080" in your catalina.out
file if you really couldn't bind to port 8080, though.

> 1) Why not run Tomcat as root?

Security, security, security. There really is no need to run Tomcat as
root, so why would you? If you have a misbehaving (or rogue) web
application, it can really cause chaos if it's running as root. If you
run it as a lowly common user, it can't do nearly so much damage. The
same argument applies for not running MSIE on Windows as Administrator:
if you get malware (and you /will/), you can't affect the machine's
configuration, etc. unless you are an admin.

> We have Tomcat running as root on our
> current setup (Httpd 1.3.33, Tomcat 5.5, JDK 1.4), I presume Tomcat 6 (JDK
> 1.6) running by itself must be more secure than our current situation.  Any
> comments?

Yes, Tomcat alone should be more secure but there really is no reason to
run Tomcat as root unless you are just really, really lazy. It's not
that hard to run jsvc or set up iptables appropriately.

> 2) My problem with jsvc is multiple:
> a) it involves a language so evil it can only be referred to in paraphrase:
> the letter between B and D.  Have you actually read the instructions for it?

I must admit that I didn't download it and read the instructions, but
the wep site says it pretty plain and simple:

$ ./configure --with-java=/path/to/java
$ make

Oh! The horror!

Have you ever built anything using C before? This is how much packages
work, and they work really well using the 'configure' business.

Okay, I broke down and downloaded it. Here are the instructions for
building from the README file at the top-level of the tarball:

"
  cd src/native/unix; configure; make
"

The only problem with that is they forgot to include the "./" in front
of 'configure' for those who don't have '.' in the search path (which is
actually most people).

It took somewhere in the neighborhood of 3 seconds to complete both the
'configure' and 'make' steps for me.

> b) can't they even bother to link to the Jakarta-Whatever package that I
> must now download and lug around? I mean c'mon ;-[

What is Jakarta-Whatever? I don't see any dependencies of any kind, here.

> c) really, if all this stuff is the "correct" way to run Tomcat on linux,
> why doesn't come as part of the distribution?

Because jsvc is someone else's project. I suppose Tomcat could bundle it
into the distro, but they haven't chosen to do so. There are also lots
of people who don't use it. For instance, I run Tomcat on non-privileged
ports and use httpd to front it. So, bundling it would not help people
like me at all (but certainly wouldn't hurt us).

The biggest problem with this kind of bundling is the fact that *NIX
systems are so varied in configuration that jsvc really must be built on
each individual system (hence the super-simple 'configure/make'
procedure above).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknmFXEACgkQ9CaO5/Lv0PDLKACeNOWfXcT6TbJp9dw5ThuG0qRS
CwUAoK7/K6wv7FrmlpqGaMjYqIzlfHaG
=mHxZ
-----END PGP SIGNATURE-----

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


Re: Installing Tomcat

Posted by Jonathan Mast <jh...@gmail.com>.
Hey Chris,

I've pretty much concluded that the problem is that the machine in question
is SELinux-enabled and that is cause of Tomcat's inability to access the
8080 port (even though I can see tomcat on the process list, a "netstat -a"
indicates shows no entry for 8080).

My ultimate goal was to just run Tomcat 6 (with JDK 1.6) on this machine but
I've given up on this particular machine for now.

But I have some questions/comments:

1) Why not run Tomcat as root?  We have Tomcat running as root on our
current setup (Httpd 1.3.33, Tomcat 5.5, JDK 1.4), I presume Tomcat 6 (JDK
1.6) running by itself must be more secure than our current situation.  Any
comments?

2) My problem with jsvc is multiple:
a) it involves a language so evil it can only be referred to in paraphrase:
the letter between B and D.  Have you actually read the instructions for it?
"If you're using BSD, issue 'make foo' being sure to type only with your
toes, if Linux, issue 'makeamess foo' with your nose as typing
implement...."
b) can't they even bother to link to the Jakarta-Whatever package that I
must now download and lug around? I mean c'mon ;-[
c) really, if all this stuff is the "correct" way to run Tomcat on linux,
why doesn't come as part of the distribution?

3) N/A
4) I really want to avoid the complexity of httpd (see 2.a)



On Fri, Apr 10, 2009 at 1:27 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jonathan,
>
> On 4/9/2009 11:20 AM, Jonathan Mast wrote:
> > ok, here is the plain vanilla, immaculate server.xml, straight from a
> > fresh untarring of the tomcat 6 dist that i just re-installed, its still
> > not working.
>
> I didn't realize you were using an unmodified configuration. My initial
> reaction is that you'll have to modify the default configuration in
> order to make it fit your needs.
>
> Here are the active connectors configured in the server.xml you posted:
>
> HTTP/1.1 connector on port 8080
> AJP/1.3 connector on port 8009
>
> > I should say that apache httpd 2.0 is already running on this machine and
> my
> > www.mysite.com is reachable there, so I figured www.mysite.com:8080would
> > take me to tomcat.  Is that a correct assumption? IE. Should I be able to
> by
> > httpd by tacking :8080 onto the url?
>
> Yes, going to http://www.mysite.com:8080/ should contact Tomcat, as long
> as your DNS resolution is working and there are no firewall issues.
>
> Tomcat may not start if something is already bound to port 8080, so you
> should make sure that Tomcat is starting correctly. See catalina.out for
> any messages to the contrary. catalina.out should be indicating which
> connectors are started when Tomcat starts up.
>
> > If I kill apache httpd (I have no intention of using it going forward),
> will
> > updating server.xml with port 80 rather than port 8080 automagically get
> > everything to work, or is there other stuff I need to do before Tomcat
> will
> > run as a standalone webserver?
>
> Running Tomcat on port 80 is problematic on *NIX systems unless you run
> Tomcat as root, which is not advised. See
> http://tomcat.apache.org/tomcat-6.0-doc/setup.html for some ideas for
> how to bind Tomcat to port 80 on *NIX. (This page shows information on
> jsvc). You can also use iptables to essentially do port-forwarding.
> Basically, your options on Linux are:
>
> 1. Run Tomcat as root (bad idea)
> 2. Use jsvc (you don't want to do this ... why?)
> 3. Use iptables to forward ports
> 4. Front Tomcat with something that can more easily bind to port 80
> (httpd, etc.)
>
> But to answer your question: yes, running on port 80 will preclude your
> users from having to specify the port number in the URL.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAknfgW4ACgkQ9CaO5/Lv0PAE9QCdHBcwNoRMneWvLB8uYbA9r+Jd
> X1sAni8Jkkzg6dXmxcdaa00QweaemJrS
> =peWX
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Installing Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan,

On 4/9/2009 11:20 AM, Jonathan Mast wrote:
> ok, here is the plain vanilla, immaculate server.xml, straight from a
> fresh untarring of the tomcat 6 dist that i just re-installed, its still
> not working.

I didn't realize you were using an unmodified configuration. My initial
reaction is that you'll have to modify the default configuration in
order to make it fit your needs.

Here are the active connectors configured in the server.xml you posted:

HTTP/1.1 connector on port 8080
AJP/1.3 connector on port 8009

> I should say that apache httpd 2.0 is already running on this machine and my
> www.mysite.com is reachable there, so I figured www.mysite.com:8080 would
> take me to tomcat.  Is that a correct assumption? IE. Should I be able to by
> httpd by tacking :8080 onto the url?

Yes, going to http://www.mysite.com:8080/ should contact Tomcat, as long
as your DNS resolution is working and there are no firewall issues.

Tomcat may not start if something is already bound to port 8080, so you
should make sure that Tomcat is starting correctly. See catalina.out for
any messages to the contrary. catalina.out should be indicating which
connectors are started when Tomcat starts up.

> If I kill apache httpd (I have no intention of using it going forward), will
> updating server.xml with port 80 rather than port 8080 automagically get
> everything to work, or is there other stuff I need to do before Tomcat will
> run as a standalone webserver?

Running Tomcat on port 80 is problematic on *NIX systems unless you run
Tomcat as root, which is not advised. See
http://tomcat.apache.org/tomcat-6.0-doc/setup.html for some ideas for
how to bind Tomcat to port 80 on *NIX. (This page shows information on
jsvc). You can also use iptables to essentially do port-forwarding.
Basically, your options on Linux are:

1. Run Tomcat as root (bad idea)
2. Use jsvc (you don't want to do this ... why?)
3. Use iptables to forward ports
4. Front Tomcat with something that can more easily bind to port 80
(httpd, etc.)

But to answer your question: yes, running on port 80 will preclude your
users from having to specify the port number in the URL.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknfgW4ACgkQ9CaO5/Lv0PAE9QCdHBcwNoRMneWvLB8uYbA9r+Jd
X1sAni8Jkkzg6dXmxcdaa00QweaemJrS
=peWX
-----END PGP SIGNATURE-----

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


Re: Installing Tomcat

Posted by Jonathan Mast <jh...@gmail.com>.
ok, here is the plain vanilla, immaculate server.xml, straight from a fresh
untarring of the tomcat 6 dist that i just re-installed, its still not
working.

thanks

On Wed, Apr 8, 2009 at 6:28 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jonathan,
>
> On 4/8/2009 1:29 PM, Jonathan Mast wrote:
> > Furthermore, I can tell you that "netstat -a" indicated no listener for
> port
> > 8080 and that that Catalina logs look ok.
>
> Seriously. Post. Your. Server. Dot. XML. File.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkndJQ8ACgkQ9CaO5/Lv0PC0dgCgmuaMEPpIUteUHtg8z0OUXLRV
> Y/UAoJeoGgajogSBhVoW01Rqwh1dS+up
> =xuuf
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Installing Tomcat

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan,

On 4/8/2009 1:29 PM, Jonathan Mast wrote:
> Furthermore, I can tell you that "netstat -a" indicated no listener for port
> 8080 and that that Catalina logs look ok.

Seriously. Post. Your. Server. Dot. XML. File.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkndJQ8ACgkQ9CaO5/Lv0PC0dgCgmuaMEPpIUteUHtg8z0OUXLRV
Y/UAoJeoGgajogSBhVoW01Rqwh1dS+up
=xuuf
-----END PGP SIGNATURE-----

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


Re: Installing Tomcat

Posted by Jonathan Mast <jh...@gmail.com>.
Is this: http://tomcat.apache.org/tomcat-6.0-doc/setup.html
the extent of the setup docs?

I'm reaching it by editing the hosts file on my windoze machine to resolve
all www.mysite.com requests back to an internal ip which is the machine in
question.

Tomcat is running as root or at least thats what "ps auxf" indicates.

I rolled back to the original server.xml, restarted Tomcat and I'm still
getting a "Failed to Establish Connection Error" in my browser for
www.mysite.com:8080.  But www.mysite.com is working.

Furthermore, I can tell you that "netstat -a" indicated no listener for port
8080 and that that Catalina logs look ok.

thanks,


On Wed, Apr 8, 2009 at 12:24 PM, Peter Crowther <Peter.Crowther@melandra.com
> wrote:

> > From: Jonathan Mast [mailto:jhmast.developer@gmail.com]
> > I'm trying to get Tomcat 6 running on a RedHat box.
> >
> > I don't want to build deamon with jsvc as the docs say I
> > should do, at least
> > not yet.  Is this the extent of the official documentation
> > for setting up Tomcat on Linux?
>
> You don't say what "this" is, so we can't help you.
>
> > I installed JDK 6 and Tomcat 6, defined JAVA_HOME and
> > TOMCAT_HOME and setup
> > have a Host and Context in server.xml for www.mysite.com.  I invoke
> > catalina.sh start and get a process running, but I can't reach mysite.
>
> *Exactly* how are you trying to reach it?  From what computer, and what are
> you trying as the address?  If it's www.mysite.com, have you changed your
> hosts file or DNS so that it points to your computer rather than off into
> the Internet?
>
> What happens if you browse to http://localhost:8080?
>
> > I should say that apache httpd 2.0 is already running on this
> > machine and my
> > www.mysite.com is reachable there, so I figured
> > www.mysite.com:8080 would
> > take me to tomcat.  Is that a correct assumption? IE. Should
> > I be able to by httpd by tacking :8080 onto the url?
>
> If you still have a default server.xml, this should work.  However, you've
> changed your server.xml.  You haven't bothered to post your new one, so we
> can't tell whether this would work or not.
>
> > If I kill apache httpd (I have no intention of using it going
> > forward), will
> > updating server.xml with port 80 rather than port 8080
> > automagically get
> > everything to work, or is there other stuff I need to do
> > before Tomcat will
> > run as a standalone webserver?
>
> With the default server.xml, simply changing 8080 to 80 (and ensuring the
> process at least starts as root, which is why jsvc is so important) will be
> all you need to do.  With your server.xml?  Nobody on the list will have any
> idea.
>
> Give us some more information, please - we're not psychic!
>
>                - Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Installing Tomcat

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Jonathan Mast [mailto:jhmast.developer@gmail.com]
> I'm trying to get Tomcat 6 running on a RedHat box.
>
> I don't want to build deamon with jsvc as the docs say I
> should do, at least
> not yet.  Is this the extent of the official documentation
> for setting up Tomcat on Linux?

You don't say what "this" is, so we can't help you.

> I installed JDK 6 and Tomcat 6, defined JAVA_HOME and
> TOMCAT_HOME and setup
> have a Host and Context in server.xml for www.mysite.com.  I invoke
> catalina.sh start and get a process running, but I can't reach mysite.

*Exactly* how are you trying to reach it?  From what computer, and what are you trying as the address?  If it's www.mysite.com, have you changed your hosts file or DNS so that it points to your computer rather than off into the Internet?

What happens if you browse to http://localhost:8080?

> I should say that apache httpd 2.0 is already running on this
> machine and my
> www.mysite.com is reachable there, so I figured
> www.mysite.com:8080 would
> take me to tomcat.  Is that a correct assumption? IE. Should
> I be able to by httpd by tacking :8080 onto the url?

If you still have a default server.xml, this should work.  However, you've changed your server.xml.  You haven't bothered to post your new one, so we can't tell whether this would work or not.

> If I kill apache httpd (I have no intention of using it going
> forward), will
> updating server.xml with port 80 rather than port 8080
> automagically get
> everything to work, or is there other stuff I need to do
> before Tomcat will
> run as a standalone webserver?

With the default server.xml, simply changing 8080 to 80 (and ensuring the process at least starts as root, which is why jsvc is so important) will be all you need to do.  With your server.xml?  Nobody on the list will have any idea.

Give us some more information, please - we're not psychic!

                - Peter

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