2013-04-11 52 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 
相關問題