2013-04-11 109 views
1

当我试图在开放堆栈中创建一个虚拟机上运行“torque.setup”,我得到扭矩无法确定本地服务器的主机名

在虚拟机上安装扭矩产生的错误“无法确定本地服务器的主机名”在任何其他虚拟机管理程序中不会出现错误,并能正常工作

[[email protected] github]# /var/spool/torque/github/torque.setup root 
initializing TORQUE (admin: [email protected]) 
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 

[[email protected] github]# hostname 
cent63 


[[email protected] 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); 
     } 

UPDATE:它看起来像我没有一个完全合格的主机名。

[[email protected] github]# hostname -f 
hostname: Unknown host 

到目前为止,向/ etc/hosts添加主机名尚未解决问题。

回答

1

功能

get_fullhostname(server_host, server_host, PBS_MAXHOSTNAME, EMsg) 

通过增加虚拟机的IP地址添加到/ etc是否主机名-f

我解决了它的等效/ hosts文件

10.2.191.12 cent63 
相关问题