Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAT 3.0.1 Local Server Fails to Start on OSX 10.15.6 #159

Closed
ljbrackney opened this issue Aug 4, 2020 · 8 comments · Fixed by #160
Closed

PAT 3.0.1 Local Server Fails to Start on OSX 10.15.6 #159

ljbrackney opened this issue Aug 4, 2020 · 8 comments · Fixed by #160
Assignees

Comments

@ljbrackney
Copy link

New install of OS 3.0.1, OS App 1.0, and PAT 3.0.1.

OS App loads and runs a 2.9.1 model as expected.
Loading 2.9.1 PAT project based on that SEED goes okay, but server fails to start. OpenStudio Measure Manager process starts okay. Ruby processes start, then collapse. Developer console dump follows.

Selected Server URL set to: http://localhost:8080
vendor-ad64e72158.js:5 MeasureManager: [2020-08-04 11:31:07] INFO WEBrick 1.4.2
[2020-08-04 11:31:07] INFO ruby 2.5.5 (2019-03-15) [x86_64-darwin18]
[2020-08-04 11:31:07] INFO WEBrick::HTTPServer#start: pid=3672 port=3100

vendor-ad64e72158.js:5 MeasureManager: ::1 - - [04/Aug/2020:11:31:12 EDT] "GET / HTTP/1.1" 200 75

  • -> /

vendor-ad64e72158.js:5 Measure Manager getMyMeasuresDir Success!, status: 200
vendor-ad64e72158.js:5 MeasureManager: ::1 - - [04/Aug/2020:11:31:13 EDT] "POST /bcl_measures HTTP/1.1" 200 42496

  • -> /bcl_measures

vendor-ad64e72158.js:5 Measure Manager bcl_measures Success!, status: 200
vendor-ad64e72158.js:5 START SERVER...SERVER TYPE: local
vendor-ad64e72158.js:5 SERVER STATUS: stopped
vendor-ad64e72158.js:5 stop server command: "/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/ruby/bin/ruby" "/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio-server/bin/openstudio_meta" stop_local "/Users/Zeiram/Documents/OpenStudio/MyPATSchoolProject"
vendor-ad64e72158.js:5 start server command: "/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/ruby/bin/ruby" "/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio-server/bin/openstudio_meta" start_local --worker-number=3 --energyplus-exe-path="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/EnergyPlus/energyplus" --openstudio-exe-path="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio/bin/openstudio" --ruby-lib-path="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio/Ruby" --mongo-dir="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/mongo/bin" --debug "/Users/Zeiram/Documents/OpenStudio/MyPATSchoolProject"
app-77544dda7e.js:6 Child pid: 3682
app-77544dda7e.js:6 child exited due to receipt of signal null (exit code 1)
vendor-ad64e72158.js:5 Server failed to start
(anonymous) @ vendor-ad64e72158.js:5
vendor-ad64e72158.js:5 SERVER ERROR
(anonymous) @ vendor-ad64e72158.js:5
app-77544dda7e.js:6 exec error: Error: Command failed: "/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/ruby/bin/ruby" "/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio-server/bin/openstudio_meta" start_local --worker-number=3 --energyplus-exe-path="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/EnergyPlus/energyplus" --openstudio-exe-path="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio/bin/openstudio" --ruby-lib-path="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio/Ruby" --mongo-dir="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/mongo/bin" --debug "/Users/Zeiram/Documents/OpenStudio/MyPATSchoolProject"

at ChildProcess.exithandler (child_process.js:282:12)
at emitTwo (events.js:130:20)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:921:16)
at Socket.stream.socket.on (internal/child_process.js:348:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:549:12)

app-77544dda7e.js:6 child closed due to receipt of signal null (exit code 1)
vendor-ad64e72158.js:5 ERROR in start local server: undefined
(anonymous) @ vendor-ad64e72158.js:5

@brianlball
Copy link
Collaborator

can you run the start_local command from a command line with the --verbose flag and post the results:

/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/ruby/bin/ruby /Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio-server/bin/openstudio_meta --verbose start_local --worker-number=3 --energyplus-exe-path="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/EnergyPlus/energyplus" --openstudio-exe-path="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio/bin/openstudio" --ruby-lib-path="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio/Ruby" --mongo-dir="/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/mongo/bin" --debug "/Users/Zeiram/Documents/OpenStudio/MyPATSchoolProject"

@brianlball
Copy link
Collaborator

@ljbrackney can you post the rails.log from the /logs folder?

@tijcolem
Copy link
Collaborator

tijcolem commented Aug 4, 2020

I'm guessing this is the reason with osx Catalina moving the core libs. rails/execjs#89
We can either patch via our forked branch gem or apply a .patch file on the server gem build step. I'd prob vote the former and then put a note by the Gemfile sourced branch version.

@tijcolem tijcolem self-assigned this Aug 4, 2020
@tijcolem
Copy link
Collaborator

tijcolem commented Aug 4, 2020

@ljbrackney you can actually manually patch this gem yourself in the pat install build folder. If you installed it to the default location, the file that needs to patched is:

/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio-server/gems/gems/execjs-2.7.0/lib/execjs/runtimes.rb

Then just apply this change here - paulmakepeace/execjs@f322be5

@ljbrackney
Copy link
Author

ljbrackney commented Aug 5, 2020

@ljbrackney you can actually manually patch this gem yourself in the pat install build folder. If you installed it to the default location, the file that needs to patched is:

/Applications/ParametricAnalysisTool-3.0.1/ParametricAnalysisTool.app/Contents/Resources/OpenStudio-server/gems/gems/execjs-2.7.0/lib/execjs/runtimes.rb

Then just apply this change here - paulmakepeace/execjs@f322be5

This fixed the problem. Thanks!

This does need to get fixed in an installer, as I'm going to have students trying to run PAT.

@tijcolem
Copy link
Collaborator

tijcolem commented Aug 5, 2020

Great! I'll post a new installer here soon with a patched version of this.

@tijcolem
Copy link
Collaborator

tijcolem commented Aug 7, 2020

@ljbrackney Can you please try this patched osx installer and see if that addresses this execjs issue?

https://openstudio-pat-ci-builds.s3-us-west-2.amazonaws.com/patch-execjs-gem/ParametricAnalysisTool-3.0.1-Darwin.dmg

If this fixes it, I will update the github release page.

@brianlball
Copy link
Collaborator

This worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants