Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-21 Thread Ambrose Krapacs
On Nov 20, 2008, at 10:30 , Christopher Schultz wrote: Len is absolutely right: the exception is being thrown by MySQL, so it's their error message. Was there a root cause printed with this stack trace? That certainly would have helped. I checked the source for Connector/J 5.1.6 and that

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-21 Thread Ambrose Krapacs
On Nov 20, 2008, at 10:15 , Christopher Schultz wrote: SecurityManagers are such a pain in the ass IMO. If you're writing your own applications and deploying them yourself, I say give up on the SecurityManager because you're not protecting yourself from anyone but yourself. SecurityManagers

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-20 Thread André Warnier
Krapacs Ambrose wrote: Well I thought that I had tried turning off the security manager but I couldn't remember how I did it. I tried again by modifying /etc/init.d/tomcat and set TOMCAT_SECURITY to no. I executed the JSP again and EVERY TEST SUCCESSFULLY CONNECTED! Wow, finally! So now I

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-20 Thread Krapacs Ambrose
On Nov 20, 2008, at 5:16 , André Warnier wrote: So, you see, in the end it was a TCP/IP connection issue. But it was not at the level of your MySQL server, but at the source : your JVM would not let your webapp do a connect to that port. Now here comes a complication : finding where in

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-20 Thread André Warnier
Krapacs Ambrose wrote: [...] I have to say that I do not think Tomcat is doing the right thing in this particular situation. There should be some sort of security exception being thrown indicating that the socket connection was being block by tomcat's security manager. Indeed. I was a bit

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-20 Thread Len Popp
On Thu, Nov 20, 2008 at 07:37, Krapacs Ambrose [EMAIL PROTECTED] wrote: I have to say that I do not think Tomcat is doing the right thing in this particular situation. There should be some sort of security exception being thrown indicating that the socket connection was being block by tomcat's

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Krapacs, Krapacs Ambrose wrote: I have to say that I do not think Tomcat is doing the right thing in this particular situation. There should be some sort of security exception being thrown indicating that the socket connection was being block by

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Christopher Schultz wrote: There was (from your original post): com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Steps to reproduce this conclusion: 1. Turn off brain. 2. Open mouth. Sorry about

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-19 Thread Ambrose Krapacs
On Nov 18, 2008, at 7:58 , David Smith wrote: Can you post your database config and code snippet for accessing the db? Obfuscate the username/password info. One immediate observation is the JDBC url should have the name of the database you are trying to access like this:

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-19 Thread Ambrose Krapacs
On Nov 18, 2008, at 7:37 , André Warnier wrote: Krapacs Ambrose wrote: I have tried many different configurations and I have been unable to get my Servlets / JSP to connect to MySQL server running. I am trying to get this set up on my main server which is running Ubuntu 8.10 Server with

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-19 Thread Ambrose Krapacs
To: users@tomcat.apache.org Subject: Servlets / JSP can't connect to MySQL in Ubuntu Server I have tried many different configurations and I have been unable to get my Servlets / JSP to connect to MySQL server running. I am trying to get this set up on my main server which is running Ubuntu 8.10

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-19 Thread David Smith
If you have command line access on the system, can you test your MySQL connectivity by connecting this way?: mysql -u inventory -h localhost -p The -h option forces mysql command to connect via TCP/IP instead of unix sockets. --David Ambrose Krapacs wrote: On Nov 18, 2008, at 7:58 , David

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-19 Thread André Warnier
Ambrose Krapacs wrote: [...] I have tried using telnet to connect to port 3306 and it does appear that the server is listening because it refuses the telnet connection. Well, that would tend to indicate exactly the opposite : either MySQL is *not* listening on that port, or something is

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-19 Thread Ambrose Krapacs
On Nov 19, 2008, at 11:13 , David Smith wrote: If you have command line access on the system, can you test your MySQL connectivity by connecting this way?: mysql -u inventory -h localhost -p The -h option forces mysql command to connect via TCP/IP instead of unix sockets. --David Yes I

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ambrose, Ambrose Krapacs wrote: catch( Exception e ) { retVal = e.toString(); } And this gives you CommunicationLinkFailure for every URL you are trying? A few things about the URLs: 1. Don't

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-19 Thread Krapacs Ambrose
On Nov 19, 2008, at 14:53 , Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ambrose, Ambrose Krapacs wrote: catch( Exception e ) { retVal = e.toString(); } And this gives you CommunicationLinkFailure for every URL you

Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-18 Thread Krapacs Ambrose
I have tried many different configurations and I have been unable to get my Servlets / JSP to connect to MySQL server running. I am trying to get this set up on my main server which is running Ubuntu 8.10 Server with MySQL 5 and Tomcat6. I also tried setting up a Ubuntu 8.04 server with

RE: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-18 Thread Antonio Vidal Ferrer
connect to MySQL in Ubuntu Server I have tried many different configurations and I have been unable to get my Servlets / JSP to connect to MySQL server running. I am trying to get this set up on my main server which is running Ubuntu 8.10 Server with MySQL 5 and Tomcat6. I also tried setting

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-18 Thread André Warnier
Krapacs Ambrose wrote: I have tried many different configurations and I have been unable to get my Servlets / JSP to connect to MySQL server running. I am trying to get this set up on my main server which is running Ubuntu 8.10 Server with MySQL 5 and Tomcat6. I also tried setting up a Ubuntu

Re: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-18 Thread David Smith
Can you post your database config and code snippet for accessing the db? Obfuscate the username/password info. One immediate observation is the JDBC url should have the name of the database you are trying to access like this: jdbc:mysql://localhost/myDatabase?user= --David Krapacs

RE: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-18 Thread Martin Gainty
. Date: Tue, 18 Nov 2008 13:37:49 +0100 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Servlets / JSP can't connect to MySQL in Ubuntu Server Krapacs Ambrose wrote: I have tried many different configurations and I have been unable to get my Servlets / JSP to connect

RE: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-18 Thread Chandra Madhumanchi (cmadhuma)
: Servlets / JSP can't connect to MySQL in Ubuntu Server Andre If not otherwise specified 3306 is the default port for mysql check to see if its occupied with netstat -a | grep 3306 If it is reconfig your port in my.conf to an available port Martin Gainty

RE: Servlets / JSP can't connect to MySQL in Ubuntu Server

2008-11-18 Thread Caldarale, Charles R
From: Chandra Madhumanchi (cmadhuma) [mailto:[EMAIL PROTECTED] Subject: RE: Servlets / JSP can't connect to MySQL in Ubuntu Server I am implementing 2way SSL over https on tamcat server through .Net client (C# code as given below) And what does that have to do with the thread you just