This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

During retain installation I get The following errors occurred during database configuration: Cannot create DB connection. Check dbURL/dbUser/dbPassword fields

I created the DB using Pgadmin 4 and can connect to it using the rtuser login. So I know the password is correct for the account. 

I am using google chrome and was able to change the paths through the web browsers in step 1. 

I am running the installation wizard from my desktop. 

I have tried localhost

ip address of the server 10.0.50.57

Ip address of the server with postgres port 10.0.50.57:5432

I dropped the F/W, but no luck.

I tried the same accounts and IP addresses on the actual server using fire fox, still get the same connection error.

Any thoughts would be appreciated. 

  • 0

    I have look at the catalina log file and found this error:

    29-Oct-2021 14:33:10.961 SEVERE [ajp-nio-127.0.0.1-48009-exec-2] org.postgresql.Driver.connect Connection error:
    org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "rtuser"

    In the retain server log I get this error:

    14:33:10, 962[ajp-nio-127.0.0.1-48009-exec-2] [FATAL] SetupWizard: DB connection credentials are wrong
    14:33:10, 962[ajp-nio-127.0.0.1-48009-exec-2] [ERROR] SetupWizard: org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "rtuser"

    The var/log/messages has the same message as the catalina log.

    I was getting connection resfused by postgresql.Driver.Connect.  It seems that has cleared up after removing all my changes to pg_hba.conf, pg_ident.conf to allow the postrgres db user rtuser access to the postgresaql retain database. rtuser has full super user access.  

    I am not sure why the user is being denied by ident authentication.  

    I have even created and added a system sles account called rtuser with the same password used in the retain.db. and made the account part of the www and tomcat groups. But still getting the above error.

    I have look in the knowedge base, but nothing comes up regarding this problem.  You would think out of the box the postgressql db user would be able to connect to its own database. Not sure why the user is being denied. 

    Any help would be appreciated.

  • 0   in reply to 

    Which sles version do you run? And which version of postgresql?

    Have you opened postgresql for any ip connections? Just to be sure ..., and there is no firewall?


    Use "Verified Answers" if your problem/issue has been solved!

  • Verified Answer

    +1 in reply to   

    Hi Diethmar.  I have installed a new SLES15SP2 server with Postgresql.db 10.x and 12.x. By default it is using the 10/x DB.  I worked through the problem and resolved it on 10/29/2021.  I did the following trouble shooting.

    1. Made sure all three service were running (Apache2, Tomcat, and Postgres server).

    2. I checked the \var\log\mesages file and found the connection was being refused. 

    3. I made sure that the Hostfile had the server name and added to the looback for Ip address of the server as well as the DNS name of the server. 

    4. I made sure the firewall allows necessary traffic to connected to the Postgress.DB (80, 443, 22,25 5432, 4080,4089,8081) The retain server is on the internal private network. It can get internet updates vua Public F/W Many to 1 Nat, but can not be contacted directly. 

    5. I checked the postgressl files (Postgresql.conf, pg_hba.conf, and pg_ident.conf. 

    At first psgadmin4 could not connect to the postgres server. 

    I and to update the posgresql.conf file to allow * any host to connect. 

    I created the retain.db and the owner was rtuser with full superuser rights. I also added full rights to the retain.db as well, but since it was super user, I don't think I needed to do this, but I was trying everything to get the user connection to work. 

    I updated the pg_hba.confile file allowing my workstaton network to be trusted.and nossl. 

    I added the rtuser to slses and made it a system user with group rights to apache and postgres with disable login checked.

    I updated the ident.conf file with map = rtuser, system = rtuser posgres = rtuser. 

    I restared postrgres server, tomact, apache services. I used the rc comands but then found a short cut that works better:

    service retain-tomcat status/stop/restart

    service postgresql status/stop/restart 

    service apache2 status/stop/restart

    after all of this, I still could not get the rtuser to connected to the postgres database during the installation of retain.  I check on line and found the following url :

    https://serverfault.com/questions/406606/postgres-error-message-fatal-ident-authentication-failed-for-user

    I added the loopback 127.0.0.1, 127.0.0.2, 127.0.0.3 to the pg_hba.conf file with trust and then I was able to connect to the postgres.db with the user rtuser and it's password.  The lookbacks corresponded with localhost, fsrt2, and fsrt2.seta.net

    Again I tried localhost, fsrt2, fsrt2.seta.net to connect for server and nothing worked until I made the above changes. I was able to connect to the server using default localhost to connect to the retain.db postgres database and install the tables needed for retain. 

    Went through this detail, just in case someone else was experiencing this connection problem to the retain postgres database during the installation of retain.