Embedded-Debezium spring boot postgreSQL DB connectivity issue - postgresql

I tried connecting postgreSQL with spring boot and embedded debezium, the DB connection is getting established, after the table is locked i get access denied. I am logging in with replication access. Kindly find the below logs.
2020-09-15 20:27:00.806 INFO 14784 --- [pool-3-thread-1] i.d.c.postgresql.PostgresConnectorTask : user 'loginUser' connected to database 'pgDatabase' on PostgreSQL 12.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit with roles:
role 'loginUser' [superuser: false, replication: true, inherit: true, create role: false, create db: false, can log in: true]
2020-09-15 20:27:00.813 INFO 14784 --- [pool-3-thread-1] i.d.c.p.connection.PostgresConnection : Obtained valid replication slot ReplicationSlot [active=false, latestFlushedLsn=null, catalogXmin=null]
2020-09-15 20:27:00.813 INFO 14784 --- [pool-3-thread-1] i.d.c.postgresql.PostgresConnectorTask : Found previous offset PostgresOffsetContext [sourceInfoSchema=Schema{io.debezium.connector.postgresql.Source:STRUCT}, sourceInfo=source_info[server='pgServer.com-pgDatabase'db='pgDatabase', lsn=LSN{2/61010900}, txId=14082, timestamp=2020-09-10T01:04:03.660Z, snapshot=FALSE], partition={server=pgServer.com-pgDatabase}, lastSnapshotRecord=true, lastCompletelyProcessedLsn=null, lastCommitLsn=null, transactionContext=TransactionContext [currentTransactionId=null, perTableEventCount={}, totalEventCount=0]]
2020-09-15 20:27:00.814 INFO 14784 --- [pool-3-thread-1] i.d.c.p.snapshot.InitialSnapshotter : Previous snapshot has completed successfully, streaming logical changes from last known position
2020-09-15 20:27:00.871 DEBUG 14784 --- [ main] .m.m.a.ExceptionHandlerExceptionResolver : ControllerAdvice beans: 0 #ExceptionHandler, 1 ResponseBodyAdvice
2020-09-15 20:27:08.185 INFO 14784 --- [pool-3-thread-1] i.d.c.p.c.PostgresReplicationConnection : Initializing PgOutput logical decoder publication
2020-09-15 20:27:08.243 INFO 14784 --- [pool-3-thread-1] i.d.c.p.c.PostgresReplicationConnection : Creating new publication 'dbz_publication' for plugin 'PGOUTPUT'
2020-09-15 20:27:08.246 INFO 14784 --- [pool-3-thread-1] i.d.c.p.c.PostgresReplicationConnection : Creating Publication with statement 'CREATE PUBLICATION dbz_publication FOR ALL TABLES;'
2020-09-15 20:27:08.765 INFO 14784 --- [pool-3-thread-1] o.a.k.c.storage.FileOffsetBackingStore : Stopped FileOffsetBackingStore
2020-09-15 20:27:09.059 ERROR 14784 --- [pool-3-thread-1] io.debezium.embedded.EmbeddedEngine : Unable to initialize and start connector's task class 'io.debezium.connector.postgresql.PostgresConnectorTask' with config: {connector.class=io.debezium.connector.postgresql.PostgresConnector, database.user=loginUser, database.dbname=pgDatabase, offset.storage=org.apache.kafka.connect.storage.FileOffsetBackingStore, database.server.name=pgServer.com-pgDatabase, database.port=5432, plugin.name=pgoutput, table.whitelist=schema.tableName, offset.flush.interval.ms=10000, offset.storage.file.filename=/Users/loginUser/student-offset.dat, database.hostname=pgServer.com, database.password=********, name=student-postgres-connector}
io.debezium.jdbc.JdbcConnectionException: ERROR: permission denied for database pgDatabase

Please check permissions of your role loginUser:
Setting up a PostgreSQL server to run a Debezium connector requires a database user who can perform replications. Replication can be performed only by a database user who has appropriate permissions and only for a configured number of hosts.

From my experience one needs (with pgoutput plugin starting from v10.x):
Enable logical replication on DB instance;
User belonging to REPLICATION (or rds_replication for AWS RDS - server-less options seems to be broken for years) role;
Be owner (the user connecting to DB) of all white-listed tables;
Have USE, SELECT on all white-listed tables and sequences;
Have access for USE, SELECT on "public" schema (meta data);
Have permissions to create objects on "public" schema.
Note: the requirement to have rds_admin is not a requirement but simple way to get started if the list above is overhwhelming.

Related

Docbase could not connect to the database error in documentum content server installation

While I am installing Documentum content server on AWS EKS, I am receiving this Error.
Postgress DB is installed on EC2 VM.
14:20:47,013 INFO [main] com.documentum.install.server.installanywhere.actions.DiWAServerModifyDocbaseDirectory
- The installer will create the folder structure for repository postgres. 14:20:47,021 INFO [main] com.documentum.install.server.installanywhere.actions.DiWAServerPasswordFileGenerator
- The installer is generating database password file... 14:20:47,111 INFO [main] com.documentum.install.server.installanywhere.actions.DiWAServerIniGenerator
- The installer will create server.in file for repository postgres. 14:20:47,152 INFO [main] com.documentum.install.server.installanywhere.actions.DiWAServerCreateTableSpaceScriptGenerator
- The installer will create scripts to for Postgresql Database. 14:20:47,152 INFO [main] com.documentum.install.server.installanywhere.actions.DiWAServerCreateTableSpaceScriptGenerator
- The URL is jar:file:/tmp/install.dir.208/InstallerData/installer.zip!/dm_CreateTableSpace.sql 14:20:47,209 INFO [main] com.documentum.install.server.installanywhere.actions.DiWAServerCopyDeleteTableSpaceScript
- The installer will move file /opt/dctm/dba/config/postgres/dm_DeleteTableSpace.sql to a new location /opt/dctm/server_uninstall/delete_db/postgres/dm_DeleteTableSpace.sql. 14:20:47,214 INFO [main] com.documentum.install.server.installanywhere.actions.DiWAServerCreateTableSpace
- The installer is executing the : Creating the database script. 14:20:47,355 INFO [main] com.documentum.install.server.installanywhere.actions.DiWAServerWebCacheIniGenerator
- The installer will create webcache.ini file for the repository. 14:20:47,394 INFO [main] com.documentum.install.server.installanywhere.actions.DiWAServerTestServerIni
- The installer is testing the database connection information 14:20:47,395 INFO [main] com.documentum.install.server.common.services.db.DiServerPostgresqlServer
- The installer is validating the database connection information in the server.ini file. 14:20:47,563 ERROR [main] com.documentum.install.server.installanywhere.actions.DiWAServerTestServerIni
- Docbase could not connect to the database. Please check output file for more information: /tmp/291406.tmp/DBTestResult18051870723865753931.tmp com.documentum.install.shared.common.error.DiException: Docbase could not connect to the database. Please check output file for more information: /tmp/291406.tmp/DBTestResult18051870723865753931.tmp
This is log of dm_CreateTableSpace.out
psql:/opt/dctm/dba/config/postgres/dm_CreateTableSpace.sql:1: ERROR: role "postgres" already exists
psql:/opt/dctm/dba/config/postgres/dm_CreateTableSpace.sql:3: ERROR: zero-length delimited identifier at or near """"
LINE 1: GRANT "postgres" TO "";
^
psql:/opt/dctm/dba/config/postgres/dm_CreateTableSpace.sql:6: ERROR: database "dm_postgres_docbase" already exists
ALTER DATABASE
GRANT
psql:/opt/dctm/dba/config/postgres/dm_CreateTableSpace.sql:9: ERROR: zero-length delimited identifier at or near """"
LINE 1: REVOKE "postgres" FROM "";
^
You are now connected to database "dm_postgres_docbase" as user "postgres".
CREATE SCHEMA
SET
GRANT
GRANT
GRANT
I don't understand how to make it working.
Even I am facing issues with Postgres RDS Instant i.e.
GRANT "postgres" TO ""
The log is getting generated on PostgreSQL ec2 instance
2021-07-20 11:53:46.434 UTC [7854] dctm#dm_dctm_docbase FATAL:
password authentication fail
ed for user "dctm" 2021-07-20 11:53:46.434 UTC [7854]
dctm#dm_dctm_docbase DETAIL: Role "dctm" does not exist.
Connection matched pg_hba.conf line 99: "host all all 172
.16.0.0/16 md5" 2021-07-20 11:53:46.436 UTC [7855]
dctm#dm_dctm_docbase FATAL: password authentication fail
ed for user "dctm" 2021-07-20 11:53:46.436 UTC [7855]
dctm#dm_dctm_docbase DETAIL: Role "dctm" does not exist.
Connection matched pg_hba.conf line 99: "host all all 172
.16.0.0/16 md5" 2021-07-20 11:53:49.056 UTC [7857]
postgres#postgres ERROR: zero-length delimited identifie
r at or near """" at character 17 2021-07-20 11:53:49.056 UTC [7857]
postgres#postgres STATEMENT: GRANT "dctm" TO ""; 2021-07-20
11:53:49.145 UTC [7857] postgres#postgres ERROR: zero-length
delimited identifie
r at or near """" at character 20 2021-07-20 11:53:49.145 UTC [7857]
postgres#postgres STATEMENT: REVOKE "dctm" FROM ""; password
authentication fail ed for user "dctm" 2021-07-20
11:53:46.434 UTC [7854] dctm#dm_dctm_docbase DETAIL: Role "dctm" does
not exist.
I am using PostgreSQL superuser login and is working fine with cli.
updated the value in heml chart i.e values.yaml for documentum : content-server.
Every time you try to re-run the install you should completely delete everything. It looks like Postgres has the tablespace already created and that's why the test is failing

