Why does 'Cannot create PoolableConnectionFactory' happen after setting up a datasource?

After defining a Datasource and testing it with a sql query i get this:

sql-query: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure Last packet sent to the server was 0 ms ago.)

can anyone tell what i did wrong??

greetings

1 answer

0 vote

Yes. Your configuration is incorrect.

That error could be all sorts of things, you'll need to read the log in detail to find out what it is. It's usually (but not always) that your configuration string doesn't point at a database that the server can see, or it has no access to (the root cause will be above this line in your log for most database servers).

now im getting org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (null, message from server: "Host '172.16.1.100' is not allowed to connect to this MySQL server")

what do i have to change at the sql server??

That's more specific, excellent.

Your server security is incorrect - you need to tell it to allow access from the Confluence serer. I've not used SQL server for a long time, so you'd need to check the documentation for the correct way. (If it were MySQL, there's a "grant access to user@server" SQL statement to run, but you should do the access the way the docs for your database says are best)

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
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

375 views 16 9
Join discussion

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