DL厨が来てApacheのプロセスを食い潰してから手動でApacheを停止すると
高確率で下記のErrorが出て起動できなくなったので復旧方法をφ(..)メモメモ
# /etc/rc.d/init.d/httpd start
httpd を起動中: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[失敗]
原因は既に他のプロセスがポートを使用していること。
大抵はapacheをバージョン違いで2つインストールしてるとか
skypeを入れてるとポートが被るようです。
#xamppで環境作ったりしてるとハマるみたいですね。
Apacheの重複もないしその他アプリで80番占拠もしてないので・・・
何で80番が占拠されるのかが不明。
とりあえずkillしてしまえば復旧できそうですが、起動しているサービスでポートが
重複している場合はポート変更をちゃんとしないと駄目ですね。
纏めて下記のコマンドkillっと・・・。
/sbin/fuser -kn tcp 80
その後に、Apache起動すれば問題なく起動したのでよしとするか・・・。
原因は推測だけど、プロセスを食い潰してる+CPUもかなり喰ってたので
正常に停止できてなかったのかなと?
DL厨対策かミラーの公開を止めないとずっと続きそうだな・・・。

ぇぇ。yum-cron止めて無かったので今朝CentOS 5.5が適用されてました(;゚ロ゚)
5/15にミラーサイトに配置されてたみたいですね。
#情報拾えてなかった(゚Д゚)
CentOS 5.5 リリースノート(英語)で変更点はみてください。
特に問題はでてないので通常の
yum clean all
yum update
shutdown -r now
で問題はないと思います。
※自己責任でねっ♪
2010/06/09追記
CentOS 5.4からのアップデート手順が公開されてるので追記。
yum clean all
yum update glibc\*
yum update yum\* rpm\* pyth\*
yum clean all
yum update mkinitrd nash
yum update selinux\*
yum update
shutdown -r now
念のため・・・
# cat /etc/redhat-release
CentOS release 5.5 (Final)
になってるか確認するといいかも(^^♪
りでぃすとりびゅ~しょんはBlogとして運用していますが、同じ鯖&ドメインで
リディストリビュ~ションという18禁ゲームの体験版・デモムービー等のダウンロードミラー
のサイトも運用しています。
#ミラーサイトがメインでBlogはついでだったり(@@;)
体験版とかのファイルは1ファイル数百MB(最近は500BM以上)が多くなっています。
うちは元々回線が脆弱なのでDLツールを使われると鯖と回線への負荷が大変なことになってます。
ってことで閉め出すのが一番と判断・・・。
※かなり端よった記事になってます。
続きを読む
3月31日にRed Hat Enterprise Linux 5.5 リリースされてましたね。
主な新機能は以下みたいです。
・最新プロセッサのサポート
・仮想化機能の拡張
・Windowsとの相互運用性の向上
他にも数多くの機能追加・修正があるらしいですが・・・。
CentOS 5.5は5月辺りにはリリースされるのかな?
Red Hat Enterprise Linux 6βも4月下旬頃に公開されるとか?
今からいろいろと楽しみです。
ぼちぼちyum updateの自動実行を止めておくかな。
Red Hat Entreprise Linux 5 / CentOS 5の環境で「Unicode properties」のサポートが無いので
preg_matchやpreg_replaceで\pとか使おうとするとPHP Warningが出ます。
PHP Warning: preg_replace() [function.preg-replace]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 16 in
確認するにはpcretest -Cで確認できます。
# pcretest -C
PCRE version 6.6 06-Feb-2006
Compiled with
UTF-8 support
No Unicode properties support
Newline character is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack
「No Unicode properties support」・・・サポートしてませんね(´д`)
リビルドするのは面倒なのでできものを頂いてきました。
ここからpcre-66-27×86_64.rpmをDLしてインストール。
# wget http://gaarai.com/wp-content/uploads/2009/01/pcre-66-27x86_64.rpm
# rpm -ivh pcre-66-27x86_64.rpm
# /etc/rc.d/init.d/httpd restart
再度pcretest -Cで確認
# pcretest -C
PCRE version 6.6 06-Feb-2006
Compiled with
UTF-8 support
Unicode properties support
Newline character is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack
「Unicode properties support」になりました。
PHP Warningも消えたので良しとしよう(笑)

げふん。げふん。
本当は少し待つつもりでしたが入れてみました。
CentOS 5.4 リリースノートで変更点はみてください。
アップデート手順は下記で行いました。
yum clean all
yum update glibc\*
yum update yum\* rpm\* python\*
yum clean all
yum update
yum update kernel\*
shutdown -r now
無事に起動したら・・・再度yum updateを実行してください。
うちでは下のエラーがでました(汁
Transaction Check Error:
file /usr/share/emacs/site-lisp/psvn.el from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/de/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/es/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/fr/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/it/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/ja/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/ko/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/nb/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/pl/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/pt_BR/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/sv/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/zh_CN/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/locale/zh_TW/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/man/man1/svn.1.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/man/man1/svnadmin.1.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/man/man1/svnlook.1.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/man/man5/svnserve.conf.5.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/man/man8/svnserve.8.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
file /usr/share/xemacs/site-packages/lisp/psvn.el from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
Error Summary
-------------
subversionの64bit版を入れたいが32bit版が入ってるから無理だよ と解釈して・・・
# rpm -e subversion-1.4.2-4.el5_3.1.i386
を実行して32bit版をアンインストール
その後、yum updateをしたら問題なくsubversionの64bit版がインストールできました。
他にもperl-Archive-Zip等がアップデートされてました。
動作確認してみましたが特に問題ないのでアップデート完了です(゜-゜)
念のため・・・
# cat /etc/redhat-release
CentOS release 5.4 (Final)
になってるか確認するといいかも(^^♪
そういえばPHPの設定をしていなかったなと思ってはいたけど、
実害がなかったので放置プレイしてました(笑)
ところがWordPressのページを更新しようと思ったら白紙ページが表示されました。
Apacheのログをみると下記が出力されました。
Allowed memory size of 33554432 bytes exhausted (tried to allocate 17 bytes)
Allowed memory size of 33554432 bytes exhausted (tried to allocate 17 bytes)
Allowed memory size of 33554432 bytes exhausted (tried to allocate 17 bytes)
Allowed memory size of 33554432 bytes exhausted (tried to allocate 17 bytes)
Allowed memory size of 33554432 bytes exhausted (tried to allocate 64 bytes)
PHPのメモリ割り当てが足りなくなった場合に出るエラーですね。
PHP.INIのmemory_limitの設定値を確認すると・・・デフォルトの32MBのままでした(汁
どれくらい割り当てるかは算出するのが面倒だったので
倍の64MBを割り当ててこっそりApacheを再起動。
次にエラーが出る前にきっちりとした値を決めて割り当てしたいともいます。
う~ん。他に抜けてる設定あったかな・・・。
たまにしか使わないので忘れないようにメモ。
OSによってパスが違うので適用に読み替えてください。
・起動
/etc/rc.d/init.d/httpd start
・停止
/etc/rc.d/init.d/httpd stop
・再起動
/etc/rc.d/init.d/httpd restart
・設定ファイルの再読み込み
/etc/rc.d/init.d/httpd reload
・設定ファイルの書式チェック
/etc/rc.d/init.d/httpd configtest
・状態確認
/etc/rc.d/init.d/httpd status
・プロセスを切断しないで再起動
/etc/rc.d/init.d/httpd graceful
捕捉:
gracefulはプロセスの通信が終わるのを待って、
順次新しい設定を反映したhttpdを起動させる方法。
Webサーバを公開していて、サービスの停止が出来ない場合に便利。
最近再起動よりgracefulを多用している気が(笑)
※実行前にテストDB等でテスト後に本番に適用してください。
※この記事内を参考にする場合は、自己責任でお願いします。
続きを読む
来月くらいまでまつつもりやったけど・・・無理でした(笑)

適当にサービスあげてるけど・・・CentOS 5.2 → 5.3 へのUpDateはyumで
# yum update glibc\* && yum update
でさっくりとUpdateしました。
*.conf.rpmnewって感じで何個か設定ファイルの新しいのが保存されてたので、旧ファイルと見比べて修正箇所を適用して鯖再起動で完了っと。
とりあえず影響でてないのでこのまま使います~。
