NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

mysql Communications link failure error

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
malsumis



Joined: 27 Mar 2010
Posts: 1

PostPosted: Sat Mar 27, 2010 5:59 pm    Post subject: mysql Communications link failure error Reply with 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?

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

PostPosted: Mon Mar 29, 2010 2:02 pm    Post subject: mysql Communications link failure error Reply with quote

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.





PostPosted: Mon Mar 29, 2010 3:02 pm    Post subject: mysql Communications link failure error Reply with 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?



Back to top
Andreas Ernst
Posted via mailing list.





PostPosted: Tue Mar 30, 2010 4:19 am    Post subject: mysql Communications link failure error Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo