一次cloudstack啟動cloudstack-agent報錯的處理過程
阿新 • • 發佈:2017-11-17
cloudstack
故障現象:Centos7.3使用yum安裝完cloudstack-agent後,嘗試啟動cloudstack-agent服務,看了下,服務無法正常啟動,要麽就是啟動後,馬上就停止了,查看日誌發現如下報錯:
# cat /var/log/cloudstack/agent/agent.log 2017-11-16 23:30:24,507 WARN [cloud.resource.ServerResourceBase] (main:null) (logid:) Nics are not specified in properties file/db, will try to autodiscover 2017-11-16 23:30:24,512 INFO [cloud.resource.ServerResourceBase] (main:null) (logid:) Designating private to be nic br0 2017-11-16 23:30:24,534 INFO [kvm.resource.LibvirtConnection] (main:null) (logid:) No existing libvirtd connection found. Opening a new one 2017-11-16 23:30:24,787 INFO [org.reflections.Reflections] (main:null) (logid:) Reflections took 51 ms to scan 1 urls, producing 7 keys and 10 values 2017-11-16 23:30:24,802 ERROR [cloud.agent.AgentShell] (main:null) (logid:) Unable to start agent: Failed to get private nic name 2017-11-16 23:30:35,350 INFO [cloud.agent.AgentShell] (main:null) (logid:) Agent started 2017-11-16 23:30:35,352 INFO [cloud.agent.AgentShell] (main:null) (logid:) Implementation Version is 4.9.2.0 2017-11-16 23:30:35,354 INFO [cloud.agent.AgentShell] (main:null) (logid:) agent.properties found at /etc/cloudstack/agent/agent.properties 2017-11-16 23:30:35,358 INFO [cloud.agent.AgentShell] (main:null) (logid:) Defaulting to using properties file for storage 2017-11-16 23:30:35,359 INFO [cloud.agent.AgentShell] (main:null) (logid:) Defaulting to the constant time backoff algorithm 2017-11-16 23:30:35,373 INFO [cloud.utils.LogUtils] (main:null) (logid:) log4j configuration found at /etc/cloudstack/agent/log4j-cloud.xml 2017-11-16 23:30:35,385 INFO [cloud.agent.AgentShell] (main:null) (logid:) Using default Java settings for IPv6 preference for agent connection 2017-11-16 23:30:35,509 INFO [cloud.agent.Agent] (main:null) (logid:) id is 2017-11-16 23:30:35,512 WARN [cloud.resource.ServerResourceBase] (main:null) (logid:) Nics are not specified in properties file/db, will try to autodiscover 2017-11-16 23:30:35,518 INFO [cloud.resource.ServerResourceBase] (main:null) (logid:) Designating private to be nic br0 2017-11-16 23:30:35,543 INFO [kvm.resource.LibvirtConnection] (main:null) (logid:) No existing libvirtd connection found. Opening a new one 2017-11-16 23:30:35,807 INFO [org.reflections.Reflections] (main:null) (logid:) Reflections took 49 ms to scan 1 urls, producing 7 keys and 10 values 2017-11-16 23:30:35,822 ERROR [cloud.agent.AgentShell] (main:null) (logid:) Unable to start agent: Failed to get private nic name
然後我發現我的systemctl start cloudstack-agent,服務根本不起來,一開始有點陷入誤區,查了很多辦法,都沒法解決問題。
嘗試解決方法(添加主機):
輸入主機名稱,用戶名,密碼
添加成功後,我們查看下cloudstack下agent的狀態
然後我們查看下cloudstack-agent的配置文件:
# cat /etc/cloudstack/agent/agent.properties #Storage #Thu Nov 16 23:35:18 CST 2017 guest.network.device=br0 workers=5 private.network.device=br0 port=8250 resource=com.cloud.hypervisor.kvm.resource.LibvirtComputingResource pod=1 zone=1 hypervisor.type=kvm guid=a9e231ac-d361-3d25-9692-efeb9e35bf3d public.network.device=br0 cluster=1 local.storage.uuid=2a89854c-a9f6-46e1-8378-767a25ddb0ec domr.scripts.dir=scripts/network/domr/kvm LibvirtComputingResource.id=7 host=172.16.2.1
當我們遇到當前沒法處理的時候,不妨試著往下一步走,人生不也是如此麽。
本文出自 “冰凍vs西瓜” 博客,請務必保留此出處http://molewan.blog.51cto.com/287340/1982661
一次cloudstack啟動cloudstack-agent報錯的處理過程