Changing PostgreSQL schema only active after reload of Spring Boot application

In my spring boot application, the first migration creates a schema for the current user and switches to this schema. Subsequent migrations are properly executed on this schema. However, after migration is complete, these tables are not found by the application until the application is reloaded.
application.yml
spring:
r2dbc:
url: r2dbc:postgresql://127.0.0.1:5432/pickle_db
username: rick
password: morty
r2dbc:
migrate:
migrations-schema: public
migrations-table: fun_migrations
migrations-lock-table: fun_migrations_lock
resources-paths:
- classpath:/db/migration/*.sql
V1__schema.sql
CREATE SCHEMA IF NOT EXISTS fun;
ALTER ROLE current_user SET search_path TO 'fun';
SET search_path TO 'fun';
V2__tables.sql
CREATE TABLE TREE(id int, name varchar(64));
Migration runs successfully and creates following tables.
fun.tree
public.fun_migration
public.fun_migration_lock
2021-06-17 19:58:51.845 INFO 4400 --- [ restartedMain] n.n.r.m.a.R2dbcMigrateAutoConfiguration : Starting R2DBC migration
2021-06-17 19:58:51.847 INFO 4400 --- [ restartedMain] n.n.r2dbc.migrate.core.R2dbcMigrate : Configured with R2dbcMigrateProperties{enable=true, connectionMaxRetries=500, resourcesPaths=[classpath:/db/migration/*.sql], chunkSize=1000, dialect=null, validationQuery='select '42' as result', validationQueryExpectedResultValue='42', validationQueryTimeout=PT5S, validationRetryDelay=PT1S, acquireLockRetryDelay=PT1S, acquireLockMaxRetries=100, fileCharset=UTF-8, waitForDatabase=true, migrationsSchema='public', migrationsTable='fun_migrations', migrationsLockTable='fun_migrations_lock'}
2021-06-17 19:58:51.909 INFO 4400 --- [ restartedMain] n.n.r2dbc.migrate.core.R2dbcMigrate : Creating new test connection
2021-06-17 19:58:52.523 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : Comparing expected value '42' with provided result '42'
2021-06-17 19:58:52.525 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : Closing test connection
2021-06-17 19:58:52.532 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : Successfully got result '42' of test query
2021-06-17 19:58:52.678 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : By 'Making internal tables' 1 rows updated
2021-06-17 19:58:52.692 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : By 'Acquiring lock' 1 rows updated
2021-06-17 19:58:52.702 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : Database version is 0
2021-06-17 19:58:52.723 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : Applying MigrationInfo{version=1, description='schema', splitByLine=false, transactional=true}
2021-06-17 19:58:52.750 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : By 'MigrationInfo{version=1, description='schema', splitByLine=false, transactional=true}' 0 rows updated
2021-06-17 19:58:52.793 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : By 'Writing metadata version 1' 1 rows updated
2021-06-17 19:58:52.800 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : Applying MigrationInfo{version=2, description='tables', splitByLine=false, transactional=true}
2021-06-17 19:58:52.814 WARN 4400 --- [actor-tcp-nio-1] i.r.p.client.ReactorNettyClient : Notice: SEVERITY_LOCALIZED=NOTICE, SEVERITY_NON_LOCALIZED=NOTICE, CODE=00000, MESSAGE=table "tree" does not exist, skipping, FILE=tablecmds.c, LINE=1217, ROUTINE=DropErrorMsgNonExistent
2021-06-17 19:58:52.986 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : By 'MigrationInfo{version=2, description='tables', splitByLine=false, transactional=true}' 0 rows updated
2021-06-17 19:58:53.027 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : By 'Writing metadata version 2' 1 rows updated
2021-06-17 19:58:53.036 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : Applying MigrationInfo{version=3, description='data', splitByLine=false, transactional=true}
2021-06-17 19:58:53.058 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : By 'MigrationInfo{version=3, description='data', splitByLine=false, transactional=true}' 94 rows updated
2021-06-17 19:58:53.072 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : By 'Writing metadata version 3' 1 rows updated
2021-06-17 19:58:53.084 INFO 4400 --- [actor-tcp-nio-1] n.n.r2dbc.migrate.core.R2dbcMigrate : By 'Releasing lock' 1 rows updated
2021-06-17 19:58:53.090 INFO 4400 --- [ restartedMain] n.n.r.m.a.R2dbcMigrateAutoConfiguration : End of R2DBC migration
Once I connect to the application, I get following error.
postgresql log
database_1 | 2021-06-17 17:56:29.903 UTC [1] LOG: starting PostgreSQL 13.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 64-bit
database_1 | 2021-06-17 17:56:29.910 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
database_1 | 2021-06-17 17:56:29.910 UTC [1] LOG: listening on IPv6 address "::", port 5432
database_1 | 2021-06-17 17:56:29.939 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
database_1 | 2021-06-17 17:56:29.960 UTC [51] LOG: database system was shut down at 2021-06-17 17:56:29 UTC
database_1 | 2021-06-17 17:56:29.972 UTC [1] LOG: database system is ready to accept connections
database_1 | 2021-06-17 18:03:52.818 UTC [65] ERROR: relation "tree" does not exist at character 15
database_1 | 2021-06-17 18:03:52.818 UTC [65] STATEMENT: SELECT * FROM TREE
After restarting the spring boot application, everything works perfectly fine. I assume, public.tree, which does not exist, is selected before restart. Once the application is restarted, fun.tree is selected. So, this happens only after this very first migration. How can I make the search_path which is used during migration persistent? Alternatively, how would I reload the connection after the migration, such that the role defined search_path is used?
Update 2021-06-18
I have found the reason for this issue. spring-boot-starter-data-r2dbc pulls in io.r2dbc:r2dbc-pool. Which creates 10 connections before ALTER ROLE current_user SET search_path TO 'fun'; is executed. SET search_path TO 'fun'; is only valid for the one session in which the migration runs.
So the question comes down to, how can I refresh all connections of the pool?
Please try set LOCAL option, After the set command as the following example:
SET LOCAL search_path TO 'fun';
Specifies that the command takes effect for only the current transaction. After COMMIT or ROLLBACK, the session-level setting takes effect again. Note that SET LOCAL will appear to have no effect if it is executed outside a BEGIN block since the transaction will end immediately.
For more detail:
https://www.postgresql.org/docs/9.1/sql-set.html

Not able to run scm_prepare_database.sh script

I am installing Cloudera Manager and CDH 6.3.x and I'm using PostgreSQL for the Cloudera Manager Server and other services that use databases. I'm using a RHEL 7.4 Azure VM and following the official documentation- https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/prepare_cm_database.html
I have completed step 4(Install Databases). In Step 5 : Set up the Cloudera Manager Database, on executing the scm_prepare_database.sh script I'm getting the following error-
[root#machine1 ~]# sudo /opt/cloudera/cm/schema/scm_prepare_database.sh postgresql scm scm
Enter SCM password:
JAVA_HOME=/usr/java/jdk1.8.0_181-cloudera
Verifying that we can write to /etc/cloudera-scm-server
Creating SCM configuration file in /etc/cloudera-scm-server
Executing: /usr/java/jdk1.8.0_181-cloudera/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/java/postgresql-connector-java.jar:/opt/cloudera/cm/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
Jul 17, 2020 1:59:50 PM org.postgresql.Driver connect
SEVERE: Connection error:
org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "scm"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:438)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)
at org.postgresql.Driver.makeConnection(Driver.java:450)
at org.postgresql.Driver.connect(Driver.java:252)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at com.cloudera.enterprise.dbutil.DbCommandExecutor.testDbConnection(DbCommandExecutor.java:263)
at com.cloudera.enterprise.dbutil.DbCommandExecutor.main(DbCommandExecutor.java:139)
[ main] DbCommandExecutor INFO Unable to login using supplied username/password.
[ main] DbCommandExecutor ERROR Error when connecting to database.
org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "scm"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:438)[postgresql-42.1.4.jre7.89c9f79016bab67349a92c00c55907dd.jar:42.1.4.jre7]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222)[postgresql-42.1.4.jre7.89c9f79016bab67349a92c00c55907dd.jar:42.1.4.jre7]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)[postgresql-42.1.4.jre7.89c9f79016bab67349a92c00c55907dd.jar:42.1.4.jre7]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)[postgresql-42.1.4.jre7.89c9f79016bab67349a92c00c55907dd.jar:42.1.4.jre7]
at org.postgresql.Driver.makeConnection(Driver.java:450)[postgresql-42.1.4.jre7.89c9f79016bab67349a92c00c55907dd.jar:42.1.4.jre7]
at org.postgresql.Driver.connect(Driver.java:252)[postgresql-42.1.4.jre7.89c9f79016bab67349a92c00c55907dd.jar:42.1.4.jre7]
at java.sql.DriverManager.getConnection(DriverManager.java:664)[:1.8.0_181]
at java.sql.DriverManager.getConnection(DriverManager.java:247)[:1.8.0_181]
at com.cloudera.enterprise.dbutil.DbCommandExecutor.testDbConnection(DbCommandExecutor.java:263)[db-common-6.3.1.96818eaab0a222aa84a7854b8d22c0c7.jar:]
at com.cloudera.enterprise.dbutil.DbCommandExecutor.main(DbCommandExecutor.java:139)[db-common-6.3.1.96818eaab0a222aa84a7854b8d22c0c7.jar:]
[ main] DbCommandExecutor ERROR Exiting with exit code 8
--> Error 8, giving up (use --force if you wish to ignore the error)
I had logged into postgres using # sudo -u postgres psql.
PostgreSQL version - PostgreSQL 9.2.23 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16), 64-bit
Please help. Thanks in advance.

What are different log levels for a Kubernetes-pod? and what are it roles?

there are log levels for kubernetes pod like WARNING, CRITICAL,ERROR , TRACE, DEBUG can some one list all log levels in kubernetes and their functions
like ERROR for error messages
link for Kubernetes pod logs doc
# kubectl logs carts-78f46c5569-cv5wq -n sock-shop
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=32m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=64m; support was removed in 8.0
2020-07-16 12:58:54.877 INFO [bootstrap,,,] 6 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#51521cc1: startup date [Thu Jul 16 12:58:54 GMT 2020]; root of context hierarchy
2020-07-16 12:58:55.867 INFO [bootstrap,,,] 6 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b894f39] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

Socket and postgreSQL connection problem while connecting spring boot application to postgreSQL in eclipse

I am running a maven spring boot application which fetches data from postgreSQL. But I am getting such type of error when I run the project using the command
mvn spring-boot:run
->
2019-05-29 14:37:03.750 WARN 18368 --- [ main] unknown.jul.logger : IOException occurred while connecting to mc:19745
java.net.SocketTimeoutException: connect timed out
2019-05-29 14:36:52.241 ERROR 18368 --- [ main] org.postgresql.Driver : Connection error:
org.postgresql.util.PSQLException: The connection attempt failed.
Caused by: java.net.SocketTimeoutException: connect timed out
2019-05-29 14:36:53.245 ERROR 18368 --- [ main]
com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
org.postgresql.util.PSQLException: The connection attempt failed.
I have mentioned only the main errors.
The application.properties file is:
spring.main.banner.mode=/offlinekyc
# Oracle settings
spring.datasource.url=jdbc:postgresql://mc:19745/post
spring.datasource.username=postgre
spring.datasource.password=123
spring.jpa.properties.hibernate.default_schema=oms_owner
spring.thymeleaf.cache=false
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect
http.mappers.json-pretty-print=true
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
hibernate.discriminator.ignore_explicit_for_joined=false
# create and drop tables and sequences, loads import.sql
spring.jpa.hibernate.ddl-auto= update
spring.datasource.driverClassName=org.postgresql.Driver
# HikariCP settings
# spring.datasource.hikari.*
spring.datasource.hikari.connection-timeout=60000
spring.datasource.hikari.maximum-pool-size=5
#hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect
#hibernate.default_schema=oms_owner
#hibernate.show_sql=true
#hibernate.format_sql=true
#hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
# Because detection is disabled you have to set correct dialect by hand.
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL9Dialect
Hibernate.properties file also have the same matter.
Here my post database is in mc:19745 server. I am little confused regarding localhost and server address.
Can anyone help in this matter?