Troubleshooting: How to Switch PI Database Connections in G2

Overview

This guide provides step-by-step instructions for switching PI database connections in G2. Common symptoms may include the inability to connect to the desired PI database or incorrect data being pulled due to a connection to the wrong database. Additionally, persistent connections to a fixed PI server may arise despite attempts to change configurations.

Solution

Follow these steps to successfully switch PI database connections:

  1. Edit the pisrvrs.dat file:
    If the file does not exist, create one. Add the new IP address of the PI server on a single line. Ensure the file is located in the correct directory:

    • For a typical installation, the file should be in:
      D:\gensym\g2-2023-64\pi\bin\pisrvrs.dat.
  2. Restart the G2 PI Bridge:
    After editing the pisrvrs.dat file, restart the G2 PI Bridge to apply the changes.

  3. Use the configuration tool g2piconfig.exe:
    The g2piconfig.exe tool, found in the G2 installation’s PI directory, allows you to modify the PI server connection. Run this tool as Administrator to ensure all changes are correctly applied.

  4. Set the GSI connection:
    Update the GSI interface configuration in the G2 application by setting the gsi-connection-configuration attribute to: tcp-ip host "new_ip_address" port-number 22042

    • Please review Chapter 3, "Configuring Connections" in the attached PI server guide. Specifically:
    • Section "Creating and Configuring GSI Interface Objects", subsection "Configuring the GSI Interface Object"
    • Find the attribute "Gsi-connection-configuration"
      The guide states: "The syntax for specifying the location of the bridge process is: tcp-ip host "host-name" port-number port-number"
  5. Flush the DNS cache:

    Run the command ipconfig /flushdns to clear any cached DNS entries that might affect server connections.
  6. Run in debug mode:
    If problems persist, you can run the G2-PI Bridge with the -d9 command-line argument to enable debug mode g2pi -d9.
    By default, the logs will be written to a file named g2pi.log. If you need to specify a different log file location or name, you can do so using the -l option: g2pi -d9 -l my-log.log

  7. Verify file permissions:
    Ensure that the installation folder and the pisrvrs.dat file are not set to read-only. File permission issues could prevent changes from being saved or applied.

  8. Check for multiple pisrvrs.dat files:
    Conduct a system search for additional pisrvrs.dat files. Multiple configuration files could override the changes made in the primary one.

  9. Check the G2PSL environment variable:
    The G2PSL environment variable may affect which PI server G2 connects to. It specifies the exact name and location of the server data file. Confirm its value if set.
    set G2PSL=C:\Gensym\PI\servers.pbf

  10. Inspect the g2pi process:
    Use Task Manager to ensure the g2pi process is running correctly. If not, restart it manually.

Summary

By following the steps above, you should be able to resolve the issue with the G2 PI bridge consistently connecting to a fixed PI server. If the issue persists, please contact support for further assistance.

FAQ

  1. What is the pisrvrs.dat file?
    The pisrvrs.dat file is a configuration file that stores the IP address of the PI database that G2 is connected to.
  2. What is the purpose of g2piconfig.exe
    The g2piconfig.exe tool is essential for configuring the PI server connection in G2. It modifies the PI server connection settings stored within the G2 installation and is particularly useful when manually editing the pisrvrs.dat file doesn’t resolve the issue. Running this tool as an Administrator ensures that any changes are applied with sufficient privileges
  3. What does the -d9 command line argument do?
    The -d9 command line argument is used to run the bridge in debug mode, which can help identify any issues.

Attachments

Comments

0 comments

Please sign in to leave a comment.