Password Authentication for User postgres failed

Hi, I wanted to create an own widget and started a custom project for this purpose. I followed the instructions (User Guide: Custom deployment · openremote/openremote Wiki · GitHub), but when I press “Run” in the end (I am using Intellij) it gives me the following error. Did someone encounter something similiar? It says that the password authentication for User postgres failed.

"C:\Program Files\Java\jdk-17.0.5\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\lib\idea_rt.jar=50956:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\stockl\AppData\Local\Temp\classpath1182131121.jar org.openremote.manager.Main
Apr. 04, 2023 1:36:38 PM org.openremote.container.util.LogUtil getConfigInputStream
INFORMATION: Using built in logging configuration from classpath: logging-dev.properties
2023-04-04 13:36:38.765  INFO    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Initialising asset model...
2023-04-04 13:36:38.835  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Processing asset model provider: StandardModelProvider
2023-04-04 13:36:38.836  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Auto scan = true
2023-04-04 13:36:39.008  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Scanning for Asset classes
2023-04-04 13:36:39.058  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Found asset class count = 34
2023-04-04 13:36:39.058  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Found 34 asset class(es)
2023-04-04 13:36:39.074  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Processing asset model provider: CustomAgentModelProvider
2023-04-04 13:36:39.074  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Auto scan = true
2023-04-04 13:36:39.078  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Scanning for Asset classes
2023-04-04 13:36:39.078  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Found asset class count = 2
2023-04-04 13:36:39.078  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Found 2 asset class(es)
2023-04-04 13:36:39.081  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Processing asset model provider: CustomAssetModelProvider
2023-04-04 13:36:39.081  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Auto scan = true
2023-04-04 13:36:39.083  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Scanning for Asset classes
2023-04-04 13:36:39.083  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Found asset class count = 1
2023-04-04 13:36:39.084  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Found 1 asset class(es)
2023-04-04 13:36:39.084  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Processing asset model provider: AgentModelProvider
2023-04-04 13:36:39.085  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Auto scan = true
2023-04-04 13:36:39.331  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Scanning for Asset classes
2023-04-04 13:36:39.345  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Found asset class count = 26
2023-04-04 13:36:39.346  FINE    [main                          ] te.model.util.ValueUtil.MODEL_AND_VALUES : Found 26 asset class(es)
2023-04-04 13:36:39.606  INFO    [main                          ] org.openremote.container.Container       : >>> Starting runtime container...
2023-04-04 13:36:39.606  INFO    [main                          ] org.openremote.container.Container       : Initializing service: org.openremote.manager.syslog.SyslogService
2023-04-04 13:36:39.606  INFO    [main                          ] .openremote.manager.syslog.SyslogService : Syslog service enabled
2023-04-04 13:36:39.609  INFO    [main                          ] org.openremote.container.Container       : Initializing service: org.openremote.manager.persistence.ManagerPersistenceService
2023-04-04 13:36:39.610  INFO    [main                          ] container.persistence.PersistenceService : Preparing persistence service for database: POSTGRES
2023-04-04 13:36:39.665  INFO    [main                          ] container.persistence.PersistenceService : Setting storage directory to 'C:\Users\stockl\Documents\Github-Repositories\openremote custom-project\custom-project\openremote\tmp'
2023-04-04 13:36:39.666  INFO    [main                          ] container.persistence.PersistenceService : Opening database connection: jdbc:postgresql://localhost:5432/openremote?currentSchema=openremote
2023-04-04 13:41:40.502  SEVERE  [main                          ] com.zaxxer.hikari.pool.HikariPool        : or-pool - Exception during pool initialization.
org.postgresql.util.PSQLException: FATAL: Passwort-Authentifizierung f�r Benutzer �postgres� fehlgeschlagen
	at org.postgresql.Driver$ConnectThread.getResult(Driver.java:394)
	at org.postgresql.Driver.connect(Driver.java:304)
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229)
	at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:103)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:100)
	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
	at org.openremote.container.persistence.Database$Product$1.open(Database.java:79)
	at org.openremote.container.persistence.PersistenceService.openDatabase(PersistenceService.java:508)
	at org.openremote.container.persistence.PersistenceService.init(PersistenceService.java:324)
	at org.openremote.container.Container.start(Container.java:162)
	at org.openremote.container.Container.startBackground(Container.java:207)
	at org.openremote.manager.Main.main(Main.java:31)
2023-04-04 13:41:40.503  SEVERE  [main                          ] org.openremote.container.Container       : >>> Runtime container startup failed
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: FATAL: Passwort-Authentifizierung f�r Benutzer �postgres� fehlgeschlagen
	at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:596)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:582)
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:100)
	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
	at org.openremote.container.persistence.Database$Product$1.open(Database.java:79)
	at org.openremote.container.persistence.PersistenceService.openDatabase(PersistenceService.java:508)
	at org.openremote.container.persistence.PersistenceService.init(PersistenceService.java:324)
	at org.openremote.container.Container.start(Container.java:162)
	at org.openremote.container.Container.startBackground(Container.java:207)
	at org.openremote.manager.Main.main(Main.java:31)
Caused by: org.postgresql.util.PSQLException: FATAL: Passwort-Authentifizierung f�r Benutzer �postgres� fehlgeschlagen
	at org.postgresql.Driver$ConnectThread.getResult(Driver.java:394)
	at org.postgresql.Driver.connect(Driver.java:304)
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229)
	at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:103)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561)
	... 8 more

Hi,

By default the manager process when run in an IDE runs in dev mode and will try and connect to the postgresql DB on localhost:5432.

Usually we run the profile/dev-testing.yml docker compose profile to provide the postgres and keycloak services the manager needs. Note that in dev mode the DB and keycloak are wiped clean on each restart of the manager process by default.

Hello, I would like to ask. So how can you run it in non-development mode?