*** Connection failed: Could not connect to the DB: Communications link failure

Paulo Tovo October 21, 2013

Hi friends.

I installed the Jira version: atlassian-jira-6.1-x32.bin on my server. I have installed de driver mysql version mysql-connector-java-5.1.26, Mysql 5.5.29. I created in the mysql database jiradb, user: jirauser and password. I set the privileges for this user with all flags. When i open the jira web site, i do the configuration for connect with my db mysql but is not work.

When i try to connect directly ion mysql with jirauser on jiradb, its works.

i try to open the ports access in my firewall too but no works.

When i try to config using ./Config.sh (JIRA HOME), when i test the connection, the following error occurs:

Database Selection [M]>

MySql Database Configuration.

Hostname (192.168.0.200)>

Port (3306)>

Database (jiradb)>

Username (jirauser)>

Password (*****)>

Test Connection ([Y]/N)? >

Attempting to connect to 192.168.0.200:3306/jiradb

*** Connection failed: Could not connect to the DB: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Please, help me.

Thanks

Best Regards.

Paulo

8 answers

0 votes
Raja Putti January 31, 2017

 getting error while installing mysql

please help on this .....thanks in advance

 

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

 

 

0 votes
Raja Putti January 31, 2017

 Hi guys .... getting error while connecting to JIRA to mysql

please help me out ..... i have installed  mysql and JIRA and copy the jdbc connector to <jirahome>/lib folder

 

Error connecting to database

Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Connection refused

0 votes
richie_gee
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 5, 2013

Paulo Tovo,

From the error it seems to be a connection issue rather than a driver issue. I presume that your database server is located at other machine which JIRA tried to reach but unable to get any response from the server.

So items to check is:

  1. Are you able to ping to the machine? Or you can even try telnet to your database with port number see if you are able to connect.
  2. If you have firewall, make sure the port and ip is being whitelist on both machines so that they can communicate with each other.
0 votes
Paulo Tovo October 24, 2013

Hi.

On my JIRA START:

Server startup logs are located in /opt/atlassian/jira/logs/catalina.out

Using CATALINA_BASE: /opt/atlassian/jira

Using CATALINA_HOME: /opt/atlassian/jira

Using CATALINA_TMPDIR: /opt/atlassian/jira/temp

Using JRE_HOME: /opt/atlassian/jira/jre/

Using CLASSPATH: /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar

Using CATALINA_PID: /opt/atlassian/jira/work/catalina.pid

paulo@highlander:/opt/atlassian/jira/bin$

CLASSPATH is correct? Or i should set the path from the driver mysql?

Thanks

0 votes
Paulo Tovo October 24, 2013

Hi, my driver version is mysql-connector-java-5.1.26. is that correct?

Thanks

0 votes
Karim BENHDECH October 21, 2013

I do an upgrade and I have the same problem. No issue for now

0 votes
Paulo Tovo October 21, 2013

Hi chung. Yes, i put. I see the atlassian-jira.log and find this:

2013-10-21 08:28:38,013 http-bio-8081-exec-10 ERROR anonymous 508x6x1 xr0n5m 192.168.0.117 /secure/SetupDatabase.jspa [atlassian.co$

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Its could be driver problem?
Thanks
Chung Park Chan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 21, 2013

Looking at the version of the driver, it should be fine

0 votes
Chung Park Chan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 21, 2013

Did you put the driver into <JIRA installation directory>/lib ?

Suggest an answer

Log in or Sign up to answer