gpt4 book ai didi

linux - CentOS 中主机名未正确解析

转载 作者:太空宇宙 更新时间:2023-11-04 03:54:38 25 4
gpt4 key购买 nike

我在虚拟机上运行 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com