Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't open a new connection to the database after a success connection (Azure) #2169

Closed
azeroual2017 opened this issue Jun 1, 2021 · 9 comments

Comments

@azeroual2017
Copy link

azeroual2017 commented Jun 1, 2021

Describe the issue
We use Azure Managed PostgreSQL (11). I connect successfuly to the database from spring boot application. While connecting i disable GSS Encryption (gssEncMode=disable)

But after approximately 15 minutes all the other connections are blocked, and we can't connect from another app. we get the following error : FATAL: authentication failed for user "****": too many failed login attempts

Driver Version?
i have tested with 42.2.14. , 42.2.16 and 4.42.18

Spring version
i have tested with 2.1.1.RELEASE and 2.3.4.RELEASE

Java Version?
Java 11 OpenJDK (Windows)

OS Version?
Windows server 2016

PostgreSQL Version?
11

To Reproduce

  1. start application that uses pgjdbc to connect to the database.
  2. wait for about 15 mins.
  3. Open a new connection, i get the error : FATAL: authentication failed for user "****": too many failed login attempts

Thanks for your help !!

@davecramer
Copy link
Member

Not sure how we can help you here. I have no way to reproduce this.

Pretty sure if you just use a simple program without spring this will not happen

@azeroual2017 azeroual2017 changed the title I can't open a new connection to the database after a success connection I can't open a new connection to the database after a success connection (Azure) Jun 1, 2021
@azeroual2017
Copy link
Author

Thanks for you reply.
We have other applications (without spring) that open connections to database and they don't generate this issue. we have observed this problème only after migration from JAVA 8 to JAVA 11 (openJDK). it's work fine with JAVA 8 and pgjdbc 42.2.14

@davecramer
Copy link
Member

Given that other apps don't have this issue what makes you think it is the driver ?

@azeroual2017
Copy link
Author

Because we get this issue just after starting spring app that use jdbc to connect to the database. when others apps are starting we don't have any issue. this bug is observed only when spring app is connected to PostgreSQL 11 on Azure, in others setups (environnements) it works fine.

@davecramer
Copy link
Member

Well as I said I have no way of replicating this. You could try turning on logging on the driver. Not sure how difficult that will be in Spring. https://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters see logging.

@jorsol
Copy link
Member

jorsol commented Jun 1, 2021

It's not clear that the issue is from the driver, why do you think is a driver issue and it's not a middleware (spring boot) or a connection pool issue? what are other "environments"?

The message "too many failed login attempts" might easily be a misconfiguration somewhere, have you tried to reproduce the issue with the same app with a local Postgres instance?

@azeroual2017
Copy link
Author

azeroual2017 commented Jun 1, 2021

The message "too many failed login attempts" we get it after approximately 15 mins of starting Spring app. This Spring app work fine but when we try to open a new connection from another app we get the previous error.

Other "environments", i mean environnements without azure connection.

With local Postgres instance we don't have this issue. it's only oberved when this Spring app is connected to Postgre on Azure.

@davecramer
Copy link
Member

Well I am pretty sure nobody else has this issue with the driver, so I'd start looking somewhere else. Let us know what you find

@davecramer
Copy link
Member

Lack of feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants