I changed the port in the license file from 27002 to 27009 and could then start it. So clearly something is using 27002. Which is very strange beause we use static ports in all license files for all our applications. And there is know other application using 27002.
Error: Failed to open the TCP port number in the license.
23 views (last 30 days)
Show older comments
Hello!
I get error Failed to open the TCP port number in the license. trying to start Matlab in LMTOOLS.
It worked yesterday. But now can't be started. There is no changes in the license file. And it containts correct hostname, MAC and ports.
lmgrd and daemon for Matlab isn't already running. And nothing else listening on the same port.
C:\Flexlm\Matlab>netstat -aon | find ":27002"
TCP 0.0.0.0:27002 0.0.0.0:0 LISTENING 4376
Appreciate help!
Accepted Answer
Hassaan
on 17 Jan 2024
Edited: Hassaan
on 17 Jan 2024
Check for Running Processes: Make sure that no other process is using the port specified in your license file. The port might be stuck in the TIME_WAIT state or may still be occupied by a previous instance of the license manager that hasn't fully shut down.
In your case, it seems like there is a process listening on port 27002, which could be the MATLAB license manager from a previous instance. You can try to end this process by using the task manager or the taskkill command:
taskkill /PID 4376 /F
Restart the LMTOOLS Utility: Close the LMTOOLS utility, then reopen it and try to start the license manager again.
Check for Firewalls or Antivirus Software: Ensure that your firewall or antivirus software is not blocking the port. You might need to add an exception for the port or for the lmgrd.exe and MATLAB daemon executables.
Check License Server Status: Use the LMTOOLS utility to check the status of the license server. It can provide information on whether the server is running and which ports it's using.
Reboot Your Machine: If you can't find the process that's using the port, try rebooting your machine to clear up any stuck processes that might be holding onto the port.
Use a Different Port: If the default port is not working for some reason, you can try to specify a different port in your license file. To do this, you would change the line in the license file that specifies the port, which typically looks like this:
SERVER myserver 1234567890ab 27000
Change 27000 to another port number, for example, 27005, and then save the file. Make sure to update your firewall settings if you change the port number.
Contact Support: If none of these steps resolve the issue, you may need to contact MathWorks support for further assistance. They can provide guidance specific to your situation and help troubleshoot license server issues.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
- Technical Services and Consulting
- Embedded Systems | Firmware Developement | Simulations
- Electrical and Electronics Engineering
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Feel free to contact me.
2 Comments
Hassaan
on 19 Jan 2024
@Andreas That's great.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
- Technical Services and Consulting
- Embedded Systems | Firmware Developement | Simulations
- Electrical and Electronics Engineering
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Feel free to contact me.
More Answers (0)
See Also
Categories
Find more on Manage Products in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!