Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

What do I do about a "Server Error" in PAT 2.0.0?

asked 2017-01-31 10:06:41 -0500

updated 2017-08-20 15:00:14 -0500

I used the model created in Openstudio 1.12.0, and re-ran it in Openstudio 2.0.0. Then I put it into PAT and added measures which were also worked in old version (1.12.0). However, when I ran locally, it always told me "Server Error". Could someone tell me why the problem was caused and how to solve it? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2017-01-31 15:36:52 -0500

updated 2017-01-31 15:56:08 -0500

PAT 2.0 relies on a local instance of "OpenStudio Server" to work correctly. This is the same server that runs in the cloud if you're doing large scale analysis - it's just been packaged to run locally on your computer. The server can take up to a minute to start initially when you launch PAT, so it's possible you're trying to run your analysis before it's wide awake. If things still aren't working, here are some steps to help you get things working correctly.

1) Make sure all the server processes are running. Open your task or process manager and look for ruby processes. If the server's running, you should see several - roughly equal to the number of cores on your machine + 2.

image description

Also look for a process called mongod. This is a database the server stores results in temporarily while things are running.

2) Check to see if the server is responsive in your browser by going to http://localhost:8080. If you get an error saying the site can't be reached, things aren't running yet. You should see something like the following:

image description

If you've passed steps 1 and 2, then things should be good to run in PAT!

3) If you're still struggling, go to the Windows menu in PAT and select Server Troubleshooting Tools.

image description

If you click on Ping Server and Set Status, you should see a "Server is Alive" message in the upper right corner of PAT. On PAT's Run tab you should see something like this:

image description

If you've gotten here, things should definitely run when you click the Run Entire Workflow button.

4) If the server refuses to start, quit PAT and wait until any ruby and mongod processes have disappeared. Go into your project directory and look for files called local_configuration.json and local_configuration.receipt.

image description

These files should NOT be there if PAT and the server are halted. If PAT or the server have somehow crashed or been halted abnormally, it's possible these files may be hanging around and screwing things up. If that's the case then deleting these files, restarting PAT, and going back to step 1 may fix your problem. In general, you don't want to mess with these files while PAT or the server are doing their thing.

5) If all of that fails to get things working, the developers can help debug things further with the contents of your project's logs directory - particularly the rails.log file.

Please try these steps - in nearly all cases, just waiting for the server to start properly before trying to run an analysis should take care of things.

edit flag offensive delete link more

Comments

Thank you for your answer, and you provide a good instruction to check PAT. However, I think that I may face the problem about ruby part. Here is rails.log when I run PAT: C:/Program Files (x86)/openstudio-2.0.1/pat/OpenStudio-server/gems/gems/railties-4.2.0/lib/rails/app_rails_loader.rb:39:in exec': No such file or directory - "C:/Program Files (x86)/openstudio-2.0.1/pat/ruby/bin/ruby.exe" (Errno::ENOENT) from C:/Program Files (x86)/openstudio-2.0.1/pat/OpenStudio-server/gems/gems/railties-4.2.0/lib/rails/app_rails_loader.rb:39:inblock in exec_app_rails'. Could you give me some hints? THX

Yunyang Ye's avatar Yunyang Ye  ( 2017-02-07 09:16:33 -0500 )edit

There is a problem involving the space in the default installation location. Try reinstalling openstudio to C:/openstudio-2.0.1.

Kyle Benne's avatar Kyle Benne  ( 2017-02-07 14:45:10 -0500 )edit

Thanks a lot. It works.

Yunyang Ye's avatar Yunyang Ye  ( 2017-02-07 15:20:45 -0500 )edit

Thanks, That Helps

Saeed Elshayeb's avatar Saeed Elshayeb  ( 2018-02-14 09:33:27 -0500 )edit

I appear to be having a related issue with using a local server to run alternatives using PAT. I am getting several errors including those listed below. I'd appreciate any insight/assistance in troubleshooting.

(node:15056) DeprecationWarning: Archiver.bulk() deprecated since 0.21.0
Failed to load localhost:8080/data_points/4dddb1b8-f61d-48e0-889f-13ad0e554854/download_result_file?filename=out.osw resource: the server responded with a status of 422 (Unprocessable Entity)
GET DATAPOINT OUT.OSW ERROR (file probably not created yet)
422/404 Error...GETting datapoint json instead
cmorales's avatar cmorales  ( 2019-11-20 12:04:30 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

3 followers

Stats

Asked: 2017-01-31 10:06:41 -0500

Seen: 1,206 times

Last updated: Jan 31 '17