ANSYS FlexNet Licensing not running的一种解决方法

ANSYS真是一款让人欢喜让人忧,又贵又糟心的软件!安装比较复杂不说,就是在成功安装之后,日常使用过程中,也会有时不时地无法启动的情况。

这几天我电脑的ANSYS就遇到了FlexNet Licensing not running的问题,这可是一个老大难,用了几天的空闲时间琢磨并最终解决了,记在这里,或许对其他朋友也有用——不好意思的是,我在解决问题的过程中并没有想到要写教程,所以没有截图,这里就用纯文字说明了,见谅。

问题描述

ANSYS无法启动,提示信息包括许可证服务器无法启动,或者提到“request name XXXX does not exist in the licensing pool”。

打开ANSYS License Management Center,发现Licensing Interconnect: running ;Licensing Interconnect Monitor: running,只有FlexNet Licensing没有启动。

通过查看点击查看View FlexNet Debug Log,见到错误信息为:

(lmgrd) SLOG: Summary LOG statistics is enabled.
(lmgrd) The TCP port number in the license, 1055, is already in use.
(lmgrd) Possible causes:
(lmgrd) 1) The license server manager (lmgrd) is already running for this license.
(lmgrd) 2) The OS has not "cleared" this port since lmgrd died.
(lmgrd) 3) Another process is using this port number (unlikely).
(lmgrd) Solutions:
(lmgrd) 1) Make sure lmgrd and all vendor daemons for this
(lmgrd) license are not running.
(lmgrd) 2) You may have to wait for the OS to clear this port.
(lmgrd) Retrying for about 5 more minutes
(lmgrd) Still trying...
(lmgrd) Still trying...
(lmgrd) Still trying...
(lmgrd) Failed to open the TCP port number in the license.

可能的原因

根据程序给出的错误提示信息,判断是许可证服务器出现了问题,不需要进行ANSYS的重新安装,顶多就是重安装许可证服务器而已。

可能原因1:端口占用

是不是有其他程序占用了1055端口呢?

利用命令查询1055端口对应的进程:netstat -ano | findstr "1055"

然后查询对应PID的进程名:tasklist | findstr "11892" (11892为进程pid)

通常来讲,极少遇到其他程序占用1055端口的情况,尤其如果看到netstat结果显示TCP地址只有0.0.0.0的时候(而不是127.0.0.1),说明许可证服务器自身出了问题。

可能原因2:License过期

重新生成License.txt,并重新导入,重启,未解决问题。

可能原因3:环境变量

经查询,丢失了环境变量:ANSYSLMD_LICENSE_FILE=1055@hostname

设置后重启,未解决问题。

最后的办法:重装许可证服务器

在试了几乎所有能找到的方法均未果后,想到了最后的办法,那就是重装License server。

然而,这个操作也是很讲究的。如果只是重新覆盖安装许可证服务器程序,则问题会依旧;如果将程序安装目录下的Shared Files目录删掉(前提是在任务管理器中终止ANSYS相关进程),则问题大概还会存在;如果在注册表中删除与ANSYS有关的项,尤其与系统服务相关的那几项,还可能导致无法重装许可证服务器的悲剧(因此删除注册表中项目之前的备份就很重要了)……

正确地操作在这里:

  1. 打开任务管理器,终止掉与ANSYS有关的进程;
  2. 以管理员身份打开CMD窗口,进入C: \ Program Files \ Ansys Inc \ Shared Files \ Licensing \ winx64 目录中,运行命令:ansysli_server.exe -k uninstall,删除server服务;
  3. 重启
  4. 删除Shared Files目录,再重启
  5. 重新安装许可证服务器

如上操作,我重装了许可证服务器,重新导入License之后,一切恢复正常!

长河

在曾经的博客时代,是“首个桥隧工程领域独立博主”,目前是一名默默耕耘的普通高校教师。一家之言,仅供参考,未必成熟、绝不权威。

相关推荐

WordPress › 错误