Question about error 61 : Connection refused

395 views
Skip to first unread message

Mohamed Hosny

unread,
May 30, 2017, 6:12:28 PM5/30/17
to AMPL Modeling Language
Good Day, 
I have a small question regarding a floating license. as a host computer, i am getting consistently this message " netlicchk: Invoking "/usr/local/bin/ampl_lic".

20170531  0:04:27: Cannot create lock file "/usr/local/bin/MacBook-Air-3.ampl_lock" for ampl_lic.


AMPL network license manager version 20170131 (Darwin 10.8.0 x86_32).

Today = 20170530; found license file "/usr/local/bin/ampl.lic":

PORT = 1234.165.55.243


netlicchk: Could not connect with license manager: errno 61: connection refused.

Is ampl_lic running on the network license server?.

Today = 20170530; found license file "/usr/local/bin/ampl.lic":

PORT = 1234.165.55.243


AMPL Version 20170412 (Darwin 10.8.0 x86_32)


logout

Saving session...

...copying shared history...

...saving history...truncating history files...

...completed.


[Process completed]"


would some have encountered the same problem and be kind enough to share with me how he overcame it .


Kind regards 


Mohamed

Robert Fourer

unread,
May 31, 2017, 10:25:32 AM5/31/17
to am...@googlegroups.com
The AMPL floating license manager "ampl_lic" write some temporary files, and by default these go into the same folder that contains the ampl_lic file. In your case that folder is /usr/local/bin, and it appears that macOS is not giving AMPL permission to write to that folder.

We recommend putting all of your AMPL and solver files, including the files for the floating license manager, into a separate "AMPL folder" where you have full permissions, rather than into a system folder. For example you can use a folder on your desktop or inside another folder on your desktop. We also see that your ampl.lic file is "PORT = 1234.165.55.243" which is not correct. It should have the one line

MGR_IP = 37.165.55.243

If you want to specify 1234 as your port, then you should add a second line "PORT = 1234".

It is also allowed to add a line of the form

STATEFILE = "..."

where ... is replaced by the path to a folder where you want ampl_lic to write the temporary files. This folder should not be /tmp since its contents are lost on a restart; /var/tmp may work, however.

Bob Fourer
am...@googlegroups.com

=======

Mohamed Hosny

unread,
Jun 1, 2017, 2:30:03 PM6/1/17
to am...@googlegroups.com
Dear Bob ,

Thank you so much you the support .

Will proceed with your instructions .

Kind regards ,

Mohamed Hosny
> --
> You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/K2fCLyYeVFA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
> To post to this group, send email to am...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ampl.
> For more options, visit https://groups.google.com/d/optout.

Mohamed Hosny

unread,
Jun 2, 2017, 7:16:12 AM6/2/17
to am...@googlegroups.com
Good Day , 

Apologies for the repeated questions . 

i have followed the instructions indicated and there is progress.

Currently i am getting the following error : 

Last login: Fri Jun  2 13:10:48 on ttys000
MacBook-Air-3:~ Mohamed$ /Users/Mohamed/Desktop/AMPL/ampl\ 3 ; exit;
netlicchk: Trying to start license manager ampl_lic.
netlicchk: Invoking "/Users/Mohamed/Desktop/AMPL/ampl_lic".
netlicchk: Could not connect with license manager: errno 60: connection timed out.
Is port 5195 blocked on the client or network license server?.
Today = 20170602; found license file "/Users/Mohamed/Desktop/AMPL/ampl.lic":
MGR_IP = 37.165.55.243

AMPL Version 20170531 (Darwin 10.8.0 x86_32)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]


Apprecaite your assistance .

Kind Regards , 

Mohamed 

Robert Fourer

unread,
Jun 2, 2017, 9:51:45 AM6/2/17
to am...@googlegroups.com
According to the information you provided, you wanted to use MacBook-Air-3 as your floating license server. However, the floating license manager, ampl_lic, is only finding a license file ampl.lic for a client computer. To use MacBook-Air-3 as the server and to also run AMPL on it, place the attached file ampl.netlic in the same folder as ampl.lic. Then try running AMPL again.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Mohamed Hosny
ampl.netlic

Mohamed Hosny

unread,
Jun 2, 2017, 9:55:48 AM6/2/17
to am...@googlegroups.com
Good day ,

Infact , the Mackbook-Air-3 is intended to be a client and not a server .

Maybe this is why it is not working correctly though i have only placed the IP in the amp.lic as instructed.

in order to make sure that Macbook is identified as a client , is there is any changes i need to do to the setup ?

If not , would would let me know why it is not going through ?

Appreciate your patience and support .

Kind Regards ,

Mohamed
> --
> You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/K2fCLyYeVFA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
> To post to this group, send email to am...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ampl.
> For more options, visit https://groups.google.com/d/optout.
> <ampl.netlic>

Robert Fourer

unread,
Jun 3, 2017, 12:28:43 PM6/3/17
to am...@googlegroups.com
With a floating license, first you need to choose a computer to be your AMPL license server, and you need to set up the server software on that computer. Then after the server is set up and the ampl_lic program is running on the server, you can set up a client to "check out" a license from the server.

Our records show "MacBook-Air-3" as being your license server. To set up a different computer as the server, send (1) a fingerprint string for the server computer, and (2) the IP address of the server computer, in an email to lice...@ampl.com. Instructions for generating the fingerprint string can be found at http://ampl.com/try-ampl/get-fingerprint/ or in the installation instruction email that we sent you.

Bob Fourer
am...@googlegroups.com

SAYEDAHMED Mohamed

unread,
Jun 4, 2017, 7:14:09 PM6/4/17
to am...@googlegroups.com
i have tried to place the file in the folder given that Matchbook-air-3 is the server and i got the following message : 

MacBook-Air-3:~ Mohamed$ /Users/Mohamed/Desktop/AMPL/ampl ; exit;
netlicchk: Trying to start license manager ampl_lic.
netlicchk: Invoking "/Users/Mohamed/Desktop/AMPL/ampl_lic".
20170605  0:07:09: MGR_IP = "37.165.55.243" is not attached to this machine.
20170605  0:07:09: Starting ampl_lic, but only serving licenses to this machine.

would kindly advise the next step to 

Robert Fourer

unread,
Jun 5, 2017, 10:49:04 AM6/5/17
to am...@googlegroups.com
These messages,

20170605 0:07:09: MGR_IP = "37.165.55.243" is not attached to this machine.
20170605 0:07:09: Starting ampl_lic, but only serving licenses to this machine.

indicate that there is a problem with the IP address. You told us the IP address of MacBook-Air-3 was 37.165.55.243, and that is the IP address given in the ampl.lic and ampl.netlic files, but apparently that is not the current IP address of MacBook-Air-3.

If you change the IP address given in the first line of ampl.lic and ampl.netlic so that it is the current IP address of MacBook-Air-3, then you should not get these errors.

However if you only want to run AMPL on MacBook-Air-3 for now, then you ignore these error messages. To check that everything is working properly, open a Terminal application on your Mac, and enter the following commands at the prompts:

cd /Users/Mohamed/Desktop/AMPL
/Users/Mohamed/Desktop/AMPL/ampl_lic
ampl_lic status
ampl_lic netstatus
ampl_lic licshow
ampl

After the last command ("ampl") you should see an "ampl:" prompt and you will be ready to use AMPL by typing commands. If you still have any problems, please copy *all* of the output from the above commands and send it in an email to lice...@ampl.com for technical support.

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages