Connecting JIRA to MySQL Using the JIRA Configuration Tool

Tshepo November 5, 2012

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
Answer accepted
Tshepo November 7, 2012

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(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:1134)
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:109)
at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69)
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:146)
at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:101)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at com.atlassian.jira.ofbiz.DefaultOfBizConnectionFactory.getConnection(DefaultOfBizConnectionFactory.java:28)
at com.atlassian.jira.upgrade.util.UpgradeUtils.tableExists(UpgradeUtils.java:100)
at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.databaseSetup(MinimumUpgradableVersionCheck.java:49)
at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.isOk(MinimumUpgradableVersionCheck.java:30)
at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.doStartupChecks(JiraDatabaseConfigChecklist.java:63)
at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.startupOK(JiraDatabaseConfigChecklist.java:51)
at com.atlassian.jira.startup.DatabaseChecklistLauncher.start(DatabaseChecklistLauncher.java:35)
at com.atlassian.jira.startup.DefaultJiraLauncher$2.run(DefaultJiraLauncher.java:90)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:284)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseConfigured(DatabaseConfigurationManagerImpl.java:175)
at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:85)
at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:24)
at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:61)
at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:33)
at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:56)
at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:67)
at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:62)
at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.get(MultiTenantComponentMapImpl.java:121)
at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.onTenantStart(MultiTenantComponentMapImpl.java:165)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:134)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:131)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForEachListener(DefaultMultiTenantManager.java:256)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startTenant(DefaultMultiTenantManager.java:130)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startAll(DefaultMultiTenantManager.java:203)
at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:95) <+12> (StandardContext.java:4205) (StandardContext.java:4704) (ContainerBase.java:1053) (StandardHost.java:840) (ContainerBase.java:1053) (StandardEngine.java:463) (StandardService.java:525) (StandardServer.java:754) (Catalina.java:595) (NativeMethodAccessorImpl.java:39) (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597) <+2> (Bootstrap.java:289) (Bootstrap.java:414)
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(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) <+2>
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2214)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:781)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) <+3> (NativeConstructorAccessorImpl.java:39) (DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:284)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 47 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Tshepo November 7, 2012

Jira 5.1 64bit on windows machine

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 7, 2012

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.

Like Boris Castagna likes this
Tshepo November 7, 2012

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

Zul NS _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 7, 2012
Tshepo November 8, 2012

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

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

Hi,

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.

Cheers,

Joe

Tshepo November 7, 2012

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 7, 2012

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.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 5, 2012

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.

Tshepo November 5, 2012

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 5, 2012

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.

Jo-Anne MacLeod
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.
November 5, 2012

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.

Suggest an answer

Log in or Sign up to answer