GridProtectionAlliance / openPDC

Open Source Phasor Data Concentrator
MIT License
128 stars 59 forks source link

Having trouble installing openPDC on Raspberry Pi 3 Model B+ #112

Closed TTony0014 closed 2 years ago

TTony0014 commented 5 years ago

Hello there,

These days, I have been installing openPDC on Raspberry Pi 3 Model B+ and keep having issues. The instruction I followed is linked from this website: https://github.com/GridProtectionAlliance/openPDC/blob/master/Source/Documentation/wiki/Running_openPDC_on_a_Raspberry_Pi.files/Example-openPDC_on_RaspberryPi-3B_Raspbian_Jessie.pdf

After I installed Mono by following https://www.mono-project.com/download/stable/#download-lin-raspbian, I tried to install openPDC.

By typing "sudo bash install-openPDC.sh -p", in terminal, it shows cannot stat 'openPDC/Build/Output....' (see in attachment). Later, I was noticed to start application, run "sudo mono /opt/openPDC/openPDC.exe -RunAsConsole", and I received "Cannot open assembly '/opt/openPDC/openPDC.exe': No such file or directory"

Did I miss anything while installing Mono or openPDC?

Please help and much appreciated.

Thank you, Tony openpdcinstall

StephenCWills commented 5 years ago

Hello Tony,

Those messages suggest that the openPDC build failed. The build should have produced a log file called install-openPDC.log which should give you more detailed messages about why it failed. Feel free to dive into the logs yourself, or you can upload the log file here so I can have a look.

Thanks, Stephen

TTony0014 commented 5 years ago

Hello Stephen,

Thanks for helping me. I have attached the log file to this post. I am new to Raspberry Pi world so I could not understand what really happen in the log file.

What I find is there is no openPDC.exe file in the targeted direction. Probably as you mentioned, the openPDC did not completely install or build.

Thank you, Tony install-openPDC.log

TTony0014 commented 5 years ago

Hello all,

I have kept working on the openPDC installation on Raspberry Pi 3 B+ and 2. Right now, I am trying to install openPDC on Raspberry Pi 2.

I tried to use the pre-compiled image from https://github.com/GridProtectionAlliance/openPDC/blob/master/Source/Documentation/wiki/Running_openPDC_on_a_Raspberry_Pi.md

But the image does not work. Once I power the Pi 2, the rainbow screen freeze. Green LED shows that the OS is too old. So I have to use other version.

By following issue 96 and 88, I downloaded install-openPDC.zip and try to install with Raspbian Jessie on Raspberry Pi 2.

During installation, still, shows cannot stat some directory. "Installing openPDC...

cp: cannot stat ‘openPDC/Build/Output/Mono/Applications/openPDC/*’: No such file or directory mkdir: cannot create directory ‘/opt/openPDC/Database Scripts’: File exists cp: cannot stat ‘gsf/Build/Output/Mono/Tools/MonoGenCert/MonoGenCert.exe’: No such file or directory Creating transport layer security keys and certificates...

Cannot open assembly 'MonoGenCert.exe': No such file or directory. Installing GEP Subscription Tester...

Applying default POSIX configuration to openPDC installation...

openPDC installation complete. To start application, run: sudo mono /opt/openPDC/openPDC.exe -RunAsConsole"

Then, I tried to run as console. The following issue shows up: "pi@raspberrypi:~/GPB $ sudo mono /opt/openPDC/openPDC.exe -RunAsConsole Missing method get_Name in assembly /opt/openPDC/GSF.Core.dll, type System.Security.Claims.ClaimsIdentity Shell hosted service exception: Object reference not set to an instance of an object"

I saw the same error in issue 96. I wish to know if anyone update the install-openPDC.sh file so far. Mono seems fine now. Maybe installation file includes some error.

Thank you so much. Tony install-openPDC.log

ajstadlin commented 5 years ago

Just commenting: I tried openPDC on Raspberry Pi a while back. At the time, I think the problems I experienced were related to the current (at the time) openPDC being 64bit but Raspbian being 32bit. Cross Rebuilding openPDC 64bit into Raspbian 32bit was, and still is, beyond my skill set.

I will follow this thread and see if there are any updates to getting this to work. It would be great to get it to work in Raspbian (only available as 32bit, I think), or possibly easier on a Pine64 in a 64bit Linux

//AJ

StephenCWills commented 5 years ago

The log reports that ExpressionEvaluator is missing and it can't build GSF.Core. It looks like the build script for GSF isn't restoring NuGet packages. I haven't had the chance to look into it any further than that, but if you can track down the missing dependencies or figure out how to manually restore the NuGet packages, it could get you to the next major hurdle at least.

TTony0014 commented 5 years ago

Good afternoon Stephen and AJ,

I found some info on NuGET package issue and try to attempt to fix it. Meanwhile, I am also thinking about matching the versions of the hardware and software.

Currently, I am installing everything on a Raspberry Pi 2 B and the Raspbian Jessie (4/10/2017 version). I tried using the image provided on the GitHub website, and it will not boot the Pi.

Would you mind sending me an image includes openPDC installed that is working? Or would you please let me know the exact version of RPi and Raspbian I should you. So that I can update my device and software to keep moving.

Thank you very much, Tony

ajstadlin commented 5 years ago

Comments: The 3 Raspberry Pi procedures were tested and documented when openPDC was still 32bit.

The following link is to a primordial openPDC on Raspberry Pi. I think this may be the image you referred to above

openPDC 2.1, Raspian image

Just out of curiosity, have you tried Raspbian Desktop for building and running openPDC in a virtual machine or x86 hardware?

//AJ

ajstadlin commented 5 years ago

FYI: I just tested the following advanced install-openPDC script in a Raspbian Desktop x86 virtual machine (Hyper-V) and default -p option. The result fails with a missing MonoGenCert.exe.

//AJ

Testing in:

ritchiecarroll commented 5 years ago

We need to setup a Linux build on Travis (or similar)

iliesaya commented 5 years ago

Dear Team, any news about this issue ? I am facing the same problem here :

https://pastebin.com/X28pYmhP

XBuild Engine Version 14.0 Mono, Version 5.10.1.20

ComponentModel/IValueExpressionAttribute.cs(26,7): error CS0246: The type or namespace name 'ExpressionEvaluator' could not be found (are you missing a using directive or an assembly reference?) ..... ComponentModel/TypeRegistryExtensions.cs(39,47): error CS0246: The type or namespace name 'TypeRegistry' could not be found (are you missing a using directive or an assembly reference?) ..... Done building project "/home/pi/GPA/gsf/Source/GridSolutionsFramework.sln".-- FAILED Build FAILED. install-openPDC.log

ritchiecarroll commented 5 years ago

FYI - this should be working OK. Make sure you are using the latest Mono.

If you still have trouble, here are some possible troubleshooting steps:

ajstadlin commented 5 years ago

Thank you for the follow-up and helpful troubleshooting guidance.

I am prepping to try the new Raspberry Pi 4 with 4GB RAM, hoping if the openPDC build does not work in the Raspbian OS, there may now be a supported Ubuntu Server 64bit OS to run on it. I will post back with the results.

ritchiecarroll commented 5 years ago

Just a note - @StephenCWills has a found a few minor build issues and is working on fix! :-)

lhartmann commented 4 years ago

Same issue, on docker containers with ubuntu or debian. The POSIX installer script seems to be outdated and broken.

README.md, in the "Deployment" section for POSIX refers to this document, which refers to this script, which tries to install openPDC version 2.5 (current stable is 2.7.4).

ajstadlin commented 4 years ago

There is an alternate script with some additional advanced options for getting other openPDC versions. Submitted by avs009 - Issue #88 proposed advanced install-openPDC script The actual "stable version" is a constant in the scripts and is easy to change.

I am interested in running openPDC on the Raspberry Pi platform - especially with the release of RPi-4 with plenty of RAM and 64bit Linux versions in the works. However, I am personally unable to work on it at this time. It is nice to see interest in alternate platforms.

//AJ

Milozpp commented 3 years ago

Hi to all, i'm trying to install openPDC in my vm running ubuntu20.04 but i'am facing a problem(one is exatcly the same posted in the post) namely 'cannot open assembly opt/openPDC/openPDC.exe: no such file or directory'. I saw the log file generated after the bash command sudo bash install-openPDC.sh has been throw and it reports a lot of entries that i found in old posts. This is the final output of my build command: cp: cannot stat ‘openPDC/Build/Output/Mono/Applications/openPDC/*’: No such file or directory mkdir: cannot create directory ‘/opt/openPDC/Database Scripts’: File exists cp: cannot stat ‘gsf/Build/Output/Mono/Tools/MonoGenCert/MonoGenCert.exe’: No such file or directory Creating transport layer security keys and certificates...

Cannot open assembly 'MonoGenCert.exe': No such file or directory. Installing GEP Subscription Tester...

Applying default POSIX configuration to openPDC installation...

openPDC installation complete. To start application, run: sudo mono /opt/openPDC/openPDC.exe -RunAsConsole"

My questions are: it is right try to install openPDC in my ubuntu20.04? It is a compatible platform? Could someone explains me what it the right procedure/configuration to fix my problems? TY

ashu704 commented 3 years ago

Thank you for the follow-up and helpful troubleshooting guidance.

I am prepping to try the new Raspberry Pi 4 with 4GB RAM, hoping if the openPDC build does not work in the Raspbian OS, there may now be a supported Ubuntu Server 64bit OS to run on it. I will post back with the results.

Tried installing on pi4 it shows the same error as this post

valentin-velev commented 2 years ago

The problem "cp: cannot stat 'MonoGenCert.exe': No such file or directory" appears because 'MonoGenCert.exe' is missing. Missing 'MonoGenCert.exe' file causes the following line in the script to fail: cp -v MonoGenCert.exe ${destDir}/ >> ${log} 'MonoGenCert.exe' can be compiled from GSF sources and then placed in the folder of 'install-openPDC.sh'. I have compiled 'MonoGenCert.exe' with Visual Studio in Windows.

At the end of the script 'install-openPDC.sh' I've got problem with the removing of 'gsf' folder in the case when 'gsf' is not downloaded and 'gsf' folder is not created. I have added a check to avoid failing of the remove action: if [ $downloadcompileGSF -ne 0 ]; then
rm -rv gsf >> ${log}
fi

ritchiecarroll commented 2 years ago

Try the latest release: https://github.com/GridProtectionAlliance/openPDC/releases/tag/v2.9.148