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

[Connection to a database]. ODD platform could not connect to the database that enforces SSL connection #1702

Open
RamanDamayeu opened this issue Sep 3, 2024 · 0 comments
Assignees
Labels
kind: bug Something isn't working scope: backend Backend task

Comments

@RamanDamayeu
Copy link
Contributor

When database (for instance RDS Postgres with parameter rds.force_ssl = 1) enforces to use SSL connection the migration scripts work fine but ODD Platform could not reach the database with error:

2024-09-01T16:49:43.490Z ERROR 1 --- [tor-tcp-epoll-1] o.o.o.c.exception.ControllerAdvice : Internal server error

org.springframework.dao.DataAccessResourceFailureException: Failed to obtain R2DBC Connection

at org.springframework.r2dbc.connection.ConnectionFactoryUtils.lambda$getConnection$0(ConnectionFactoryUtils.java:90) ~[spring-r2dbc-6.0.9.jar:6.0.9]

Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:

Error has been observed at the following site(s):

*__checkpoint ⇢ Handler org.opendatadiscovery.oddplatform.controller.IngestionController#createDataSource(Mono, ServerWebExchange) [DispatcherHandler]

Original Stack Trace:

at org.springframework.r2dbc.connection.ConnectionFactoryUtils.lambda$getConnection$0(ConnectionFactoryUtils.java:90) ~[spring-r2dbc-6.0.9.jar:6.0.9]
...
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.92.Final.jar:4.1.92.Final]

at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

Caused by: io.r2dbc.postgresql.ExceptionFactory$PostgresqlAuthenticationFailure: no pg_hba.conf entry for host "{redacted}", user "{redacted}", database "{redacted}", no encryption

at io.r2dbc.postgresql.ExceptionFactory.createException(ExceptionFactory.java:86) ~[r2dbc-postgresql-1.0.1.RELEASE.jar:1.0.1.RELEASE]

at io.r2dbc.postgresql.ExceptionFactory.createException(ExceptionFactory.java:65) ~[r2dbc-postgresql-1.0.1.RELEASE.jar:1.0.1.RELEASE]

at io.r2dbc.postgresql.ExceptionFactory.handleErrorResponse(ExceptionFactory.java:132) ~[r2dbc-postgresql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
...

Workaround to set rds.force_ssl = 0 in case of RDS.

@RamanDamayeu RamanDamayeu added the kind: bug Something isn't working label Sep 3, 2024
@RamanDamayeu RamanDamayeu added the scope: backend Backend task label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working scope: backend Backend task
Projects
None yet
Development

No branches or pull requests

2 participants