Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-5047

DB Connection error at startup not stating actual cause

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 4.6.0
    • None
    • None

    Description

      Since 4.6.0 (possibly related to changes from GRP-4927), if there is a connection error during Grouper startup, it doesn't show the real error, but instead reports "Problem reading config: 'database:grouper'" and other generic messages. There are multiple stacktraces filling up the log but not adding useful information.

      Comparison of log messages:

      4.5.5

      grouper_1   | grouper.hibernate.properties: file:/opt/grouper/grouperWebapp/WEB-INF/classes/grouper.hibernate.properties
      grouper_1   | grouper.hibernate.properties: postgres@jdbc:postgresql://postgres:5432/postgresXXX
      grouper_1   | 
      grouper_1   | Grouper error: Error connecting to the database with credentials from grouper.hibernate.properties, url: jdbc:postgresql://postgres:5432/postgresXXX, driver: org.postgresql.Driver, user: postgres, org.postgresql.util.PSQLException: FATAL: database "postgresXXX" does not exist
      grouper_1   | grouper;grouper_error.log;dev;nothing;2023-10-13T16:55:11,385: [localhost-startStop-1] ERROR SqlExceptionHelper.logExceptions(142) - [] - Connections could not be acquired from the underlying database!
      

      4.6.0 - 4.7.2

      grouper_1   | grouper;tomcat;catalina.out;dev;nothing;2023-10-13T16:56:45,152: [localhost-startStop-1] ERROR DirectJDKLog.log(175) - [] - ContainerBase.addChild: start: 
      grouper_1   | org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/grouper]]
      ...
      grouper_1   | Caused by: java.lang.ExceptionInInitializerError
      ...
      grouper_1   | Caused by: java.lang.RuntimeException: Problem reading config: 'database:grouper'
      ...
      grouper_1   | Caused by: java.lang.RuntimeException: error
      ...
      grouper_1   | Caused by: java.lang.RuntimeException: Error connection to database to get configuration
      ...
      grouper_1   | Caused by: java.lang.NullPointerException: Cannot invoke "java.sql.Connection.prepareStatement(String)" because "theConnection" is null
      ...
      grouper_1   | grouper;tomcat;catalina.out;dev;nothing;2023-10-13T16:56:45,157: [localhost-startStop-1] ERROR DirectJDKLog.log(175) - [] - Error deploying deployment descriptor [/opt/tomcat/conf/Catalina/localhost/grouper.xml]
      

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chad.redman.3@at.internet2.edu Chad Redman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: