Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18278

Error in acquiring locks: java.lang.RuntimeException: java.sql.SQLException: Unable to open a test connection to the given database.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: Metastore
    • Labels:
      None
    • Environment:

      Hive:2.3.0
      MetaStore DB : postgresql

      Description

      Launch a hive cli client, it will be build 4 connections on postgresql, when hive cli is openned 20 or more, the postgresql connections will be Exhausted(default 100 connections). Then execute the command will be error:

      hive> show tables;
      FAILED: Error in acquiring locks: java.lang.RuntimeException: java.sql.SQLException:
                    Unable to open a test connection to the given database. 
                    JDBC url = jdbc:postgresql://101.12.4.1:5432/hive, username = hive. 
                    Terminating connection pool (set lazyInit to true if you expect to start your database after your app).
                    Original Exception: ------org.postgresql.util.PSQLException: 
                    FATAL: remaining connection slots are reserved for non-replication superuser connections
      

      I also test in hive 1.1, When open a new hive cli, the connection number of pgsql doesnot increase. Why the hive2.3 occupy 4 connection? Anyone else know this?

        Attachments

          Activity

            People

            • Assignee:
              shining shining
              Reporter:
              shining shining
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: