PostgreSQL database connection issues

If RICOH ProcessDirector or the business intelligence tool cannot connect to the PostgreSQL database, consider the following troubleshooting suggestions.

  • Make sure that data collection is enabled.
  • If you have changed any values on the Database Settings page, make sure that the values in the PostgreSQL database are updated to match. RICOH ProcessDirector does not send those changes to the database. You must update the settings using a PostgreSQL tool outside of RICOH ProcessDirector.
  • If you have updated any settings in the PostgreSQL database, make sure that values on the Database Settings page are updated accordingly.
  • Make sure that the pg_hba.conf, and postgresql.conf files are set up correctly.
  • If the business intelligence tool is on a computer that has a dynamically allocated IP address, the connection might stop working when the IP address changes.

    For temporary troubleshooting purposes, set the IPV4 local connections to allow address 0.0.0.0/0. This setting allows all IP addresses to connect. If the business intelligence tool can connect with that setting, you can figure out which specific IP addresses need to be added to the allowed list in pg_hba.conf.

  • Verify that the PostgreSQL database is listening on the designated port. By default, the database uses port 5432, though it might have been changed in the Database Settings.

    To determine whether the database is listening on the port:

    1. Open a command line and type: netstat -an

      A list of open ports is displayed.

    2. Check the list for the port specified on the Database Settings page.

    If the database is not listening on the port, stop and restart the PostgreSQL database. The sample commands listed below use the default values from the Database Settings for the user name, password, and port number. If you changed any of those values, use your values in the command.

    1. Stop the database:
      • On a Windows server:

        • \aiw\aiw1\bin\postgresql\Windows\pgsql\bin\pg_ctl stop -o "-p 5432" -U rpdreports -P testpassword -D \aiw\aiw1\data -l \aiw\aiw1\trace\postgres.trace

          or

        • <RPD Install Directory>\PostgreSQL\bin\pg_ctl stop -o "-p 5432" -U rpdreports -P testpassword -D \aiw\aiw1\data -l \aiw\aiw1\trace\postgres.trace

      • On a Linux server:

        • /aiw/aiw1/bin/postgresql/Linux/pgsql/bin/pg_ctl stop -o "-p 5432" -U rpdreports -P testpassword -D /aiw/aiw1/data/ -l /aiw/aiw1/trace/postrgres.trace

          or

        • /usr/pgsql-14/bin/pg_ctl stop -o "-p 5432" -U rpdreports -P testpassword -D /aiw/aiw1/data/ -l /aiw/aiw1/trace/postrgres.trace

    2. Start the database:
      • On a Windows server:

        • \aiw\aiw1\bin\postgresql\Windows\pgsql\bin\pg_ctl start -o "-p 5432" -U rpdreports -P testpassword -D \aiw\aiw1\data -l \aiw\aiw1\trace\postgres.trace

          or

        • <RPD Install Directory>\PostgreSQL\bin\pg_ctl start -o "-p 5432" -U rpdreports -P testpassword -D \aiw\aiw1\data -l \aiw\aiw1\trace\postgres.trace

          Note:
        • On Windows, running the database command can be unreliable. To see whether the database started, log in to RICOH ProcessDirector and click the Administration tab. Open Reports Database Settings.

          If the page reports that the database is connected, the command worked correctly. If the page reports that the database is not connected, click the switch to enable data collection. RICOH ProcessDirector starts the database for you.

      • On a Linux server:
        • /aiw/aiw1/bin/postgresql/Linux/pgsql/bin/pg_ctl start -o "-p 5432" -U rpdreports -P testpassword -D /aiw/aiw1/data/ -l /aiw/aiw1/trace/postrgres.trace

          or

        • /usr/pgsql-14/bin/pg_ctl start -o "-p 5432" -U rpdreports -P testpassword -D /aiw/aiw1/data/ -l /aiw/aiw1/trace/postrgres.trace

  • If the database is listening on the port, but the business intelligence tool does not connect:
    • Check for firewalls or other network issues.
    • If no other network issues exist, reboot the server that holds the database.