Hello,
I am attempting to import a .d2 file into OpenHistorian to export the data to CSV for a university project.
I have been provided a .d2 file ‘ppa-2021-04-08 22.54.03.163_to_2021-08-17 04.51.13.039-637647726771420351.d2’ and a database file ‘openHistorian.db’.
I can view the metadata from the database file in openHistorian Web Manager, but I’m unable to view or export any of the PMU data. It seems as though openHistorian is unable to locate the PPA .d2 file.
I have the .d2 file saved in C:\Program Files\openHistorian\Archive.
Are there any setups I have missed?
I have also tried exporting the data to CSV using the DataExtractionUtility, but it wants to get the metadata by connecting to a server, and I am not sure how to do that if I am using SQLite locally.
Any help would be greatly appreciated.
I’d recommend using openHistorian Console to troubleshoot. In many cases, you can just open the console and then use the openHistorian Manager to initialize the PPA adapter on the “Outputs > Historian Instances” screen. The console will automatically display information from the openHistorian service, which may include errors during the initialization process.
1 Like
Thanks for your help, the main error I am seeing is:
The port that the historian is trying to listen on is already in use. Here are a few possible reasons why this might happen.
- Another historian instance is configured to use the same port.
- Another application or service is configured to use the same port.
- Hyper-V sometimes reserves a random range of ports that could conflict with other applications.
- An error has caused a lingering instance of the openHistorian archive to hang on to the port beyond the lifetime of the adapter.
I would recommend restarting the openHistorian service using the Services
manager in Windows to see if that clears it up. If that doesn’t work, you can also try adding port=12345
to the PPA
historian’s connection string, then click Save
and Initialize
.
Thanks,
Stephen
1 Like
Thank you! Restarting the service solved that issue.
The final error I receive now is:
Do you have any advice on how to approach this?
Most likely, because you received the openHistorian.db
database from a someone who had been archiving data, the database also contains a record that defines the configuration for the data subscriber that was used to retrieve real-time data from another system. You don’t have access to that other system that provides the real-time data so this error is to be expected and should be irrelevant to your goal of retrieving data from the .d2
file.
1 Like
Hi Stephen,
When I initialise my output instance, it now successfully opens my .d2 file:
And when I initialise my input adapter ‘PPA Reader’ it claims to connect:

But when I try to trend or export the data over a valid time period I do not see any data:
(The database file provided to me contains 6205 points, and I don’t know which are relevant to the .d2 file, so I select all.)
Do you have suggestions as to why I still can’t see my data?