Can't connect to Mysql 5.1 database with Jira 4.4.1 -- help

Brent Webster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2011

I've successfully setup a mysql 5.1 based database: "jiradb" that is fully accessible by a separate user: "jiradbuser". I've setup cgi scripts to access the db with no problems via bash and perl (using DBI pm). When I config the db for jira using the config.sh and pressig the "Test Connection" button, I get the error:

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.

The only relative error message comes from a massive java trackback in /opt/atlassian/jira/logs/catalina.out file:

Sep 20, 2011 3:51:10 PM org.apache.catalina.core.StandardServer await
WARNING: StandardServer.await: Invalid command '' received
2011-09-21 11:40:01,941 http-8080-1 ERROR anonymous 700x37x1 1ie8v0y 192.168.220.55 /secure/SetupDatabase.jspa [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] Could not successfully test your database:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 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.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
.. stuff deleted
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

I'm not a Java guy so any help would be appreciated....Brent

Anyone else setup a new mysql 5.1 db with the latest Jira?

5 answers

1 accepted

1 vote
Answer accepted
Brent Webster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2011

Found an answer but we still have a problem. Shows up when pressing the "Test Connection" button from the config.sh script.

The only hostname that can be specified is either "localhost" or 127.0.0.1 where my /etc/hosts files specifies:
root@jiraa:~# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 jiraa.belairnetworks.com jiraa

and my IP address is
root@jiraa:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0c:29:75:5f:5e
inet addr:172.16.1.126 Bcast:172.16.1.255 Mask:255.255.254.0
... stuff deleted

I can't use jiraa, jiraa.belairnetworks.com or 172.16.1.126.

Note: This network configuration was automatically setup during the Ubuntu install, I changed nothing.

1 vote
Brent Webster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2011

This mysql bug describes my problem exactly but when I checked the jar filelist, it was using mysql-connector-java-5.1.10.jar so it didn't fix my problem. I went to the Oracle/mysql site, and the latest version was 5.1.17 so I replaced the .10 with the .17 version and restarted the jira service but not difference.

Not as familiar with java or jars but I assumes a simply swap of the jar files and a restart of jira should pick up the later .17 version. Correct?

Why is something simple so hard.

0 votes
kyungmin ryu September 15, 2014

Try to change database user login information that host. like this 'localhost' -> '%'

0 votes
MinC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2011

Are you using non-standard port for the jdbc?

There is a bug reported for version 5.1.9 mysql-jdbc-driver: http://bugs.mysql.com/bug.php?id=47494

0 votes
Luis Mayora
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2011
Brent Webster
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2011

Yes, I have been following this instructions to a T both the manual setup and the GUI setup.

Suggest an answer

Log in or Sign up to answer