10.6サーバ ハードの落ち癖発覚

2014年の8月から運用していたマシン。
混雑時に CPU 使用率(合計)40%に近付くとキー操作を受け付けなくなり、サイトも閲覧できない状態に。

型落ちだけれでも未開封品を半値で買えたと喜んでいたのに残念。

どこかで負荷テストをしてみよう。いや、もう手に入りにくい機種とバージョンだから切り捨てるか。

homebrew で webalizer

操作
brew install webalizer

==> Installing dependencies for webalizer: libpng, jpeg, gd, berkeley-db
==> Installing webalizer dependency: libpng
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.
######################################################################## 100.0%
==> Pouring libpng-1.6.10.mavericks.bottle.tar.gz
/usr/local/Cellar/libpng/1.6.10: 17 files, 1.3M
==> Installing webalizer dependency: jpeg
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/jpeg-8d.mav
######################################################################## 100.0%
==> Pouring jpeg-8d.mavericks.bottle.2.tar.gz
/usr/local/Cellar/jpeg/8d: 18 files, 780K
==> Installing webalizer dependency: gd
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gd-2.1.0_1.
######################################################################## 100.0%
==> Pouring gd-2.1.0_1.mavericks.bottle.tar.gz
/usr/local/Cellar/gd/2.1.0_1: 32 files, 1.1M
==> Installing webalizer dependency: berkeley-db
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/berkeley-db
######################################################################## 100.0%
==> Pouring berkeley-db-5.3.28.mavericks.bottle.tar.gz
/usr/local/Cellar/berkeley-db/5.3.28: 5271 files, 105M
==> Installing webalizer
==> Downloading ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.23-05-src.tgz
######################################################################## 100.0%
==> ./configure –prefix=/usr/local/Cellar/webalizer/2.23-05_1
==> make install
/usr/local/Cellar/webalizer/2.23-05_1: 10 files, 452K, built in 12 seconds

実行
webalizer

日本語化するには、コンパイル時の設定によると説明書にあるが、コンパイルのオプションを記入する設定ファイルが見つからない。
→webalizer の設定ファイルに、出力ファイルへ追記できる項目があるので、javascript の .replace( での処理を試してみるつもり。

MySQL 再インストール

xoops がうまくインストールできない。
以前のインストールで php.ini の編集はしなかったように思った。

MySQL の再インストール

パスワードの設定
/usr/local/mysql/bin/mysqladmin -u root password
準備1
sudo mkdir /var/mysql;
準備2
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
MySQLの起動
/usr/local/mysql/bin/mysql -u root -p
データベース作成
CREATE DATABASE **** DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ユーザ設定
GRANT ALL PRIVILEGES ON ****.* TO ****@localhost IDENTIFIED BY ‘******’;

結局 XOOPS はインストールできず。

homebrew を使って MySQL インストール

参考
http://henry.animeo.jp/wp/?p=1805

コマンド操作
brew install mysql
結果
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mysql-5.6.16.mavericks.bottle.tar.gz ######################################################################## 100.0%
==> Pouring mysql-5.6.16.mavericks.bottle.tar.gz
==> Caveats A “/etc/my.cnf” from another install may interfere with a Homebrew-built server starting up correctly.

To connect:     mysql -uroot

To have launchd start mysql at login:     ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents Then to load mysql now:     launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist Or, if you don’t want/need launchctl, you can just run:     mysql.server start ==> /usr/local/Cellar/mysql/5.6.16/bin/mysql_install_db –verbose –user=****** –basedir=/usr/local/Cellar/mysq
==> Summary

homebrew インストール

コマンド操作
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

結果
==> This script will install:
/usr/local/bin/brew /usr/local/Library/…
/usr/local/share/man/man1/brew.1

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir /usr/local
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local ==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Installing the Command Line Tools (expect a GUI popup):
==> /usr/bin/sudo /usr/bin/xcode-select –install xcode-select: note: install requested for command line developer tools Press any key when the installation has completed.
==> Downloading and installing Homebrew…
remote: Counting objects: 162073, done.
remote: Compressing objects: 100% (45927/45927), done.
remote: Total 162073 (delta 115101), reused 161981 (delta 115036)
Receiving objects: 100% (162073/162073), 30.25 MiB | 2.29 MiB/s, done.
Resolving deltas: 100% (115101/115101), done.
From https://github.com/Homebrew/homebrew
* [new branch]      master     -> origin/master
Checking out files: 100% (3131/3131), done. HEAD is now at 7498414 ksh: use install_symlink
==> Installation successful!
You should run `brew doctor’ *before* you install anything.
Now type: brew help

コマンド操作
brew doctor

結果
Warning: No developer tools installed.
You should install the Command Line Tools.
Run `xcode-select –install` to install them.

コマンドラインツールのインストール
Comand Line Tools (OS X Mavericks) for Xcode – March 2014
参考
http://qiita.com/wnoguchi/items/1ca12bf5e02f81010aab

コマンド操作
brew doctor

結果
Your system is ready to brew.

Mavericks 再インストール

条件 タイムマシンで最近のバックアップが取れていること。
Wi-Fiだとつながらないことがあるので、Ethernet 接続のこと。

  1. コマンド+Rを押しながら起動
  2. ディスクユーティリティでインストール先ディスクを消去
  3. サインイン→追加コンポーネントをダウンロード中
    インジケータが全く伸びない場合は、一度戻る
  4. 再起動 インストールの始まり
  5. 再起動 最初のセットアップ
  6. まずはインターネットの再設定
  7. server 設定
  8. VMware の再インストール
  9. Fetch, ARD などインストール
  10. Mail, Safari など設定ファイルをコピー

問題発生。
インターネットで外部へつながらない。→新しい設定を作ってしのいだ。
VMware で起動しない仮想マシンがある。「スナップショット情報を取得できませんでした ファイルをロックできませんでした。 モジュール Snapshot のパワーオンが失敗しました。」→VMをコピーしてしのいだ。(アクセス権を内包ファイルにも適用すれば行けるかもしれないが、ほかの問題が起きるといけないので、時間をかけてコピーした。)
データ用のHDDのアクセス権がメタメタ。アクセス権の継承でしのいだ。

インターネットに接続できているけど、進めないとか、仮想マシンが起動しないとか、ほんと困った。でもしのげて良かった。

OSから再インストールもシステムログは多いまま。

Mar 15 06:06:29 *** Dreamweaver[30809]: dynamic_cast error 1: Both of the following type_info’s should have public visibility.  At least one of them is hidden. N5dvaui2ui8MessageTIKNS0_7UI_NodeEEE, N5dvaui8controls23UI_PictureSupplyMessageE.
Mar 15 06:06:29 — last message repeated 4 times —
Mar 15 06:06:29 *** Dreamweaver[30809]: CoreText performance note: Client called CTFontCreateWithName() using name “Lucida Grande” and got font with PostScript name “LucidaGrande”. For best performance, only use PostScript names when calling this API.
Mar 15 06:06:29 *** Dreamweaver[30809]: CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug.
Mar 15 06:06:29 *** Dreamweaver[30809]: CoreText performance note: Client called CTFontCreateWithName() using name “Lucida Grande” and got font with PostScript name “LucidaGrande”. For best performance, only use PostScript names when calling this API.
Mar 15 06:06:31 — last message repeated 26 times —
Mar 15 06:06:31 *** WindowServer[138]: disable_update_timeout: UI updates were forcibly disabled by application “Dreamweaver” for over 1.00 seconds. Server has re-enabled them.
Mar 15 06:06:34 *** WindowServer[138]: common_reenable_update: UI updates were finally reenabled by application “Dreamweaver” after 4.17 seconds (server forcibly re-enabled them after 1.00 seconds)
Mar 15 06:06:36 *** Dreamweaver[30809]: CGSGetWindowBounds
Mar 15 06:06:36 — last message repeated 3 times —
Mar 15 06:06:36 *** Dreamweaver[30809]: CoreText performance note: Client called CTFontCreateWithName() using name “Times Roman” and got font with PostScript name “Times-Roman”. For best performance, only use PostScript names when calling this API.
Mar 15 06:06:36 *** Dreamweaver[30809]: CoreText performance note: Client called CTFontCreateWithName() using name “Arial” and got font with PostScript name “ArialMT”. For best performance, only use PostScript names when calling this API.
Mar 15 06:06:37 *** Dreamweaver[30809]: CGSGetWindowBounds
Mar 15 06:06:37 — last message repeated 2 times —
Mar 15 06:06:37 *** Dreamweaver[30809]: dynamic_cast error 1: Both of the following type_info’s should have public visibility.  At least one of them is hidden. N5dvaui2ui8MessageTIKNS0_7UI_NodeEEE, N5dvaui8controls23UI_PictureSupplyMessageE.
Mar 15 06:06:37 *** Dreamweaver[30809]: CGSGetWindowBounds
Mar 15 06:06:38 *** Dreamweaver[30809]: CoreText performance note: Client called CTFontCreateWithName() using name “Lucida Grande” and got font with PostScript name “LucidaGrande”. For best performance, only use PostScript names when calling this API.
Mar 15 06:06:39 — last message repeated 4 times —
Mar 15 06:06:39 *** Dreamweaver[30809]: CGSGetWindowBounds
Mar 15 06:06:39 — last message repeated 11 times —
Mar 15 06:06:39 *** Dreamweaver[30809]: CoreText performance note: Client called CTFontCreateWithName() using name “Lucida Grande” and got font with PostScript name “LucidaGrande”. For best performance, only use PostScript names when calling this API.
Mar 15 06:06:39 *** Dreamweaver[30809]: CGSGetWindowBounds
Mar 15 06:07:09 — last message repeated 4 times —
Mar 15 06:07:49 *** Dreamweaver[30809]: CGSGetWindowBounds
Mar 15 06:07:51 *** Dreamweaver[30809]: A system font, “LucidaGrande 13.00 pt. P [] (0xcd7ced0) fobj=0xcd7cda0, spc=4.11”, is requested to be deallocated. Ignoring…

Dreamweaver 大量のログ(未解決 迷走

Feb  5 11:41:29 *** Dreamweaver[17788]: CGSGetWindowBounds

このログで埋め尽くされてしまう。 adobe のサポートにも記述があったが、解決はしていない模様。

Xcode.app のインストールで頻繁に出ることはなくなった。→また出るようになった!

speechsynthesisserver ログイン項目削除、アクティブモニタ強制終了

直前の記事で古い Xcode.app をアンインストールしたら、大量には出なくなった。Xcode.app ports の環境を Mavericks で整えたら、また大量に出るようになった。(初期よりはまし、直前よりは悪い。)MacPorts からインストールされていたものをアンインストールすることで出なくなった。再発!ホストの名前変更などでまた出るようになった。ユーザアカウントを眺めていると、MacPorts というアカウントに「無効」がついている。「有効」にする操作を探して、設定を開けてみたが、何も設定変更していないのに「無効」が消えた。このとき、大量のログが記録されなくなった。MacPorts をインストールすると アカウントユーザに MacPorts が追加される。
これを削除しても、エラーの記述は減らないが、「未許可」の状態にすることで大量のログは止まった。。。 解決かな?再発!!!!!!
MacPorts などは関係ない模様。

それでも一応 Macports アンインストール。

Dreamweaver が大荒れ! エラーの頻発で CS6 使用を中止!

慌ててアンインストールしてから、再インストールすると暴走する?
→アンインストールしても初期設定ファイルが残るので、初期設定ファイルをリネームしてから再インストール。

それでも「CGSGetWindowBounds」は30秒ごとに記述される。

 

MySQL アンインストール

経緯
Mavericks にする以前のOSで入れていた MySQL 。
アクティブモニタで見ると、MySQL がメモリを400メガ以上消費していた。
などで、アンインストールすることに。

環境
mysql-5.6.14-osx10.7-x86_64.dmg を Mac OS X 10.8 Mountain Lion でインストールしている。(このインストーラで Mavericks へはインストールできなかった。追記04/02 右クリックでインストールできる。)

操作
mysql-5.6.14-osx10.7-x86_64.dmg を開くとインストーラと説明所書が同梱されている。
説明書には以下のフォルダについて説明がある。

`/usr/local/mysql-VERSION’
`/usr/local/mysql’
`/usr/local/mysql.bak’
`mysql_install_db’. /usr/local/mysql/bin’.
`/tmp/mysql.sock’

account named `mysql’.
アカウント。ほかに自分の作ったアカウントやrootなどもあるが、MySQLのサイトによればアカウント情報もデータベースにいっしょに保存されているというように読めた。

`/Library/StartupItems/MySQLCOM’. スタートアップ設定
`/Library/StartupItems/MySQL’,
/etc/hostconfig’. 設定指示書→MySQLのサイトより”Startup Item は、/Library/StartupItems/MySQL にインストールされます。 これによって、システム設定ファイル /etc/hostconfig に変数 MYSQLCOM=-YES- が追加されます。MySQL の自動起動を無効にする場合は、この変数を MYSQLCOM=-NO- に変更します。”

`/Library/Receipts/mysql-VERSION.pkg’.

それぞれのフォルダに関係ファイルがないかを確認し、起動設定を書き直した。

webalizer (失敗→再開)

webalizer インストール:$ sudo port install webalizer

設定ファイル(ない場合は、インストール後):
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/www/webalizer/Portfile
configure.args
–with-language=japanese
再インストール

解析の設定
/opt/local/etc/webalizer.conf.sample を編集して  /opt/local/etc/webalizer.conf

解析の実行:
$ cd /opt/local/etc
$ sudo webalizer

Dreamweaver のログが大量に出る問題が再発したのでアンインストール:sudo port uninstall webalizer

MacPorts でインストールされたすべてを削除:sudo port -fp uninstall installed

大量のログが止まった。記録されないわけではない。Dreamweaver をアクティブにすると記録される。大量に出る場合は、別なソフトがアクティブな状態でも常に5秒ごとに記録された。 macports をインストールすると最初にいくつかインストールされる。調べると、それらは依存関係にあり、1つだけは消せない。3つほど足りないものがあったが、足りないものをインストールすることで、不具合が解消されるとは思えなかったので、 MacPorts の webalizer によるアクセス解析はやめる。

大量のエラーログの原因がMacPorts や webalizer の存在にかかわっているのは間違いなようなので、再開。

ports FileMerge 設定

FileMerge の場所:/Applications/Xcode.app/Contents/Applications/FileMerge.app
UTF-8 のファイルはそのままでOK。ほかの文字コードの場合は
/opt/local/bin/nkf -sLu $(FILE)

  • txt
  • tpl
  • php
  • html

nkf を使わない場合は /usr/bin/iconv -c -f UTF-8 -t SJIS $(FILE)

nfk インストール:$ sudo port install nkf

nfk の場所:$ which nkf

Sandbox ログ

kernel[0]: Sandbox: xscertd-helper() deny file-read-metadata /private/var/db/DetachedSignatures
kernel[0]: Sandbox: xscertd-helper() deny file-read-data /private/var/db/DetachedSignatures
kernel[0]: Sandbox: xscertd() deny file-read-metadata /Library/Preferences/com.apple.security.plist
kernel[0]: Sandbox: xscertd() deny file-read-data /Library/Preferences/com.apple.security.plist

sandbox でアプリを包んで使用する過程で記述されているログらしい。

古いソフトを見直し。→効果なし

記録が10分おき。メールの受信間隔と一致。thnderbird で出る。Mac Mail, Windows Live Mail では出ない。

ホスト名にドメインを設定したところ、thanderbird でも記録されなくなった。(解決)
Windows Live Mail は受信ができるが、送信ができない。サーバの証明書が、ホスト名の変更によってうまく認証できていない様子。Windows Live Mail でのサーバ証明書のキャッシュの削除方法がわからない。thanderbird では以前の記事の様子で対応した。

サーバ証明書をメールソフトで使う

Dreamweaver 大量のログ2(未解決)

Feb  7 16:10:35 ***** Dreamweaver[****]: dynamic_cast error 1: Both of the following type_info’s should have public visibility.  At least one of them is hidden. N5dvaui2ui8MessageTIKNS0_7UI_NodeEEE, N5dvaui8controls23UI_PictureSupplyMessageE.
Feb  7 16:11:05 — last message repeated 11 times —

Spotlight 大量のログ

mds[52]: (Normal) ImportServer: Ignoring blacklisted Spotlight importer plugin:/Developer/Applications/Xcode.app/Contents/Library/Spotlight/SourceCode.mdimporter uuid:548A3091-3C5D-498A-A329-B532A6C896BB version:1801

頻繁に出てくるので Spotlight 停止

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

あれ、Xcode.app の問題? Spotlight 再開

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Xcode.app 5.0.2  無料インストール サイズ:2.09G

再発!!! 新旧の Xcode で、ファイルの場所が変わっている。

古い Xcode をアンインストール

sudo /Developer/Library/uninstall-devtools –mode=all

解決

 

Mavericks と VMware Fusion 6.0

VMware Fusion 6.0 インストール

http://store.vmware.com/store/vmwjapan/ja_JP/home
アップグレード版で、59.9$ 英語の購入ページのみ。
クーポンで割引があるかと思って購入を勧めたが、クーポンの文字列を入力しても値引きはなかった。登録すると、購入製品のシリアルナンバーを参照したり、再ダウンロードできるページを利用できる。ダウンロードしてインストール。
メールでサポートが受けられるようだ。英語のみ。

VMware Fusion 6.0 にすると、osx 10.8 では、仮想マシンからテキストコピーができなくなった。

mac osx 10.9 Mavericks へ

無料のOS。インストール時に server は別途購入しないと動かないと注意書きがでる。
ダウンロードからインストール終了まで1時間ほど。

lookup ネットワーク ユーティリティがなくなった。
Server 3.0.2 を2000円で購入。
マルチモニタの機能が大幅に変わっている。メニューバーがそれぞれのモニタに表示される。
フルスクリーンで複数の仮想マシンを、片方のモニタに重ねて表示させると、今まで通りに切り替えられない。とりあえずシングルウインドウで対応。

Server 3.0.2

設定ファイルの場所が変わっている。今までは /etc だったが、
/Library/Server 内に named Web FTP などの設定ファイルが見える。
逆引きの指定に特殊な設定が必要だが、Server からの入力は適正値でなく設定できない。