Hello.

I just installed this addon to try and immidiatly had a problem with setting up the connections. Does this addon not support dynamic sql ports? Am I doing something wrong?

Regards,

Kristjan

4 answers

1 accepted

A solution was provided to me by the PocketQuery team.

I needed to add the instance to the url to be able to use it without the port. So the final url looked like this:

jdbc:jtds:sqlserver://DBServer/TestConfluenceAddonDB;instance=TestInstance

Thanks for your help Natascha.

Regards,
Kristjan 

Might add that I'm trying to connect to MS SQL 2008 and 2012 with same problem. If I set the sql port to 1433 (not dynamic) on the server and include the port in the PocketQuery Url then it works. If I use dynamic ports on the server then it does not work (with or without the port in the url). It makes this addon a bit useless for me since all the company sql servers are using dynamic ports. Please, if you have a solution let me know.

Hi,

Thank you for your interest in PocketQuery! Could you please post an excerpt from the logfile showing the error message? This could help us to narrow down the cause of the problem.

Thanks

Natascha

Hi. Did you see my reply? Is maybe a limitation in the jtds library? Regards, Kristjan

Ok now I need to be carefull since I can only post one comment every 24 hours wink

Here is the log when I don't add the port. The test fails:
2015-09-28 11:01:02,716 DEBUG [http-nio-8090-exec-19] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Testing database Test-DB
2015-09-28 11:01:02,716 DEBUG [http-nio-8090-exec-19] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Testing database connection Test-DB | jdbc:jtds:sqlserver://DBServer/TestConfluenceAddon | net.sourceforge.jtds.jdbc.Driver | confluence
2015-09-28 11:01:02,716 DEBUG [http-nio-8090-exec-19] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Trying to load database driver net.sourceforge.jtds.jdbc.Driver
2015-09-28 11:01:02,716 DEBUG [http-nio-8090-exec-19] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: I could load the driver =)
2015-09-28 11:01:02,716 DEBUG [http-nio-8090-exec-19] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Trying to connect to database...
2015-09-28 11:01:03,732 DEBUG [http-nio-8090-exec-19] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: There was an SQLException when testing the connection =(. Info: Network error IOException: Connection refused: connect, java.sql.SQLException: Network error IOException: Connection refused: connect
2015-09-28 11:01:03,732 DEBUG [http-nio-8090-exec-19] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Failed to connect to database Test-DB!
2015-09-28 11:01:03,732 DEBUG [http-nio-8090-exec-19] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: There was an error: I cannot connect to this database. For inspection, add a logging entry with level debug and class "de.scandio.confluence.plugins.pocketquery.util.LogUtil" at Confluence Admin => "Logging and Profiling". PocketQuery will then log information to atlassian-confluence.log.


Here is the log when I add the port 49426 (which I saw was the port currently used in the dynamic pool). The test passes. I can also set a fixed port and use that (not dynamic):
2015-09-28 11:15:03,621 DEBUG [http-nio-8090-exec-4] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Testing database Test-DB
2015-09-28 11:15:03,621 DEBUG [http-nio-8090-exec-4] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Testing database connection Test-DB | jdbc:jtds:sqlserver://DBServer:49426/TestConfluenceAddon | net.sourceforge.jtds.jdbc.Driver | confluence
2015-09-28 11:15:03,621 DEBUG [http-nio-8090-exec-4] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Trying to load database driver net.sourceforge.jtds.jdbc.Driver
2015-09-28 11:15:03,621 DEBUG [http-nio-8090-exec-4] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: I could load the driver =)
2015-09-28 11:15:03,621 DEBUG [http-nio-8090-exec-4] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Trying to connect to database...
2015-09-28 11:15:03,621 DEBUG [http-nio-8090-exec-4] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Oh yes, I can connect =)
2015-09-28 11:15:03,621 DEBUG [http-nio-8090-exec-4] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: Connection to database Test-DB successful!
2015-09-28 11:15:03,621 DEBUG [http-nio-8090-exec-4] [plugins.pocketquery.util.LogUtil] debug ====> PocketQuery says: New message: Oh yes, I can connect to this database!

The difference is the url
jdbc:jtds:sqlserver://DBServer/TestConfluenceAddon
jdbc:jtds:sqlserver://DBServer:49426/TestConfluenceAddon

You can send me an email so I can give better info (more frequent than 1 every 24 hours) "kristjanh (at) fivedegrees.is".

Regards,
Kristjan

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

179 views 0 4
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