Stopping input stream in a port

Hi there,

I am new to OpenPDC, I downloaded and installed the openPDC program into my server. Then, I was able to make a connection between openPDC and my PMUs over TCP protocol. After that, some problem occurred and i tried to delete the my input devices (PMUs) and to add them again into my default node. When i try to make a connection again using the same port (TCP-4712) again, i can’t succeed it. Somehow, it looks as if there is a stream already on this port. I use labview to implement my compactRIOs(embedded real time controller) as PMUs. When i run my PMUs, even if there is no input devices at openPDC, my PMUs still connect to something and start to data transmission. This situation occurs spesifically whenever I start to operate my server although I do not run openPDC. I don’t have any idea about what causes this scenario. I doubt that there may be still a data stream and connection between openPDC and PMUs despite the lackness of input devices. How can i stop that? Thanks in advance.

Hi Samil,

openPDC should not be keeping the connection open after you delete the corresponding input device from its configuration. Particularly, if the service is responding to other configuration changes, such as when you add the device back, it should certainly have dropped the connection by that point. That’s how it should work, of course, but that doesn’t mean that’s how it is working. In order to determine whether the service is holding the port open on the remote device, I recommend restarting the openPDC service using the Windows services manager. If that doesn’t work, you can also try rebooting the server to ensure that the operating system isn’t holding onto the port for some reason. If one of those two things fixes the issue, let us know so we can continue to help troubleshoot your openPDC issues.

If, after rebooting the openPDC server, the device still claims that it has an open connection then I would be inclined to believe that the device is not properly handling network connectivity edge cases. For instance, if openPDC did something the device didn’t expect (such as sending a FIN packet right before sending a RST packet), then the software on the device doesn’t properly release the connection even though the connection is dead. In that case, you should be able to fix that temporarily by rebooting the device. If rebooting the device fixes the issue and if the issue can be reliably reproduced, I would recommend bringing up the issue with the manufacturer of the device.

Thanks,
Stephen

Hey Stephen,

Thanks for your quick respond :slight_smile: but sorry for mine. I have found a workaround for that problem that I mentioned. All I want was to communicate my PMUs and PDC over the network and provide data transfer between them. Thus, I used different TCP ports and I could succeed it. However, now I have another problem about sending output streams to my workstation so as to observe the incoming data and apply my control algorithm on it. In output stream statistics of openPDC, it seems that all the data is published, but yet, i can’t get any data from my PDC(openPDC). I only get configuration frame, not the data frame. I enclose my output stream statistics image and wireshark capture image files to this post. In wireshark capture image, our workstation IP adress is the one with ending 41. Could you please help me to solve this issue? Thanks in advance.
Şamil

In the configuration for the TESTPDC output stream, did you enter any text into the UDP Channel field? If you did, it may be trying to send your data frames to a UDP endpoint instead of sending it over the TCP channel. You can simply navigate to Outputs > Manage Output Streams, select TESTPDC from the data grid at the bottom, delete the text in the UDP Channel text box, click the Save button, and then use the Initialize button to apply the change.

Alternatively, it may be that you previously unchecked the Auto Start Data Channel checkbox under Advanced Properties on the TESTPDC output stream’s configuration. If the device is not explicitly sending the command to start the data channel, then you will need to check that box to force the PDC to start sending data automatically when the connection is established.

Thanks,
Stephen

Hi,

Somehow I find myself in the same situation. I had a pmu device configured in the OpenPDC, which worked fine.
I had to update the configuration of said device, so I decided to remove it from the OpenPDC. After modifying the configuration of the device, I decided to add it back to the OpenPDC, but was unsuccessful in getting the PMUconnectiontester to connect and stream the data. I believed something was already connected to the device, (turns out was OpenPDC). So I decided to change the port for C37.118 on my device.
I added the device back into OpenPDC with the help of the new .pmuConnection I could generate, but OpenPDC won’t connect to it.
Note that I switched to port 4712 from port 4713 (old, should be deleted).

Somehow OpenPDC fails to establish that connection, and can’t proceed to connect to the other streams I configured (their bubble is not green, it stays grey)

HEre is the content of Errorlog.txt

[10/16/2019 2:35:07 PM] (Inner Exception)
Date and Time:         10/16/2019 2:35:07 PM
Machine Name:         -----------------------------
Machine IP:            ------------------------------------
Machine OS:            Microsoft Windows NT 6.2.9200.0

Application Domain:    openPDC.exe
Assembly Codebase:     C:/Program Files/openPDC/openPDC.exe
Assembly Full Name:    openPDC, Version=2.7.4.0, Culture=neutral, PublicKeyToken=null
Assembly Version:      2.7.4.0
Assembly Build Date:   5/6/2019 3:03:26 PM
.Net Runtime Version:  4.0.30319.42000

Exception Source:      GSF.Communication
Exception Type:        System.Net.Sockets.SocketException
Exception Message:     No connection could be made because the target machine actively refused it
Exception Target Site: ProcessConnect

---- Stack Trace ----
   GSF.Communication.TcpClient.ProcessConnect(connectState As ConnectState)
       openPDC.exe: N 00240


(Outer Exception)
Date and Time:         10/16/2019 2:35:07 PM
Machine Name:          -------------------------
Machine IP:           -----------------------------------
Machine OS:            Microsoft Windows NT 6.2.9200.0

Application Domain:    openPDC.exe
Assembly Codebase:     C:/Program Files/openPDC/openPDC.exe
Assembly Full Name:    openPDC, Version=2.7.4.0, Culture=neutral, PublicKeyToken=null
Assembly Version:      2.7.4.0
Assembly Build Date:   5/6/2019 3:03:26 PM
.Net Runtime Version:  4.0.30319.42000

Exception Source:      
Exception Type:        System.InvalidOperationException
Exception Message:     Connection attempt failed for tcp://x.x.x.x:4713: No connection could be made because the target machine actively refused it

---- Stack Trace ----

“Actively refused” could be caused by a firewall, but more typically it means the packets are getting through but the remote system is not listening on that port. There could be an error in the application on the remote device, or an issue with the configuration.

Hi,

“actively refused” is because OpenPDC kept polling the deleted device on the old port.

I ended up wiping OpenPDC by doing a clean install and configuring the PMUs from scratch.
The question remains, how to properly delete an input device in OpenPDC?

Best regards

Hi Maxime44,

The openPDC maintains its own runtime configuration that must be refreshed when the database configuration changes. If you delete the device using the Delete button in the openPDC Manager, it should automatically issue the command to refresh the runtime configuration in the service. If it doesn’t work, the command can be issued manually using the openPDC Console or the Remote System Console screen in the openPDC Manager. The command is called ReloadConfig.

Thanks,
Stephen

Thanks, I’ll keep that in mind next time.
Also per curiosity, is it easy to manually access the configuration (is it stored in a text / xml file?)

For various reasons, the openPDC caches its runtime configuration on the disk in both binary format and XML format. It also keeps five additional backups of that configuration by default. Look for ConfigurationCache\SystemConfiguration.xml located in the openPDC installation directory.

Hi,

For some reason, I’m having real trouble getting my OpenPDC to correctly load / reload configuration on changes.
I’m now trying the CSVexport as custom outputs and it behaves very strangely when changing selection of measurements to output as CSV. I tried a couple ReloadConfig in the console, with inconsistent results.

Where can I access the configuration being used by OpenPDC?
Somehow, ConfigurationCache\SystemConfiguration.xml does not reflect the configuration currently run by OpenPDC.

The ReloadConfig command works well for configuration changes that create, delete, enable, or disable adapters. If you are changing the input measurements for an adapter, you will need to explicitly Initialize that adapter. This will cause the system to dispose of the existing adapter instance and create a brand new one with the latest configuration.

ConfigurationCache\SystemConfiguration.xml is the absolute latest runtime configuration as loaded by the openPDC. There is no better place to access the runtime configuration than that file. Any time the system finishes applying new configuration from the database, it updates that file with the configuration that it retrieved from the database. How did you conclude that it does not represent the runtime configuration used by openPDC?

Hi Stephen,

I continued into the new post, as I’m not sure if it is an issue related to OpenPDC in general or more specifically to the CSV Export.

To put it simply, the description of my CSV Export output adapter found in SystemConfiguration.xml does not match what I find in the CSV output file.