Install PI database on remote server and connect to remote server with JAVA to get PI data, but will prompt Connection to the server lost when connecting
you should try to check your network connection. You can use PowerShell for this: run (New-Object Net.Sockets.TcpClient).Connect("ServerNameOrIP", 5450) on your client machine. It will tell you whether you can connect or not and if not, it'll give you hints on where to start troubleshooting.
KB01154 shows extended information about troubleshooting connection issues while KB2820OSI8 shows the port requirements if you have your firewall enabled.
I'm glad to hear from you. You mean I'm going to check the firewall on the remote server? Or install a PowerShell tool. The link you gave me seems inaccessible.
If you have telnet client then you can try below command to check connectivity
telnet PISERVER_IP 5450
Test connectivity using PI JDBC driver to PI application
Navigate to PIHOME\JDBC\Samples\Getsnap\bin
java Getsnap yourDASSERVER yourPISERVER Yes NetTcp:5462 0 sin%
Additional reference :https://techsupport.osisoft.com/Downloads/File/7b8eef48-b7c4-40b1-b641-a7d4474bb7ee
Also make sure your java application has access to PI server . If can check logs on client as well server to identify issues with authentication and other connection issues
with running the PowerShell-command on your client computer, it will tell you if the listening port on the target machine (the server) is open. This is a Windows-build-in function. So you are right, you're checking the firewall of the remote server.
You can also check the firewall of your machine (for outgoing connections) with using the Windows Firewall with Advanced Security GUI.
To check if there is any network connection available, you can also ping the target server from a cmd-window first.
I also added the links again, in my case they work even without logging in to the Techsupport Website:
KB01154 - Troubleshooting connectivity to the PI System
2820OSI8 - Which firewall ports should be opened for a PI Data Archive?
Retrieving data ...