You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sels Wannes <Wa...@cronos.be> on 2005/04/07 12:49:40 UTC

Mod_proxy problems

Hi,

I'm using Apache 2 & Tomcat 5.0 . Below is relevant info from the config files:

Tomcat server.xml
-----------------
<Connector port="8080"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               debug="0" connectionTimeout="20000" 
               disableUploadTimeout="true"
		proxyName="http://www.publicwebserver.com/tomcat/"
		proxyPort="80" />

Apache httpd.conf
-----------------
#Simple proxy for tomcat
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyRequests on
ProxyVia On

<Proxy *>
	Order deny,allow
	Allow from all
</Proxy>

ProxyPass         /tomcat  http://localhost:8080
ProxyPassReverse  /tomcat  http://localhost:8080

------------------------------------------------

I've got a few problems with this setup:
-I can only get to the tomcat root, not to any webapp beyond the root
-Tomcat seems to ignore the proxyName and use http://www.publicwebserver.com , because of this the images on the tomcat root page fail to load.


Can any one see what I'm doing wrong? Or should I rather ask this question on the Apache list?


Kind Regards,
 
Wannes Sels


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


Re: problem configuring context resource in Tomcat 5.0 for mysql connector/j

Posted by ju...@house-keeping.com.
Doug,

You are a saint! I had set the wrong ip address set for the mysql user. I feel a
little stupid for overlooking this.

It reminded of a problem I encountered when I first started working - could not
figure out why I could not get onto the company network, tried everything!
Turned out the cable had not been plugged in correctly!!

Many thanks, my friend.

Carl.




Quoting Parsons Technical Services <pa...@earthlink.net>:

> You need to setup the user in the database. If you log into the database and
> switch to the mysql database. The do a select * from users you will see the
> users are defined with either localhost, %, or an IP. You will need to have
> the javauser setup to use the % (anywhere) or better the IP of the Tomcat
> machine.
>
> OR the user does not have rights to the database you are trying to access.
>
> Doug
>
>
> ----- Original Message -----
> From: <ju...@house-keeping.com>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, April 07, 2005 7:58 AM
> Subject: problem configuring context resource in Tomcat 5.0 for mysql
> connector/j
>
>
> >
> >
> > Im having problems with setting up a database connection pool with mysql
> > connector/j.
> >
> > I follow the example code in the how-twos. My problem is that Tomcat seems
> > to
> > pickup my resource and its parameters (kind of)! I would like to connect
> > to a
> > database that is not on localhost. So in the url paremeter I use:
> >
> >    <parameter>
> >      <name>url</name>
> >
> > <value>jdbc:mysql://<IP_Address>:3306/javatest?autoReconnect=true</value>
> >    </parameter>
> >
> >
> >
> > However, when I run the test example I get:
> >
> > Access denied for user: 'javauser@<Tomcat_Machine_IP_address>' (Using
> > password:
> > YES)
> >
> > When I replace the IP address with duff text ie. "blahblah" I then get the
> > error
> > that blahblah is a n unknownhost exception, which I expect.
> >
> > This is driving me bonkers and I bet its something simple, I just cant see
> > it!!!!
> >
> > I have been reading many articles on the net and I have tried a variety of
> > combinations but to no success! Arrhh!
> >
> > Setup;
> >
> > 1) Im using the mysql connector/j drivers
> > 2) Using Tomcat 5.0
> > 3) On windows XP (Dev!) which will be deployed to redhat eventually!
> > 4) Using the example on the Tomcat website, I moved the context out of:
> > CATALINA_HOME\conf\server.xml to:
> > CATALINA_HOME\conf\Catalina\localhost\DBTest.xml it behaves the same in
> > both
> > cases.
> >
> >
> > Many thanks in advance.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>




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


Re: problem configuring context resource in Tomcat 5.0 for mysql connector/j

Posted by Parsons Technical Services <pa...@earthlink.net>.
You need to setup the user in the database. If you log into the database and 
switch to the mysql database. The do a select * from users you will see the 
users are defined with either localhost, %, or an IP. You will need to have 
the javauser setup to use the % (anywhere) or better the IP of the Tomcat 
machine.

OR the user does not have rights to the database you are trying to access.

Doug


----- Original Message ----- 
From: <ju...@house-keeping.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, April 07, 2005 7:58 AM
Subject: problem configuring context resource in Tomcat 5.0 for mysql 
connector/j


>
>
> Im having problems with setting up a database connection pool with mysql
> connector/j.
>
> I follow the example code in the how-twos. My problem is that Tomcat seems 
> to
> pickup my resource and its parameters (kind of)! I would like to connect 
> to a
> database that is not on localhost. So in the url paremeter I use:
>
>    <parameter>
>      <name>url</name>
> 
> <value>jdbc:mysql://<IP_Address>:3306/javatest?autoReconnect=true</value>
>    </parameter>
>
>
>
> However, when I run the test example I get:
>
> Access denied for user: 'javauser@<Tomcat_Machine_IP_address>' (Using 
> password:
> YES)
>
> When I replace the IP address with duff text ie. "blahblah" I then get the 
> error
> that blahblah is a n unknownhost exception, which I expect.
>
> This is driving me bonkers and I bet its something simple, I just cant see
> it!!!!
>
> I have been reading many articles on the net and I have tried a variety of
> combinations but to no success! Arrhh!
>
> Setup;
>
> 1) Im using the mysql connector/j drivers
> 2) Using Tomcat 5.0
> 3) On windows XP (Dev!) which will be deployed to redhat eventually!
> 4) Using the example on the Tomcat website, I moved the context out of:
> CATALINA_HOME\conf\server.xml to:
> CATALINA_HOME\conf\Catalina\localhost\DBTest.xml it behaves the same in 
> both
> cases.
>
>
> Many thanks in advance.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> 



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


problem configuring context resource in Tomcat 5.0 for mysql connector/j

Posted by ju...@house-keeping.com.

Im having problems with setting up a database connection pool with mysql
connector/j.

I follow the example code in the how-twos. My problem is that Tomcat seems to
pickup my resource and its parameters (kind of)! I would like to connect to a
database that is not on localhost. So in the url paremeter I use:

    <parameter>
      <name>url</name>
      <value>jdbc:mysql://<IP_Address>:3306/javatest?autoReconnect=true</value>
    </parameter>



However, when I run the test example I get:

Access denied for user: 'javauser@<Tomcat_Machine_IP_address>' (Using password:
YES)

When I replace the IP address with duff text ie. "blahblah" I then get the error
that blahblah is a n unknownhost exception, which I expect.

This is driving me bonkers and I bet its something simple, I just cant see
it!!!!

I have been reading many articles on the net and I have tried a variety of
combinations but to no success! Arrhh!

Setup;

1) Im using the mysql connector/j drivers
2) Using Tomcat 5.0
3) On windows XP (Dev!) which will be deployed to redhat eventually!
4) Using the example on the Tomcat website, I moved the context out of:
CATALINA_HOME\conf\server.xml to:
CATALINA_HOME\conf\Catalina\localhost\DBTest.xml it behaves the same in both
cases.


Many thanks in advance.

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