茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1671828 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_00029.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

小企鵝開談 : [轉貼]啟動 httpd 時出現 httpd: apr_sockaddr_info_get() failed

發表者 討論內容
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]啟動 httpd 時出現 httpd: apr_sockaddr_info_get() failed
在啟動 httpd 時出現 httpd: apr_sockaddr_info_get() failed for

魚戀秋波 Neil Y.K. :

在啟動 httpd 時出現
Starting httpd: httpd: apr_sockaddr_info_get() failed for MYHOST
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.

這個問題應該是沒有在 /etc/httpd/conf/httpd.conf 中設定 ServerName 所以它會用主機上的名稱來取代,首先會去找 /etc/hosts 中有沒有主機的定義。

所以要解決這個問題可以設定 ServerName 或者在 /etc/hosts 中填入自己的主機名稱 MYHOST,像這樣:
>vi /etc/hosts
127.0.0.1 localhost.localdomain localhost MYHOST

就可以解決了 =)

原文出處:在啟動 httpd 時出現 httpd: apr_sockaddr_info_get() failed for / Linux 討論版 / 個人電腦 :: 傑比創意資訊、電腦維修
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]如何解決 linux 下 apache 啟動時 httpd: apr_sockaddr_info_get() failed for 報錯
如何解決linux下apache啟動時httpd: apr_sockaddr_info_get() failed for 報錯
Posted by murray 12月 29, 2010

配置一台云服務器,乾乾淨淨的系統,我用Yum安裝了apache後,發現啟動時候報錯
httpd: apr_sockaddr_info_get() failed for xxxx

雖然啟動還算正常,但不知道會不會有什麼影響。
google之後找到瞭解決辦法:有兩個方向,如下
這個問題應該是沒有在 /etc/httpd/conf/httpd.conf 中設定 ServerName 所以它會用主機上的名稱來取代,首先會去找 /etc/hosts 中有沒有主機的定義。
所以要解決這個問題可以設定 ServerName 或者在 /etc/hosts 中填入自己的主機名稱 MYHOST,像這樣:
>vi /etc/hosts
127.0.0.1 localhost.localdomain localhost MYHOST

或者是
將httpd.conf中的ServerName 前面的 # 去掉。
apache 2.2 的虛擬機的配置放置在conf/extra/httpd-vhosts.conf 中

原文出處:如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]How to Fix AH00558 and AH00557 httpd apr_sockaddr_info_get() Error Message
How to Fix AH00558 and AH00557 httpd apr_sockaddr_info_get() Error Message
by Ramesh

When you are starting Apache server, you might get the AH00557 and AH00558 warning message as shown below.
# /usr/local/apache2/bin/apachectl start
AH00557: httpd: apr_sockaddr_info_get() failed for dev-server
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Apache/2.4.2 mod_ssl (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide the pass phrases.
Server www.example.com:443 (RSA)
Enter pass phrase:
OK: Pass Phrase Dialog successful.

You’ll also get the same warning message even when you stop the Apache HTTPD server as shown below.
# /usr/local/apache2/bin/apachectl stop
AH00557: httpd: apr_sockaddr_info_get() failed for dev-server
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

If you are using service httpd to stop and start, you ‘ll get the similar warning message.
# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for dev-server
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

To fix the above warning message, add the “ServerName” directive to the httpd.conf file accordingly.
# vi /usr/local/apache2/conf/httpd.conf
ServerName 192.168.1.2

Note: Depending on how your are planning to setup the Apache, the above ServerName directive can either be a hostname, or ip-address, or fully qualified domain name. If you are just running the Apache for internal testing purpose, you can simply set it to the ip-address of the server.

If you want to use hostname in the httpd.conf file, make sure you also have a corresponding entry in the /etc/hosts file for that hostname as shown below.
# vi /usr/local/apache2/conf/httpd.conf
ServerName dev-server

# vi /etc/hosts
127.0.0.1   dev-server localhost.localdomain localhost

Now when you start the apache again, you’ll not get the warning message anymore.
# service httpd stop
Stopping httpd:    [  OK  ]


原文出處:How to Fix AH00558 and AH00557 httpd apr_sockaddr_info_get() Error Message
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]解決 linux Apache 啓動提示 httpd: apr_sockaddr_info_get failed for 問題
解決linux Apache啓動提示 httpd: apr_sockaddr_info_get failed for問題
更新: 2011-07-11 字體: T T
今天出現,可能設置hostname出現問題了,一查看主機名稱被修改了。
httpd: apr_sockaddr_info_get() failed for xxx
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

我在service httpd restart的時候提示上述信息的。雖然啓動成功了,但是也是很鬱悶的。
這是因爲在配置 DNS 的時候 hostname xxx 造成的。
這個問題應該是沒有在 conf/httpd.conf 中設定 ServerName 所以它會用主機上的名稱來取代,首先會去找 /etc/hosts 中有沒有主機的定義(己有定義了HOSTNAME=hyall.cn)。
所以要解決這個問題可以設定 ServerName 或者在 /etc/hosts 中填入自己的主機名稱 xxx,像這樣:
>vi /etc/hosts(加入一行)
127.0.0.1 localhost.localdomain localhost xxx 222.76.217.106  hyall.cn

主要原因是:
apache的conf目錄下的配置文件httpd.conf中關於hostname設置和/etc/sysconfig/network中的HOSTNAME設置不統一導致的,修改成統一的主機名即可解決該問題。
注:/etc/sysconfig/network 默認主機名是:HOSTNAME=localhost.localdomain

