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:
-
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
.
- For a typical installation, the file should be in:
-
Restart the G2 PI Bridge:
After editing thepisrvrs.dat
file, restart the G2 PI Bridge to apply the changes. -
Use the configuration tool
g2piconfig.exe
:
Theg2piconfig.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. -
Set the GSI connection:
Update the GSI interface configuration in the G2 application by setting thegsi-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"
-
Flush the DNS cache:
Run the commandipconfig /flushdns
to clear any cached DNS entries that might affect server connections. -
Run in debug mode:
If problems persist, you can run the G2-PI Bridge with the-d9
command-line argument to enable debug modeg2pi -d9
.
By default, the logs will be written to a file namedg2pi.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
-
Verify file permissions:
Ensure that the installation folder and thepisrvrs.dat
file are not set to read-only. File permission issues could prevent changes from being saved or applied. -
Check for multiple
pisrvrs.dat
files:
Conduct a system search for additionalpisrvrs.dat
files. Multiple configuration files could override the changes made in the primary one. -
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
-
Inspect the
g2pi
process:
Use Task Manager to ensure theg2pi
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
- 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. - What is the purpose of g2piconfig.exe
Theg2piconfig.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 thepisrvrs.dat
file doesn’t resolve the issue. Running this tool as an Administrator ensures that any changes are applied with sufficient privileges - 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.
Comments
0 comments
Please sign in to leave a comment.