Gekko unreachable server, local solving json file error

405 views
Skip to first unread message

Mike

unread,
May 7, 2020, 11:57:21 AM5/7/20
to apmonitor

I think I'm running into the same problem as this stack overflow. 

Unreachable server working with GEKKO. What is going on?

Yesterday I was able to solve my Gekko model and today I'm not even able to solve the examples from the Apmonitor site. Solving takes forever and I get the following error: 

ImportError: No solution or server unreachable.
  Show errors with m.solve(disp=True).
  Try local solve with m=GEKKO(remote=False).

I tried a solving it locally as was suggested in the stack overflow from above an in the error, like this

m = GEKKO(remote=False)

However, I then get the following error:

Error: 'results.json' not found. Check above for additional error details
Traceback (most recent call last):

and

FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/mr/kgzm2xln40dcc10zkq06drhc0000gn/T/tmpzqxlyw7_gk_model0/options.json'

Is the server down and can anyone help me solving it locally?

John Hedengren

unread,
May 7, 2020, 12:12:41 PM5/7/20
to APM Google Groups
Mike,

Yes, it appears that the server is down right now. I'll work to get it back up and running soon. If you'd like to post your problem to StackOverflow, we can help you with the local solution. The local solution may be different from the server solution when using IPOPT because of what we can distribute as local executables. Some of the better linear solvers require a license. One thing to try is to switch solvers with:

m.options.SOLVER = 1  # or 2

Here are other StackOverflow questions with tag [gekko]. I see that you recently posted there: https://stackoverflow.com/questions/61655102/gekko-unreachable-server-local-solving-json-file-error For help with the local solution, a minimal and verifiable question is much easier to answer. Try to include a shortened version of your problem that demonstrates the issue.

Best regards,

John Hedengren

--
--
APMonitor user's group e-mail list.
- To post a message, send email to apmo...@googlegroups.com
- To unsubscribe, send email to apmonitor+...@googlegroups.com
- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apmonitor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apmonitor/6a4512b4-80ff-4936-8b4e-08d3be3658af%40googlegroups.com.


--
Best regards,

John Hedengren
GEKKO Optimization Suite

Mike

unread,
May 8, 2020, 10:25:45 AM5/8/20
to apmonitor
Thank you for your answer ans sorry for having such an extensive question on StackOverflow (was my first time posting a question there). Switching solvers does not seem to work (m.options.SOLVER = 1  # or 2). Should I try brew install as you suggested in another post? 

Op donderdag 7 mei 2020 18:12:41 UTC+2 schreef John Hedengren:
- To unsubscribe, send email to apmo...@googlegroups.com

- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apmo...@googlegroups.com.

John Hedengren

unread,
May 8, 2020, 10:41:27 AM5/8/20
to APM Google Groups
Mike,

That was a very good question on Stack Overflow and will help others who are looking for that same error. If you are using MacOS then installing gcc libraries (such as brew install gcc) is required to run locally because of the missing shared libraries. More details are here: https://github.com/BYU-PRISM/GEKKO/issues/79

-John Hedengren

- To unsubscribe, send email to apmonitor+...@googlegroups.com

- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apmonitor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apmonitor/f60cd50c-0c2a-4963-9d6e-4198aa9a9e4e%40googlegroups.com.

Mike

unread,
May 8, 2020, 11:56:08 AM5/8/20
to apmonitor
Thank you! It worked. 

Op donderdag 7 mei 2020 17:57:21 UTC+2 schreef Mike:
Reply all
Reply to author
Forward
0 new messages