当我尝试在开放堆栈中创建的 vm 上运行“torque.setup”时,我收到错误“无法确定本地服务器主机名”
在任何其他虚拟机管理程序中创建的 VM 上安装扭矩不会出错,并且可以正常工作。
[root@cent63 github]# /var/spool/torque/github/torque.setup root
initializing TORQUE (admin: root@cent63)
PBS_Server: LOG_ERROR::pbsd_main, unable to determine local server hostname - getaddrinfo(cent63) failed, h_errno=1
ERROR: pbs_server failed to start, check syslog and server logs for more information
cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
[root@cent63 github]# hostname
cent63
[root@cent63 github]# service iptables status
iptables: Firewall is not running.
主机名已设置,那么扭矩在抱怨什么?
vim src/server/pbsd_main.c
snprintf(server_host, PBS_MAXHOSTNAME, "%s", optarg);
if (get_fullhostname(server_host, server_host, PBS_MAXHOSTNAME, EMsg) == -1)
{
/* FAILURE */
if (EMsg[0] != '\0')
{
char tmpLine[1024];
snprintf(tmpLine, sizeof(tmpLine),
"unable to determine full hostname for specified server host '%s' - %s",
server_host, EMsg);
log_err(-1, __func__, tmpLine);
}
else
{
log_err(-1, __func__, "unable to determine full server hostname");
}
exit(1);
}
更新:看起来我没有完全限定的主机名。
[root@cent63 github]# hostname -f
hostname: Unknown host
到目前为止,向 /etc/hosts 添加主机名并没有解决问题。