lmhostid获取hostid为空问题

lmhostid获取hostid为空问题

问题描述

今天迁移以前的一个装有flexlm的虚拟机,结果发现在迁移后启动时报错

... Wrong hostid on SERVER line for license file
...
... SERVER line says 00e081787ba8, hostid is (Cannot get hostid of type 2 [])
... Invalid hostid on SERVER line

解决办法

从问题描述看,好像是取到hostid有问题,用lmhostid检查一下,发现取到的hostid为”“

./lmhostid 
lmhostid - Copyright (c) 1989-2004 by Macrovision Corporation. All rights reserved.
The FLEXlm host ID of this machine is ""

由于FLEXlm会使用第一块网卡(eth0)的mac地址做hostid,所以用ifconfig检查网络配置,发现其中没有eth0,如下:

eth1      Link encap:Ethernet  HWaddr 00:E0:81:78:7B:A8  
          inet addr:192.168.0.88  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:81ff:fe78:7ba8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2463804 errors:0 dropped:0 overruns:0 frame:0
          TX packets:345560 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:924819172 (881.9 MiB)  TX bytes:34087357 (32.5 MiB)
          Interrupt:11 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2843863 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2843863 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:729294023 (695.5 MiB)  TX bytes:729294023 (695.5 MiB)

但是在用linux自带网络配置工具和/etc/sysconfig/network-scripts/下的文件配置看,确实是用的eth0。这说明配置出现了不一致问题。

最后,检查/etc/udev/rules.d/70-persistent-net.rules文件

# PCI device 0x1af4:0x1000 (virtio-pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*l", ATTR{address}=="00:e0:81:78:7b:a8", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10ec:0x8139 (8139cp)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:81:78:7b:a8", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

发现了问题,里面有两个网卡配置项,果断修改为

# PCI device 0x10ec:0x8139 (8139cp)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:81:78:7b:a8", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

然后重新启动机器,问题解决。

转载请以链接形式标明本文地址
本文地址:http://blog.csdn.net/kongxx/article/details/50480696

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值