江端智一のホームページ
Ubuntu Desktop 18.04でClamAVによるウィルスチェックを実行する!
を参考にして、ClamAVを、Amazon Lightsailにインストールしたら、(それが原因かどうかは、今一つはっきりしないんだけど)以下のような問題が発生した。
Amazon lightsailにsshログインできなくなった件 (ClamAV のアンインストールと AWS inspectorのアンインストール)
けど、お勧めされたので、AWS EC2(Ubuntu Desktop 18.04)の方には、週明けにインストールする予定。
(T.B.D.)
私は小心者なので、サーバにログインできなくなるだけで、青ざめてしまいます。
今日も、Amazon lightsailにsshログインできなくなって、パニックになっていました。
原因は、ウイルスチェックツールのClamAVのインストールと、AWS inspectorのインストール(Amazon lightsailでは動かない)が原因と考えられました。
『こういう場合、あわてて動くとロクなことがない』は経験則ですので、まずは、Amazonlightsailの内部情報をコンソールから見る方法をググってみました。
から「メトリクス」を選ぶと
CPUが100%のまま動いているグラフが出てきます。
間違いなく、ウイルススキャンがCPUを喰い捲っている、と思いましたので、いつかは下がるはず、と1時間くらい待ってみたところ、落ちてきました(ケースによっては、3時間、6時間コースもあるようなので、しばらく放っておく勇気が大切です)。
で、この間に、「使用率」と記載されているところをクリックして、「+アラームの追加」をクリックして、こういう状態になったらアラートが飛んでくるように設定しておきました。私の場合、以下のように設定しておきました。」
で、CPUも落ちついてきて、sshログインができるようになったので、早速パッケージのアンインストールを実施しました。
ubuntu@ip-123-45-67-89:~$ sudo apt-get remove --purge clamav clamav-daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
clamav-base clamav-freshclam clamdscan libclamav9 libtfm1
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
clamav* clamav-daemon*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 1881 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 196083 files and directories currently installed.)
Removing clamav (0.103.2+dfsg-0ubuntu0.20.04.2) ...
Removing clamav-daemon (0.103.2+dfsg-0ubuntu0.20.04.2) ...
Processing triggers for man-db (2.9.1-1) ...
(Reading database ... 196045 files and directories currently installed.)
Purging configuration files for clamav-daemon (0.103.2+dfsg-0ubuntu0.20.04.2) . ..
Processing triggers for systemd (245.4-4ubuntu3.6) ...
で、サービス状態を確認したら、まだ生き残っていたので、これも力付くで停止
ubuntu@ip-123-45-67-89:~$ systemctl list-unit-files | grep clamav
clamav-freshclam.service enabled enabled
ubuntu@ip-123-45-67-89:~$ sudo systemctl stop clamav-freshclam
さらに、AWS inspectorも強制アンインストールを実施
ubuntu@ip-172-26-7-19:~$ systemctl list-unit-files | grep aws
awsagent.service generated enabled
ubuntu@ip-172-26-7-19:~$ sudo apt-get remove --purge awsagent
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
clamav-base clamav-freshclam clamdscan libclamav9 libtfm1
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
awsagent*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 196040 files and directories currently installed.)
Removing awsagent (1.1.1677.0-102677) ...
Stopping awsagent-agent service:
Stopping awsagent (via systemctl): awsagent.service.
Removing awsagent-agent service:
Killing existing AwsAgent Updater Cron Jobs:
Found existing awsagent updater cron job PID: 1462
Processing triggers for systemd (245.4-4ubuntu3.6) ...
(Reading database ... 196024 files and directories currently installed.)
Purging configuration files for awsagent (1.1.1677.0-102677) ...
dpkg: warning: while removing awsagent, directory '/opt/aws/awsagent/etc' not empty so not removed
最期に、sudo reboot をして、起動を確認しました。
教訓: メモリ1G程度の Amazon lightsailに、あまり凝った仕組みを組込むな
本日、嫁さんから「トイレで水が溢れている」と言われて、急遽、トイレの水を止める(止水)作業を行いました。
一応、写真にも残しておきました。
トイレの脇に潜り込むと、止水栓が見えます。
止水栓を押し込むと、水が止まりますが、我が家のケースでは、手前のノズルを前に引き出さないと、止水栓を押し込めないので、以下の写真のようにします。
これで、止水できる状態になります。
以上
Avidemuxで複数のmp4ファイルをマージするには、mp4ファイルを順番にドラッグして保存すれば良いのですが、マージしたファイルの映像がバケてしまうことがあります。
その場合は、以下のメニューを選んで保存すれば、大丈夫です。
以上。
AWS inspectorからのセキュリティ対応で苦慮しています。
■AWS Inspectror - Assement Report Finding Report の一部
詰まる所、セキュリティパッチを当てろということのようですが、どうも当っていないようです。
結構頻繁に、
>sudo apt-get install
>sudo apt-get update
> sudo apt-get upgrade
を精髄反射的に投入してきたのですが、どうも改善されていないらしくて、有識者の方のアドバイスを受けながら作業をしていました。
■"20.04.2 LTS"のセキュリティパッケージを管理しているサイトにいってみた
■https://ubuntu.com/download/desktop/thank-you?version=20.04.2.0&architecture=amd64 からパッケージを確認
ダウンロードを指示されましたが、まさか、isoをインストールして、今のEC2を消滅(リセット)させる、というとありえないので・・・
とりあえず、これはキャンセルしました。
■ https://news.mynavi.jp/itsearch/article/hardware/2040 に記載のあった方法
これを見て、赤線のところを実施していなかったことに気がつきました。
■ >sudo apt-get dist-upgrade の実行結果
"1029-aws"なる表示がでています。これでパッケージがインストールされたのかもしれません。
■ 結果
本件で、再度、Amazon Inspectror - Assement Report を確認して貰ったら、セキュリティパッチが当っていることが分かりました。
以上
Host sea-anemone.tech
HostName sea-anemone.tech
IdentityFile ~/.ssh/DefaultKey-ap-northeast-1.pem
User ubuntu
(pemは、AWSから貰ったものを使うだけ)
昨夜windows7を使ったら、その反応の早さに驚いたので、windows10はやっぱり遅いんだなと思ったが、ちゃんとチューニングしたらいきなり快適になりました。
ただ、このあと問題が出てきたのは、デスクトップに表示される文字がガタガタになる、ということでした。
これは耐えられなかったので、ClearTypeというものを適用されることで解決しました。
「Windows10はやっぱり遅い」と決めつけずに、ちょっとした工夫で、ストレス解消になりますので、お勧めます。
あと、https://ygkb.jp/4475 の内容を参照させて頂いた
「無効」を推奨
ActiveX Installer (AxInstSV)
Application Management
BranchCache
Certificate Propagation # これは残した 個人的なプログラムで認証作業をやっているので
Connected User Experiences and Telemetry
Data Collection Publishing Service
Distributed Link Tracking Client
Distributed Transaction Coordinator
Downloaded Maps Manager
Fax
Function Discovery Provider Host
Function Discovery Resource Publication
Geolocation Service
Home Group Listener
Home Group Provider
Internet Connection Sharing (ICS)
Microsoft App-V Client
Microsoft iSCSI Initiator Service
Net.Tcp Port Sharing Service
Offline Files
Peer Name Resolution Protocol
Peer Networking Grouping
Peer Networking Identity Manager
PNRP Machine Name Publication Service
Portable Device Enumerator Service
Print Spooler
Printer Extensions and Notifications
Remote Registry
Routing and Remote Access
Shared PC Account Manager
Smart Card
Smart Card Device Enumeration Service
Smart Card Removal Policy
SNMP Trap
SSDP Discovery
UPnP Device Host
Windows Media Player Network Sharing Service
Windows Remote Management (WS-Management)
WinHTTP Web Proxy Auto-Discovery Service
Xbox Live Auth Manager
Xbox Live セーブ データ
Xbox Live ネットワーキング サービス
タイムゾーンの自動更新機能
ユーザー エクスペリエンス仮想化サービス
市販デモ サービス
SensorDataService
Sensor Monitoring Service
Sensor Service
「手動」を推奨
AllJoyn Router Service
Application Identity
BitLocker Drive Enctyption Service
Block Level Backup Engine Service
Bluetooth Handsfree Service
Bluetooth サポート サービス
Diagnostic Policy Service
Diagnostic Service Host
Diagnostic System Host
SensorDataService
Sensor Monitoring Service
Sensor Service
Telephony
Windows Image Acquisition (WIA)