我在虚拟机上运行CentOS。我的/ etc / hosts文件如下:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.50.17 192-168-50-17.openstacklocal 192-168-50-17
192.168.50.13 slave5
/etc/resolv.conf:
; generated by /sbin/dhclient-script
search openstacklocal
nameserver 192.168.50.3
nameserver 8.8.8.8
nameserver 8.8.4.4
所有ping正常运行。但是,当我尝试运行以下命令时-
/usr/lib64/lustre/tests/llmount.sh,这就是我得到的:
Loading modules from /usr/lib64/lustre/tests/..
detected 1 online CPUs by sysfs
libcfs will create CPU partition based on online CPUs
debug=vfstrace rpctrace dlmtrace neterror ha config ioctl super lfsck
subsystem_debug=all -lnet -lnd -pinger
Formatting mgs, mds, osts
Format mds1: /tmp/lustre-mdt1
Format ost1: /tmp/lustre-ost1
mkfs.lustre: Cannot resolve hostname '192-168-50-17@tcp'.
mkfs.lustre: exiting with 1 (Operation not permitted)
我以root用户身份运行它。任何帮助解决此问题将不胜感激。谢谢!
最佳答案
为什么/ etc / hosts文件的IP地址看起来像是短划线(-)而不是点(。)?您可能只需要从(或整个)/ etc / hosts文件中删除这些行。
关于linux - 主机名在CentOS中无法正确解析,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25185572/