2016-11-16 81 views
0

我正在通過ops工程在Amazon AMI映像上實施廚師腳本。我的目標是插入httpd.conf和conf.d/wa.conf以在端口8889上設置站點。然後使用新配置重新啓動Apache。AMZ ami上的廚師,重啓失敗,httpd停止啓動httpd:地址已經在使用

然而,當我試圖重新啓動我得到以下錯誤:

STDOUT: Stopping httpd: [ OK ] 
httpd is stopped 
Starting httpd: [FAILED] 
STDERR: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:8889 
no listening sockets available, shutting down 
Unable to open logs 
End output of  service httpd stop 
---- 

我已經嘗試了多種配置,但他們都忽視了。當配置失敗後,我登錄到該框時,端口8889未被使用。我可以在那個時候手動啓動httpd,但仍然失敗。

這裏是廚師腳本:

service 'httpd' do 
    supports :status => true, :start => true, :stop => true, :restart => true 
    action [:nothing] 
end 


template "/etc/httpd/conf/httpd.conf" do 
    source 'httpd.conf.erb' 
    action :create 
    notifies :restart, 'service[httpd]' 
end 

我已經嘗試了一些變化,但它似乎總是開始關機前完成可能?

任何幫助將不勝感激。

謝謝。

myles。

回答

0

由於某些原因無法使用端口8889。

我將服務器切換到不同的端口,它工作。

相關問題