Running PAT on VirtualBox VM - server won't launch

asked 2024-05-08 12:59:35 -0600

sduncan's avatar

updated 2024-05-21 13:17:07 -0600

Hello!

I have a goal to install OpenStudio Application and Parametric Analysis Tool onto a Windows Virtual Machine, and then transfer that VM (file) to a colleague (external to my institution) to enable them to explore models made by my team without having to worry about installation and configuration of the BEM tools.

Towards that end:

I installed Parametric Analysis Tool 3.6.1 on an Oracle VirtualBox virtual machine running Windows 11. The software loads, but when I try to "Start Local Server" (via Server Tools), it says "Error, Server Did Not Start". I am able to get the Localhost:8080 server to run locally on a normal Windows 11 desktop, so I think I should be able to replicate in a VM. (Note: I already made sure that I don't have spaces in folder names or other things that might trip up a server.)

So:

1) Is there some fundamental reason why the server would not run on a VirtualBox VM (with Windows 11 as the OS)? Is localhost disabled or referenced differently in some way that would preclude PAT using it?

2) More specifically, do the debug messages below give a clue to the root problem? (Sorry, I apparently lack enough Karma points to post screenshots.)

Edit1: I reviewed this oft-referenced post but it did not help: https://unmethours.com/question/22431...

Thank you, Dr. Scott Duncan duncan@gatech.edu

Log file:

angular.js:15697 
START SERVER...SERVER TYPE:  local              

angular.js:15697 
SERVER STATUS:  stopped     

angular.js:15697 
stop server command:  "C:\ParametricAnalysisTool-3.6.1\pat\ruby\bin\ruby.exe" "C:\ParametricAnalysisTool-3.6.1\pat\OpenStudio-server\bin\openstudio_meta" stop_local "C:\ParametricAnalysisTool-3.6.1\pat\debugger3"            

angular.js:15697 
start server command:  "C:\ParametricAnalysisTool-3.6.1\pat\ruby\bin\ruby.exe" "C:\ParametricAnalysisTool-3.6.1\pat\OpenStudio-server\bin\openstudio_meta" start_local --worker-number=3 --energyplus-exe-path="C:\ParametricAnalysisTool-3.6.1\pat\EnergyPlus\energyplus.exe" --openstudio-exe-path="C:\ParametricAnalysisTool-3.6.1\pat\OpenStudio\bin\openstudio.exe" --ruby-lib-path="C:\ParametricAnalysisTool-3.6.1\pat\OpenStudio\Ruby" --mongo-dir="C:\ParametricAnalysisTool-3.6.1\pat\mongo\bin" --debug "C:\ParametricAnalysisTool-3.6.1\pat\debugger3"  

app-67784043cc.js:1 
Child pid: 7988                         

app-67784043cc.js:1 
child exited due to receipt of signal null (exit code 1)


angular.js:15697 
Server failed to start
(anonymous) @   angular.js:15697


angular.js:15697 
SERVER ERROR
(anonymous) @   angular.js:15697

app-67784043cc.js:1 
exec error: Error: Command failed: "C:\ParametricAnalysisTool-3.6.1\pat\ruby\bin\ruby.exe" "C:\ParametricAnalysisTool-3.6.1\pat\OpenStudio-server\bin\openstudio_meta" start_local --worker-number=3 --energyplus-exe-path="C:\ParametricAnalysisTool-3.6.1\pat\EnergyPlus\energyplus.exe" --openstudio-exe-path="C:\ParametricAnalysisTool-3.6.1\pat\OpenStudio\bin\openstudio.exe" --ruby-lib-path="C:\ParametricAnalysisTool-3.6.1\pat\OpenStudio\Ruby" --mongo-dir="C:\ParametricAnalysisTool-3.6.1\pat\mongo\bin" --debug "C:\ParametricAnalysisTool-3.6.1\pat\debugger3"

    at __node_internal_genericNodeError (node:internal/errors:841:15)
    at ChildProcess.exithandler (node:child_process:407:12)
    at ChildProcess.emit (node:events:539:35)
    at maybeClose (node:internal/child_process:1092:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5)

app-67784043cc.js:1 
child closed ...
(more)
edit retag flag offensive close merge delete

Comments

Can you open cmd.exe (or powershell), and run that openstudio_meta start_local command with a --verbose adde din between?

"C:\ParametricAnalysisTool-3.6.1\pat\ruby\bin\ruby.exe" "C:\ParametricAnalysisTool-3.6.1\pat\OpenStudio-server\bin\openstudio_meta" --verbose start_local [... rest of arguments ...]
Julien Marrec's avatar Julien Marrec  ( 2024-05-13 03:13:01 -0600 )edit

I find it strange that your project (apparently named debugger3 and placed at C:\ParametricAnalysisTool-3.6.1\pat\debugger3) is placed within the PAT install folder itself. Typically you'd work outside of it, like in C:\Users\scott\PAT_Projects or whatever. Try that too.

And check the rails.log under <project_dir>/logs/rails.log (I think)

Julien Marrec's avatar Julien Marrec  ( 2024-05-13 03:17:36 -0600 )edit

Thank you for the suggestion. Please see EDIT2 to the original post for what the output was. (I tried to put that in an "Answer" post but the website accused me of spamming. :)

A couple of thoughts:

  1. I did move the PAT test file, "model_for_debug", out of the PAT directory to see if it would work better. (I had done that based on a suggestion from another post -- possibly a misinterpretation by me.) Same failure to start the server.
  2. I see that no log files (ruby or mongo) are ever output to "C:\Users\mbx\Documents\model_for_debug/logs/". Seems very suspicious.
sduncan's avatar sduncan  ( 2024-05-13 14:26:24 -0600 )edit

@BrianLBall does that ring a bell to you please?

Julien Marrec's avatar Julien Marrec  ( 2024-05-15 02:33:11 -0600 )edit

trying to catch up, so it does work on the local Windows 11 base box, but the server wont start in the virtualbox VM on the same computer? is that correct? if that is the case, then the issue as Julien suggested is trying to get

>C:\ParametricAnalysisTool-3.6.1\pat\ruby\bin\ruby.exe C:\ParametricAnalysisTool-3.6.1\pat\OpenStudio-server\bin\openstudio_meta --debug --verbose start_local

to work. This could be failing to start because of firewall settings in the VM, the server needs to use several ports to communicate

BrianLBall's avatar BrianLBall  ( 2024-05-15 08:45:49 -0600 )edit