harumaki.net

インフラ屋の覚書や、ラーメン食べある記とか。

AWS cloud GNU/Linux RedHat メモ

[AWS EC2] RHEL6のインスタンスでttyS0 のエラーが大量発生

投稿日:2015年1月6日

Last Updated on 2021年7月4日 by かんりにん

 
AWS EC2にてRedHat Enterprise Linux 6.5(以下RHEL6.5)のインスタンスを立ち上げ、MySQLサーバーをセットアップしてる最中
/var/log/messagesをチェックしてたところ、謎のログを発見。

/var/log/messagesの抜粋

 Jan  5 11:12:13 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process ended, respawning
 Jan  5 11:12:23 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process (6744) terminated with status 1
 Jan  5 11:12:23 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process ended, respawning
 Jan  5 11:12:33 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process (6745) terminated with status 1
 Jan  5 11:12:33 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process ended, respawning
 Jan  5 11:12:43 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process (6748) terminated with status 1
 Jan  5 11:12:43 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process ended, respawning
 Jan  5 11:12:53 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process (6749) terminated with status 1
 Jan  5 11:12:53 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process ended, respawning
 Jan  5 11:13:03 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process (6750) terminated with status 1
 Jan  5 11:13:03 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process ended, respawning
 Jan  5 11:13:13 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process (6751) terminated with status 1
 Jan  5 11:13:13 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process ended, respawning
 Jan  5 11:13:23 ip-172-***-***-*** init: ttyS0 (/dev/ttyS0) main process (6752) terminated with status 1

“init: ttyS0 (/dev/ttyS0) main process (6751) terminated with status 1″と
“init: ttyS0 (/dev/ttyS0) main process ended, respawning”が約10秒ごとに延々と出ており、これは何?ということでgoogle先生に尋ねたところ、Stack Exchangeでのエントリを発見。

参考:お世話になっております。
ERROR: init: ttyS0 (/dev/ttyS0) main process (1612) terminated with status 1

原因は、インスタンスにてシリアルポートのttyS0を立ち上げる設定になっているが
引用では”A virtual Red Hat installation probably doesn’t have any serial ports connected
(which is what /dev/ttyS0 is: COM1 in DOS parlance)” とのこと。そりゃそうですよね…

対処

1)その場で/dev/ttyS0の起動を停止する場合

コマンドで普通にインターフェースを止めるだけ。

– コマンドにて以下を実行。

 # stop ttyS0
 ttyS0 stop/waiting	←実行結果が出ます。
 # 

– /var/log/messages にてログを確認。

Feb  3 17:40:39 ip-172-26-22-151 init: ttyS0 (/dev/ttyS0) main process (15526) killed by TERM signal

ということで、停止を確認。ひとまずオッケー。

2)設定を修正して、再起動後も無効にしておく

設定ファイルは”/etc/init/ttyS0.conf”、これをリネームしておき、再起動時に読み込まれなければ
起動時のagetty での読み込みも行われなくなる様子。

– ファイルをリネームしちゃう!

 # mv /etc/init/ttyS0.conf /etc/init/ttyS0.conf.NOT

インスタンスを再起動して/dev/ttyS0が立ち上がっていなければ、一件落着。
クラウドのインスタンス(で、かつコミュニティAMI)に、なぜシリアルポートを起動する設定があるのか、の根拠さぐりはまたの機会にw
  
 

 

-AWS, cloud, GNU/Linux, RedHat, メモ
-,

執筆者:


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA


関連記事

nagios​/plugin​/SNMP​/mem監視

  [pukiwiki] *snmpでのメモリ監視(物理メモリ、仮想メモリ) [#h1ad6570] メモリの監視用プラグインは軒並みRAMとSwapのステータスを同時に取得するタイプばかりで RAM …

[AWS]EC2にてT2インスタンスがリリースされたので試してみた(t2.micro)

AWS EC2の無料利用枠を利用してサンドボックスを作ろうと考えていたら、昨日07/02にAWSからT2インスタンスなるものが発表されていたので、ちょっと遊んでみました。 用途は自宅サーバーです。 ア …

nagios​/plugin​/SNMP​/インストール(コンパイル版)

  [pukiwiki] **nagiosプラグインの環境セットアップ(コンパイル版) [#oac4bee6] リモートホストへsnmpで値を取得する”check_snmp_*&#8221 …

no image

iperf

[pukiwiki] #contents *iperf [#e7263e68] 帯域を測定する、ネットワーク性能測定ツール。 こまかい使い方についてはこれから要検証。 [本家サイト] NLANR ht …

no image

浮動小数点の計算(zsh)

[pukiwiki] たまにしかやらないことはすぐに忘れちゃうので、メモです。 浮動小数点(0.2とか、小数点での計算)はbashではできないため、zshを利用。 以下、バックアップデータの増分を計算 …