AMPL knitro Solver help

I have used pyomo to call ampl to use knitro for a few days. Suddenly it reported:

License file /Users/john/anaconda3/envs/power/lib/python3.11/site-packages/ampl_module_base/bin/ampl.lic:
Today = 20240506; found license file "/Users/john/anaconda3/envs/power/lib/python3.11/site-packages/ampl_module_base/bin/ampl.lic":
# Temporary KNITRO, BARON, AMPL, CONOPT, CPLEX, GUROBI, LGO,
# LINDOGLOBAL, LOQO, MINOS, SNOPT, XPRESS, OCTERACT, COPT & MOSEK
# single-machine server license expiring 20240531
# licensed to AMPL Community Edition License for
....

No knitro license for this machine.
knitro (Darwin x86_64), licchk(20240209), ASL(20240106)
ERROR: Solver (asl) returned non-zero return code (2)
ERROR: See the solver log above for diagnostic information.
....

I wonder why this happened, cause I didn’t change anything to the license nor solve api.

Hi @john,

Could you please send us the amplkey.log file that should be at /Users/john/anaconda3/envs/power/lib/python3.11/site-packages/ampl_module_base/bin/amplkey.log?


Is it due to the network problem?

Hi @john,

Yes, something seems to be blocking the internet connection which is required by this license type.

If there any solution to solve this issue? Because my optimization problem is huge, it could takes a few hours, I can’t afford to start it over and over again. BTW, thanks a lot!

Hi @john,

The internet issue is likely from you side, and the system does not block immediately, it needs to be a big interruption. Also, if the license validates before it starts solving, the solve process is not interrupted. Many companies run critical systems in production with it. We don’t have free offline lines, if you really need an offline license you need to buy one.