原文出處:解決linux Apache啓動提示 httpd: apr_sockaddr_info_get failed for問題_IT客
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[分享]冷日來說明經驗
冷日今天也碰到客戶突然反應說網頁無法連線!
網路確定沒問題!DNS 確定沒問題!防火牆確定沒問題!
所以冷日連到該機器(LAMP)看了一下,發現 Apache 沒有在執行!?
雖然很想找原因,可是一大早客戶的系統要使用阿!!!

無奈之下進行了
/etc/rc.d/init.d/httpd restart

然後就發現上述的問題(apr_sockaddr_info_get() failed)了!

經由 Google 大神指示(也就是上面幾篇文章)後,將 hosts 與 httpd.conf 都進行了整理,卻又出現另一個問題!?
重起 apache 時只會顯示 fail 卻沒有錯誤訊息了!
來去看一下 Log 發現:
suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)


那就再來拜谷歌大神吧!(請看後面幾篇)
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]CentOS Linux 5.4 Apache 突然無法啟動
CentOS Linux 5.4 Apache 突然無法啟動

今天接到客戶電話 說linux 的openwebmail 無法使用 但是webmin可以執行

環境: centos 5.4

mail 套件 postfix

openwebmail 版本為 2.53

連線到主機 發現 Apache一直無法啟動 ,重新更新Apache 也沒有用

看看Log檔 僅發現下列訊息
[Mon Mar 11 22:15:36 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 22:09:25 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 22:06:03 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 22:06:03 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 22:06:02 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 22:06:00 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 18:47:14 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 18:41:59 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 18:27:49 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 18:23:56 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 17:27:57 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 17:02:13 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 17:00:34 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

google老半天 突然發現一篇日文文章 在對照log 檔相關訊息果然發現嫌疑犯
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!

所以就執行了
# mv /etc/httpd/conf.d/nns.conf /tmp/
# /etc/rc.d/init.d/httpd start

果然好了~~

原文出處:CentOS Linux 5.4 Apache 突然無法啟動 @ Linux 技術資源站,包含房仲業務 賣屋 賣屋 海外投資 海外置產等等 :: 痞客邦 PIXNET ::
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]Linux Apache 突然無法啟動
apache不能啟動,沒有錯誤提示啊,錯誤日誌如下。
[Fri May 31 20:33:04 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 31 20:38:02 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 31 20:41:58 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 31 20:50:02 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 31 20:51:47 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 31 20:56:20 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 31 20:57:18 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 31 20:57:45 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri May 31 21:07:35 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

錯誤生成原因,由於安裝的是紅旗服務器版本3,以前一直當php服務器用了,今天由於不能識別鍵盤,所以直接按電源關閉,然後httpd就啟動不起來了,而且 service httpd start 直接失敗,沒有提示任何錯誤信息,忘大俠們給予幫助啊。

已經找到原因,是mod_nss證書過期導致,修複方法如下:

首先檢查apache的error_log,我在/var/log/httpd/nss_error_log文件中看到如下錯誤。
    [Mon Dec 26 13:21:24 2011] [error] Certificate not verified: 'Server-Cert'
    [Mon Dec 26 13:21:24 2011] [error] SSL Library Error: -8181 Certificate has expired
    [Mon Dec 26 13:21:24 2011] [error] Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved.

找到/etc/httpd/conf.d/nss.conf文件,配置文件中有個如下配置,其實需要將SSL的Engine置為「off」就行了。

原文出處:apache不能启动,没有错误提示啊,错误日志如下。-CSDN论坛-CSDN.NET-中国最大的IT技术社区
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]Aapache 啟動不了,報錯信息:suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
Aapache 啟動不了,報錯信息:suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
2011-02-12 14:25:02

報錯信息:
[Wed Mar 11 15:57:46 2009] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed
[Wed Mar 11 15:59:22 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Mar 11 15:59:22 2009] [error] (28)No space left on device: Cannot create SSLMutex
Configuration Failed
[Wed Mar 11 16:00:25 2009] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed
[Wed Mar 11 16:01:43 2009] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed

解決辦法:
1、輸入:
ipcs -s
看有沒有超過5個,如果有請執行下面2的命令:
2、
ipcs -s | perl -ane '/^0x00000000/ && `ipcrm -s $F[1]`'

3、重啟Apache服務。(到此問題解決!)
ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

網上有人說用上面這條命令或者重啟服務器之後也可以解決,沒有嘗試,因為我用命令2之後已經解決了!

原文出處:Aapache 启动不了,报错信息:suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) - 惟丑有才 - 51CTO技术博客
冷日
(冷日)
Webmaster
  • 註冊日: 2008/2/19
  • 來自:
  • 發表數: 15771
[轉貼]解決CENTOS6 HTTPD APACHE初始無法正常啟動
解決CENTOS6 HTTPD APACHE初始無法正常啟動

剛裝好HTTPD後,下達啟動服務的指令都無法順利執行,後來上網查之後才知道原廠預設值需要變動
一、安装Apache
yum install httpd

二、 修改Apache 服務的網域設定
    vi /etc/httpd/conf/httpd.conf  #编辑
    找到  #ServerName www.example.com:80
    改為  ServerName 你的網域名稱.com:80
    :wq    #保存退出


三、關閉NSSEngine
    vi /etc/httpd/conf.d/nss.conf    #编辑
    找到 NSSEngine on
    改為 #NSSEngine on
    :wq    #保存退出

     service httpd restart


原文出處:解決CENTOS6 HTTPD APACHE初始無法正常啟動 @ 懶人記事本 :: 痞客邦 PIXNET ::
前一個主題 | 下一個主題 | 頁首 | | |



Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|