You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by tukutela <ma...@gmail.com> on 2006/09/06 20:56:58 UTC
Cannot connect to MySQL
Hi guru's, some serious help needed.
I've been running a development environment on my laptop for the last few
weeks, and now the product is finished (basic website using MyFaces) I want
to promote to a production server. My dev environment consisted of:
- My laptop running Ubuntu 6.06
- Tomcat 5.5.17, MyFaces + Tomahawk
- An external server running MySQL 5.0 (port 3306)
I've SSH'd into the production server, and tested network connectivity to
port 3306, works perfectly. But when tomcat tries to connect to the server I
get the following error in the log file:
java.net.SocketException
MESSAGE: java.security.AccessControlException: access denied
(java.net.SocketPermission x.x.x.x:3306 connect,resolve)
STACKTRACE:
java.net.SocketException: java.security.AccessControlException: access
denied (java.net.SocketPermission x.x.x.x:3306 connect,resolve)
It's not enjoyable to watch I can assure you :) Anybody got any ideas?
--
View this message in context: http://www.nabble.com/Cannot-connect-to-MySQL-tf2228929.html#a6177625
Sent from the Tomcat - User forum at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Cannot connect to MySQL
Posted by David Smith <dn...@cornell.edu>.
Sounds like your /etc/init.d/tomcat5 startup script is doing more than
the standard service start script. Take a look at it for the security
options as well as maybe reading/copying config files from some where
else. Is you server set to run under high security?
--David
tukutela wrote:
> For testing at least, how can I turn the security manager off?
>
> I haven't used catalina.sh start -security
>
> I use the standard /etc/init.d/tomcat5 start method
>
> Also, I've added the grant permissions to the catalina.policy file, but
> every time I start up tomcat the file reverts to its standard and re-writes
> my edits?!?!!? Quite frustrating.
>
> Thanks for your help David, very much appreciated.
>
>
>
> David Smith-2 wrote:
>
>> You are running tomcat with the security manager enabled. You'll have
>> to update catalina.policy to allow the connection.
>>
>> --David
>>
>> tukutela wrote:
>>
>>> Hi guru's, some serious help needed.
>>>
>>> I've been running a development environment on my laptop for the last few
>>> weeks, and now the product is finished (basic website using MyFaces) I
>>> want
>>> to promote to a production server. My dev environment consisted of:
>>> - My laptop running Ubuntu 6.06
>>> - Tomcat 5.5.17, MyFaces + Tomahawk
>>> - An external server running MySQL 5.0 (port 3306)
>>>
>>> I've SSH'd into the production server, and tested network connectivity to
>>> port 3306, works perfectly. But when tomcat tries to connect to the
>>> server I
>>> get the following error in the log file:
>>> java.net.SocketException
>>> MESSAGE: java.security.AccessControlException: access denied
>>> (java.net.SocketPermission x.x.x.x:3306 connect,resolve)
>>>
>>> STACKTRACE:
>>>
>>> java.net.SocketException: java.security.AccessControlException: access
>>> denied (java.net.SocketPermission x.x.x.x:3306 connect,resolve)
>>>
>>> It's not enjoyable to watch I can assure you :) Anybody got any ideas?
>>>
>>>
>> --
>> David Smith
>> Network Operations Supervisor
>> Department of Entomology
>> Cornell University
>> 2132 Comstock Hall
>> Ithaca, NY 14853
>> Phone: (607) 255-9571
>> Fax: (607) 255-0940
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>
>
--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Cannot connect to MySQL
Posted by Carl Howells <ch...@janrain.com>.
A script in /etc is not the standard method to start tomcat. I'd guess
you're using debian, and used apt-get install tomcat? It sets up
several non-standard options, like enabling the security manager by
default. Either edit the /etc/init.d/tomcat5 script (it says where to
change it to turn off the security manager inside the script), or use a
different version (probably an official release) of tomcat.
tukutela wrote:
> For testing at least, how can I turn the security manager off?
>
> I haven't used catalina.sh start -security
>
> I use the standard /etc/init.d/tomcat5 start method
>
> Also, I've added the grant permissions to the catalina.policy file, but
> every time I start up tomcat the file reverts to its standard and re-writes
> my edits?!?!!? Quite frustrating.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Cannot connect to MySQL
Posted by tukutela <ma...@gmail.com>.
For testing at least, how can I turn the security manager off?
I haven't used catalina.sh start -security
I use the standard /etc/init.d/tomcat5 start method
Also, I've added the grant permissions to the catalina.policy file, but
every time I start up tomcat the file reverts to its standard and re-writes
my edits?!?!!? Quite frustrating.
Thanks for your help David, very much appreciated.
David Smith-2 wrote:
>
> You are running tomcat with the security manager enabled. You'll have
> to update catalina.policy to allow the connection.
>
> --David
>
> tukutela wrote:
>> Hi guru's, some serious help needed.
>>
>> I've been running a development environment on my laptop for the last few
>> weeks, and now the product is finished (basic website using MyFaces) I
>> want
>> to promote to a production server. My dev environment consisted of:
>> - My laptop running Ubuntu 6.06
>> - Tomcat 5.5.17, MyFaces + Tomahawk
>> - An external server running MySQL 5.0 (port 3306)
>>
>> I've SSH'd into the production server, and tested network connectivity to
>> port 3306, works perfectly. But when tomcat tries to connect to the
>> server I
>> get the following error in the log file:
>> java.net.SocketException
>> MESSAGE: java.security.AccessControlException: access denied
>> (java.net.SocketPermission x.x.x.x:3306 connect,resolve)
>>
>> STACKTRACE:
>>
>> java.net.SocketException: java.security.AccessControlException: access
>> denied (java.net.SocketPermission x.x.x.x:3306 connect,resolve)
>>
>> It's not enjoyable to watch I can assure you :) Anybody got any ideas?
>>
>
>
> --
> David Smith
> Network Operations Supervisor
> Department of Entomology
> Cornell University
> 2132 Comstock Hall
> Ithaca, NY 14853
> Phone: (607) 255-9571
> Fax: (607) 255-0940
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Cannot-connect-to-MySQL-tf2228929.html#a6177826
Sent from the Tomcat - User forum at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Cannot connect to MySQL
Posted by David Smith <dn...@cornell.edu>.
You are running tomcat with the security manager enabled. You'll have
to update catalina.policy to allow the connection.
--David
tukutela wrote:
> Hi guru's, some serious help needed.
>
> I've been running a development environment on my laptop for the last few
> weeks, and now the product is finished (basic website using MyFaces) I want
> to promote to a production server. My dev environment consisted of:
> - My laptop running Ubuntu 6.06
> - Tomcat 5.5.17, MyFaces + Tomahawk
> - An external server running MySQL 5.0 (port 3306)
>
> I've SSH'd into the production server, and tested network connectivity to
> port 3306, works perfectly. But when tomcat tries to connect to the server I
> get the following error in the log file:
> java.net.SocketException
> MESSAGE: java.security.AccessControlException: access denied
> (java.net.SocketPermission x.x.x.x:3306 connect,resolve)
>
> STACKTRACE:
>
> java.net.SocketException: java.security.AccessControlException: access
> denied (java.net.SocketPermission x.x.x.x:3306 connect,resolve)
>
> It's not enjoyable to watch I can assure you :) Anybody got any ideas?
>
--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org