Database Error: com.mysql.jdbc.exceptions.jdbc4.Communicatio

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
WoAyumi
A regular
A regular
Posts: 52
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat Apr 28, 2012 6:24 pm

Database Error: com.mysql.jdbc.exceptions.jdbc4.Communicatio

Post by WoAyumi »

Errors on a minecraft server:

Code: Select all

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[INFO] [iConomy] Database Error: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
How to fix this?

Thank you!
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by kraze »

It sounds like the plugin cannot make a successful connection to the database.

Are you using the correct information with the plugin so it can connect?
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
WoAyumi
A regular
A regular
Posts: 52
Joined: Sat Apr 28, 2012 6:24 pm

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by WoAyumi »

Yes, I am using correct details. It happens because it tries to open a new connection, while previous connection is still opened, but I can't find more information about how to fix this.
kraze wrote:It sounds like the plugin cannot make a successful connection to the database.

Are you using the correct information with the plugin so it can connect?
WoAyumi
A regular
A regular
Posts: 52
Joined: Sat Apr 28, 2012 6:24 pm

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by WoAyumi »

Any help is a help, man, so, does anyone have any ideas, how to resolve this issue?

It happens not all the time, but, sometimes, when I restarting my server.
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by Edge100x »

Are you running both your game server and MySQL server locally? Do you have a connection limit set in MySQL that is being reached?
WoAyumi
A regular
A regular
Posts: 52
Joined: Sat Apr 28, 2012 6:24 pm

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by WoAyumi »

Edge100x wrote:Are you running both your game server and MySQL server locally? Do you have a connection limit set in MySQL that is being reached?
Yes, both are running locally. About second question - I am not sure. Can you help me to find out about, how to check it?
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by Edge100x »

It should be set in my.cfg, on Linux. Is this a Windows or Linux installation?
WoAyumi
A regular
A regular
Posts: 52
Joined: Sat Apr 28, 2012 6:24 pm

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by WoAyumi »

Edge100x wrote:It should be set in my.cfg, on Linux. Is this a Windows or Linux installation?
It's a linux, /etc/my.cnf

Are these parameters fine?

Code: Select all

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
wait_timeout = 80 
interactive_timeout = 80
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
wait_timeout = 80 
interactive_timeout = 80
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by Edge100x »

Try adding a line like this in the first section:

max_connections = 50000

Those are also very low timeouts and I would recommend removing them.
WoAyumi
A regular
A regular
Posts: 52
Joined: Sat Apr 28, 2012 6:24 pm

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by WoAyumi »

what amount for timeouts would you suggest?
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by Edge100x »

I would recommend removing those lines entirely and just using the defaults.
WoAyumi
A regular
A regular
Posts: 52
Joined: Sat Apr 28, 2012 6:24 pm

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by WoAyumi »

I removed it but error still remains. It spams the server all the time.

How to resolve this?
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by Edge100x »

It's difficult for me to think of what to try further. You may need to contact the plugin author on this one.
WoAyumi
A regular
A regular
Posts: 52
Joined: Sat Apr 28, 2012 6:24 pm

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by WoAyumi »

This error has started to appear right after I've switched to your hosting, which means, that plugins have some problems with default mysql settings on linux, because I never touched mysql settings after you've installed a new operating system, or kernel, or how it's called nowdays.
There should be a way to crank some screws. Any idea would do.
Anything?
User avatar
Edge100x
Founder
Founder
Posts: 13129
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Database Error: com.mysql.jdbc.exceptions.jdbc4.Communic

Post by Edge100x »

Mostly what we need here (from your plugin) is a better error message, because the one it is giving is not telling us useful information.
Post Reply