NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
malsumis
Joined: 27 Mar 2010 Posts: 1
|
Posted: Sat Mar 27, 2010 5:59 pm Post subject: mysql Communications link failure error |
|
|
Hi,
well, I'm completely stumped here.
| Code: | | Internal Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure |
This here error is getting the hell out of me. I just wasted a whole day pursuing why the damn error pops up, and I'm completely stumped. There is a lot of info on google, this error comes up for carious different reasons, but mine is probably something else. I tried various suggestions, to no difference. I'm where I started.
So, why is it so different? When I'm using the netbeans IDE, I can browse my Mysql server just fine. Let's add that it's a remote server. When I start my DB desktop application, I get the error above. When I use a local mysql server, everything in turn works as expected.
What can I try to make it work? I have a feeling that it's something I'm missing, but what can that be?
Disclaimer: yes I have read the other topic on this, and the solution there does not work for me. I have no access to server config files.
But, like I said, this probably is not a server problem, because NetBeans can connect and browse the database just fine, it's just my app that cannot connect. Also, the connection string is correct. To go into more detail: I am binding a jTable to a mysl table for data using the IDE. For the love of God :/ |
|
| Back to top |
|
 |
julsorio
Joined: 05 Jun 2009 Posts: 168 Location: Bogota, Colombia, South America
|
Posted: Mon Mar 29, 2010 2:02 pm Post subject: mysql Communications link failure error |
|
|
On 27 March 2010 13:00, malsumis <address-removed ([email]address-removed[/email])> wrote:
| Quote: | Hi,
well, I'm completely stumped here.
Code:
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
This here error is getting the hell out of me. I just wasted a whole day pursuing why the damn error pops up, and I'm completely stumped. There is a lot of info on google, this error comes up for carious different reasons, but mine is probably something else. I tried various suggestions, to no difference. I'm where I started.
So, why is it so different? When I'm using the netbeans IDE, I can browse my Mysql server just fine. Let's add that it's a remote server. When I start my DB desktop application, I get the error above. When I use a local mysql server, everything in turn works as expected.
What can I try to make it work? I have a feeling that it's something I'm missing, but what can that be?
|
The versions of the remote and local DB server are the same?Do you use the same port/user/password/db for the remote and local DB server?
--
Julian Osorio Amaya
Ingenier |
|
| Back to top |
|
 |
Rick Posted via mailing list.
|
Posted: Mon Mar 29, 2010 3:02 pm Post subject: mysql Communications link failure error |
|
|
Sounds like a timeout when you are using the remote MySQL server because
of the delay caused by network latency in accessing the remote server.
Try adding autoReconnect= true to the url for the database and add
validationQuery="Select 1" to the resource definition. The
autoReconnect will allow MySQL to reconnect to the client if the
connection gets dropped. The validation query is what the connection
pool manager sends to ask the database if it is still there. It is very
quick and doesn't add much overhead to the connection.
malsumis wrote:
| Quote: | Hi,
well, I'm completely stumped here.
Code:
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
This here error is getting the hell out of me. I just wasted a whole day pursuing why the damn error pops up, and I'm completely stumped. There is a lot of info on google, this error comes up for carious different reasons, but mine is probably something else. I tried various suggestions, to no difference. I'm where I started.
So, why is it so different? When I'm using the netbeans IDE, I can browse my Mysql server just fine. Let's add that it's a remote server. When I start my DB desktop application, I get the error above. When I use a local mysql server, everything in turn works as expected.
What can I try to make it work? I have a feeling that it's something I'm missing, but what can that be?
|
|
|
| Back to top |
|
 |
Andreas Ernst Posted via mailing list.
|
Posted: Tue Mar 30, 2010 4:19 am Post subject: mysql Communications link failure error |
|
|
Am 29.03.2010 17:01, schrieb Rick:
| Quote: | Sounds like a timeout when you are using the remote MySQL server because
of the delay caused by network latency in accessing the remote server.
Try adding autoReconnect= true to the url for the database and add
validationQuery="Select 1" to the resource definition. The autoReconnect
will allow MySQL to reconnect to the client if the connection gets
dropped. The validation query is what the connection pool manager sends
to ask the database if it is still there. It is very quick and doesn't
add much overhead to the connection.
malsumis wrote:
| Quote: | Hi,
well, I'm completely stumped here.
Code:
Internal Exception:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
This here error is getting the hell out of me. I just wasted a whole
day pursuing why the damn error pops up, and I'm completely stumped.
There is a lot of info on google, this error comes up for carious
different reasons, but mine is probably something else. I tried
various suggestions, to no difference. I'm where I started.
So, why is it so different? When I'm using the netbeans IDE, I can
browse my Mysql server just fine. Let's add that it's a remote server.
When I start my DB desktop application, I get the error above. When I
use a local mysql server, everything in turn works as expected.
What can I try to make it work? I have a feeling that it's something
I'm missing, but what can that be?
|
|
not knowing the details, but maybe MySQL is only listening on localhost,
so that you can not connect remotely.
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
address-removed | www.ae-online.de
www.parcelchecker.de | www.tachyon-online.de |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|