Unable to connect to SQL Server 2014 developer version

Kumar Chinnasamy July 27, 2017

Hi,

 

I have successfully installed my JIRA and SQL server 2014 on server. It started with embedded databased and worked well.

I want to change the DB to into SQL sever. Hence I changed the dbconf file as mentioned in the Atlassian documentation. But unable to connect and getting error. Please help.

My connection details are below.

<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mssql</database-type>
<schema-name>xxxxxxx</schema-name>
<jdbc-datasource>
<url>jdbc:jtds:sqlserver://xxxxxxx:1433/NewDay_JIRA</url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
<username>xxxxxxx</username>
<password>xxxxxxx</password>
<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<min-evictable-idle-time-millis>4000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>5000</time-between-eviction-runs-millis>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
</jdbc-datasource>
</jira-database-config>

But still I am unable to connect and getting error message like ....

Database: JIRA couldn't connect to your database

 

2 answers

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 28, 2017

What value are you using for the URL tag?   You don't need to disclose the exact value, I'm just interested to learn if you are using a hostname, IP address, or the value 'localhost'.   From what I can see of your dbconfig.xml that looks fine, but it could be that SQL isn't listening on that port/address you are using to try to connect to.

If this is a hostname, then it is possible that the server can't resolve it's own hostname.  That tends to happen when the server is configured to use a DNS server that doesn't know how to resolve that hostname to the expected IP address.


If JIRA and SQL are on the same machine, then I would recommend trying to use the localhost address.   This is the equivalent of the 127.0.0.1 or the ::1 address that you might see in some systems.


It might be you have to configure SQL to listen to port 1433 on a specific interface of that system.  Details on how to do this are in https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-server-to-listen-on-a-specific-tcp-port   I believe the default is listening on localhost for 1433, but you might have to make sure the SQL server is listening the port/address that you are actually trying to connect to.

Kumar Chinnasamy July 30, 2017

Thank you Heinzer for your reply. I finally figured out the reason. TCP/IP was disabled in my SQL server configuration server. After enabling it, JIRA is able to connect to the DB.

0 votes
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 28, 2017

Hi Kumar,

I would follow the instructions in Switching Databases:

  1. Create an export of your data as an XML backup. See Backing up data for details.
  2. Create a new database on your new database server to house JIRA's data. See the appropriate database configuration guide in the Connecting JIRA to a database section for the database creation instructions.
  3. Shut down your JIRA server.
  4. Make a backup of your JIRA home directory and JIRA installation directory.
  5. Delete the dbconfig.xml file in your JIRA home directory.
  6. Restart JIRA and you should see the first step of the JIRA setup wizard for configuring your database connection.
  7. Configure JIRA's connection to your new database (created in step 2 above) and click the 'Next' button.
  8. On the 'Application Properties' setup page, click the 'import your existing data' link and restore your data from the XML backup created in step 1 above.

Cheers,

Branden

Kumar Chinnasamy July 30, 2017

Thank you Branden for your reply. I finally figured out the reason. TCP/IP was disabled in my SQL server configuration server. After enabling it, JIRA is able to connect to the DB.

Suggest an answer

Log in or Sign up to answer