How to fix this postgresql error `FATAL: password authentication failed for user <user>?

Jonas

I'm trying to setup a simple server using IntelliJ Community, Spring Boot and PostgreSQL.

I was following an online tutorial and downloaded the code from this github as an initial template. It should be a template generated by this website: https://start.spring.io/.

Bellow is the error log. How do I fix it?

2023-06-02T11:30:49.064-03:00  WARN 12340 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unable to obtain connection from database: FATAL: password authentication failed for user "fernandakipper"
----------------------------------------------------------------------------------------------------------
SQL State  : 28P01
Error Code : 0
Message    : FATAL: password authentication failed for user "fernandakipper"

2023-06-02T11:30:49.071-03:00  INFO 12340 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2023-06-02T11:30:49.095-03:00  INFO 12340 --- [  restartedMain] .s.b.a.l.ConditionEvaluationReportLogger : 

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2023-06-02T11:30:49.140-03:00 ERROR 12340 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unable to obtain connection from database: FATAL: password authentication failed for user "fernandakipper"
----------------------------------------------------------------------------------------------------------
SQL State  : 28P01
Error Code : 0
Message    : FATAL: password authentication failed for user "fernandakipper"

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-6.0.9.jar:6.0.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598) ~[spring-beans-6.0.9.jar:6.0.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) ~[spring-beans-6.0.9.jar:6.0.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.9.jar:6.0.9]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.9.jar:6.0.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.9.jar:6.0.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.9.jar:6.0.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:313) ~[spring-beans-6.0.9.jar:6.0.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.9.jar:6.0.9]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1156) ~[spring-context-6.0.9.jar:6.0.9]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:931) ~[spring-context-6.0.9.jar:6.0.9]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608) ~[spring-context-6.0.9.jar:6.0.9]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.1.0.jar:3.1.0]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:733) ~[spring-boot-3.1.0.jar:3.1.0]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435) ~[spring-boot-3.1.0.jar:3.1.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) ~[spring-boot-3.1.0.jar:3.1.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1305) ~[spring-boot-3.1.0.jar:3.1.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1294) ~[spring-boot-3.1.0.jar:3.1.0]
    at com.example.crud.CrudApplication.main(CrudApplication.java:10) ~[classes/:na]
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:578) ~[na:na]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-3.1.0.jar:3.1.0]
Caused by: org.flywaydb.core.internal.exception.FlywaySqlException: Unable to obtain connection from database: FATAL: password authentication failed for user "fernandakipper"
----------------------------------------------------------------------------------------------------------
SQL State  : 28P01
Error Code : 0
Message    : FATAL: password authentication failed for user "fernandakipper"
Suresh Kumar

You have to install postgresql in your local and change the properties as per your db configuration. What they had provided is dummy. You have to put the actuals to make it work as expected

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to fix org.postgresql.util.PSQLException: FATAL: password authentication failed for user

postgresql: FATAL: password authentication failed for user "douglas"

FATAL: password authentication failed for user "postgres" (postgresql 11 with pgAdmin 4)

psql: FATAL: password authentication failed for user "postgres" postgresql version 10

How does Postgresql inside Docker work? psql: FATAL: password authentication failed for user xy

psql: error: could not connect to server: FATAL: password authentication failed for user

Postgres docker error: FATAL: password authentication failed for user

psql: error: FATAL: password authentication failed for user "Davinci"

Postgresql psql: error: FATAL: Peer authentication failed for user "userrole"

Heroku - FATAL: password authentication failed for user <>

PostgreSQL - FATAL: Ident authentication failed for user

Postgresql: password authentication failed for user "postgres"

Exception when running in docker: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "hamzabelmellouki"

Spring boot - org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"

error: password authentication failed for user "myuser"

psql: FATAL: password authentication failed for user error while trying to access psql

AWS RDS: FATAL: password authentication failed for user "postgres"

psql: FATAL: password authentication failed for user windows 8

psql: FATAL: Password authentication failed for user “postgres” WINDOWS

PG::ConnectionBad: FATAL: password authentication failed for user "alphauser"

FATAL: password authentication failed for user "postgres" version 11

psycopg2.OperationalError: FATAL: password authentication failed for user "nouman"

PG::ConnectionBad: FATAL: password authentication failed for user "postgres" on the production server

FATAL: password authentication failed for user "postgres" Ubuntu v20.10

FATAL: password authentication failed for user "admin" Docker and Spring boot

Odoo 15: FATAL: password authentication failed for user "odoo15"

How to fix PHP Fatal error: Uncaught InvalidArgumentException: Authentication user provider [external-user] is not defined

Unable to connect to PostgreSQL server: FATAL: Peer authentication failed for user "postgres"

psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "postgres" (Ubuntu)

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  3. 3

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  4. 4

    pump.io port in URL

  5. 5

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  8. 8

    Do Idle Snowflake Connections Use Cloud Services Credits?

  9. 9

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

  10. 10

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  11. 11

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  12. 12

    Generate random UUIDv4 with Elm

  13. 13

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  14. 14

    Is it possible to Redo commits removed by GitHub Desktop's Undo on a Mac?

  15. 15

    flutter: dropdown item programmatically unselect problem

  16. 16

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  17. 17

    EXCEL: Find sum of values in one column with criteria from other column

  18. 18

    Pandas - check if dataframe has negative value in any column

  19. 19

    How to use merge windows unallocated space into Ubuntu using GParted?

  20. 20

    Make a B+ Tree concurrent thread safe

  21. 21

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

HotTag

Archive