Connecting JIRA to MySQL Using the JIRA Configuration Tool

Hi! I am installing Jira on a windows using MySql but now i am stucked here:

On Windows:
Open a command prompt and run config.bat in the bin subdirectory of the JIRA Installation Directory.

Cant seem to run this command, its says config.bat is not recognized as an internal or external command

3 answers

1 accepted

0 votes
Accepted answer

Here are the logs:

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(
at org.apache.commons.dbcp.BasicDataSource.createDataSource(
at org.apache.commons.dbcp.BasicDataSource.setLogWriter(
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(
at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(
at org.ofbiz.core.entity.TransactionFactory.getConnection(
at org.ofbiz.core.entity.ConnectionFactory.getConnection(
at com.atlassian.jira.ofbiz.DefaultOfBizConnectionFactory.getConnection(
at com.atlassian.jira.upgrade.util.UpgradeUtils.tableExists(
at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.databaseSetup(
at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.isOk(
at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.doStartupChecks(
at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.startupOK(
at com.atlassian.jira.startup.DatabaseChecklistLauncher.start(
at com.atlassian.jira.startup.DefaultJiraLauncher$
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseConfigured(
at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(
at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(
at com.atlassian.jira.startup.DefaultJiraLauncher$
at com.atlassian.jira.startup.DefaultJiraLauncher.start(
at com.atlassian.jira.startup.LauncherContextListener$1.create(
at com.atlassian.jira.startup.LauncherContextListener$1.create(
at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.get(
at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.onTenantStart(
at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(
at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(
at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForEachListener(
at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startTenant(
at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startAll(
at com.atlassian.jira.startup.LauncherContextListener.contextInitialized( <+12> ( ( ( ( ( ( ( ( ( ( (
at java.lang.reflect.Method.invoke( <+2> ( (
Caused by: 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(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance( <+2>
at com.mysql.jdbc.Util.handleNewInstance(
at com.mysql.jdbc.SQLError.createCommunicationsException(
at com.mysql.jdbc.ConnectionImpl.createNewIO(
at com.mysql.jdbc.ConnectionImpl.<init>(
at com.mysql.jdbc.JDBC4Connection.<init>( <+3> ( (
at java.lang.reflect.Constructor.newInstance(
at com.mysql.jdbc.Util.handleNewInstance(
at com.mysql.jdbc.ConnectionImpl.getInstance(
at com.mysql.jdbc.NonRegisteringDriver.connect(
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(
... 47 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Jira 5.1 64bit on windows machine

Hmm. What are the lines before the first communication failure? I'm trying to establish what the server was trying to do when the link-failure occurred.

For example, I know there's a bug in the xml export that means when it hits a large table you get this error, but the lines of log above it are a total giveaway - they even tell you which table it is.

Dnt if this will be enough info

2012-11-06 18:44:34,885 main INFO [atlassian.jira.startup.JiraStartupLogger] Running JIRA startup checks.

2012-11-06 18:44:34,953 main INFO [atlassian.jira.startup.JiraHomeStartupCheck] The jira.home directory 'C:\Program Files\Atlassian\Application Data\JIRA' is validated and locked for exclusive use by this instance.

2012-11-06 18:44:34,954 main INFO [atlassian.jira.startup.JiraStartupLogger] JIRA pre-database startup checks completed successfully.

2012-11-06 18:44:35,186 main INFO [jira.config.database.SystemTenantDatabaseConfigurationLoader] Reading database configuration from C:\Program Files\Atlassian\Application Data\JIRA\dbconfig.xml

2012-11-06 18:44:35,288 main INFO [jira.config.database.DatabaseConfigurationManagerImpl] Now running Database Checklist Launcher

2012-11-06 18:44:38,041 main ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:mysql://dbserver:3306/jiradb?useUnicode=true&characterEncoding=UTF8&sessionVariables=storage_engine=InnoDB', driverClassName='com.mysql.jdbc.Driver', username='jiradbuser', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=20, minSize=20, initialSize=null, maxIdle=20, maxWait=30000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery='select 1', minEvictableTimeMillis=60000, timeBetweenEvictionRunsMillis=300000, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=true, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=300, validationQueryTimeout=3, defaultCatalog=null}}

org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Thanks Zulfadi..i deleted the config file and started the setup process and everything is perfect.

0 votes

That usually means Windows can't read the file for some reason. Possibly .bat files disabled if you want obscure security settings...

Could you explain to us exactly what you're doing? e.g. in windows explorer, going to the directory and double-clicking it? Better, could you run a command prompt, cd to the bin directory and then run config.bat and tell us what the error messages you get are? Including whether they are on the command line, or if a GUI prompt pops up.

Ok, i have just installed New install of Jira on a windows..i have done the mysql setup, Java_Home correctly..i think i need to know how to access the bin directory so that i can run config.bat in the bin subdirectory.

I prefer a command prompt myself, but you should be able to use windows Explorer to find it, even if you're unfamiliar with the structure of a typical windows setup on the disk. Think back to where the installer suggested you install Jira - that's a good starting point.

To expand a bit on what Nic said. I know that some people don't know how to use the cmd (formally called the 'dos prompt'). If you are unsure here are the commands.

Click on start and in the search bar enter: cmd
change directory to the bin directory (cd <install dir>\bin)
run the config.bat file (.\config.bat)
This will bring up pop-up. Sometimes it will hide behind your cmd window.
fill in the fields as necessary.

hope that helps a bit.

0 votes
Joe Wai Tye Atlassian Team Nov 05, 2012


May I know which version of JIRA you are trying to install? I believe that this feature is only available starting from JIRA 4.1.



Ok..i managed to figure that with a command prompt but it gave me this message afetr testing connection:

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

Look through the log - that message usually means the server has not responded to a request for some reason. You need to know what the context the failure is happening in.

e.g. it's timing out because the query is taking too long, or it's able to connect, but not issue SQL the database sees as valid.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,098 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you