cancel
Showing results for 
Search instead for 
Did you mean: 

Enter Postgres Hyperscaler Edition from Cloud Integration (CPI/HCI)

02-27-2022 8:04 PM
dominic4 Active Participant
1962 views 5 comments
SAP Managed Tags
Subscribe

Hi,

I opened a trial account and enabled CI and a Postgres Database.

Now I want to access the postgres from CI. I added JDBC Adapter with credentials from key file and a jdbc connection string like:
jdbc:postgresql://postgres-xxxxxfxx-85bf-4909-9476-b579cdc8893d.ce4jcviyvogb.eu-central-1.rds.amazonaws.com:4638/cMXXXXxxxZQ?ssl=false&loglevel=2

Unfortunately i always get org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.postgresql.util.PSQLException: Connection to postgres-xxxxxxx-85bf-4909-9476-b579cdc8893d.ce4jcviyvogb.eu-central-1.rds.amazonaws.com:4638 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections., cause: java.net.ConnectException: error 111 - Connection refused (Connection refused) (local port 55746 to address 10.145.79.214 (33c72b56-d8a4-417f-7cd5-1ffc), remote port 4638 to address 10.16.56.221 (ip-10-16-56-221.eu-central-1.compute.internal))

Can anyone help here? do I need to establish a special connection between CPI and Postgres?


BR and thanks for the help

Accepted Solutions (0)

Answers (4)

Answers (4)

vbalko-claimate
Active Contributor

Were you able to solve the problem?

What is the connection string you used?

Have you used the SSL parameters as in this example?

jdbc:postgresql://host:port/dbname?sslfactory=org.postgresql.ssl.NonValidatingFactory&ssl=true

jungwoo_han
Product and Topic Expert
Product and Topic Expert
0 Likes

I got the answer from internal ticket as below.

We do not support connectivity of Postgres in BTP from JDBC adapter. We only support connectivity to postgres on-prem and postgres cloud. It is already in our roadmap. Closing this ticket for now.

alex_yin1
Discoverer
0 Likes

Hi sapbtp0027_1

Have you solved the problem above?

I faced the same problem,too. I tried to find some ways online for the whole past week and only got your blogs discussing the problem.

If you get it solved ,would you like to share me your way?

Thanks very much.

yin.

dominic4
Active Participant
0 Likes

Hi Vladimir,

no I did not get it running. I found a sapnote with supported jdbc databases and postgres on aws was not on the list. So it might be that SAP does not support its own offered databases in BTP.

I have tried this ending: ?sslfactory=org.postgresql.ssl.NonValidatingFactory&ssl=true but still not possible. Where did you get this from?

My current String is

jdbc:postgresql://postgres-xxxxxxx-a28f-4251-a307-5e6437927b9f.ce4jcviyvogb.eu-central-1.rds.amazonaws.com:4690/zoDjKtxxxxx?sslfactory=org.postgresql.ssl.NonValidatingFactory&ssl=true

Same error as before.

vbalko-claimate
Active Contributor
0 Likes

I found that comment of alfonsoarmenta in a discussion.

I was also able to connect to the postgres by DBeaver tool - but only after I made SSH tunnel. But only when I set SSL mode to require and SSL Factory to NonValidating. In the connection settings.

But when I tried to elaborate with connection string in SCI - I wasnt succesfull too. But I think that the problem is that I cannot convince jdbc adapter to enable SSL - because that was the problem in DBeaver too.