2021/05,江端さんの忘備録

私のメールボックスの中に、『優良中古ドメインがあなたのものに?!』という広告を見つけました。

In my mailbox, I found an ad that said, "A quality used domain name can be yours!"

―― 優良中古ドメインって何?

"What is a good used domain name?"

と思って調べてみたのですが、つまるところ、

Looking them up and I came to know,

■現在の商標のような取扱いをされていない時代に取得されたドメインで、

- A Domain name that was acquired at a time when they were not treated as trademarks

■そのドメインの管理者がいなくなってしまい、

- The administrator of the domain name is now unknown,

■現在であっては、なかなか手に入れ難そうな(普通名詞に近い)ドメイン

- the domain name that seems to be hard to find nowadays (almost like common nouns)

のようです。

-----

例えば、

For example,

chuukosha.jp 中古車(Used car)

effort.jp 努力

kenko.jp 健康(health)

class.jp クラス

otsukai.jp おつかい(errand)

background.jp バックグラウンド

なるほど、これは確かに、優良で中古のドメイン名です。

Well, these are indeed good, and used domain names.

-----

always3.jp 映画『ALWAYS 三丁目の夕日 '64』

always3.jp The movie "ALWAYS Sunset on Third Street '64

bananakayo.jp 映画『こんな夜更けにバナナかよ 愛しき実話』

bananakayo.jp The Movie "This Late at Night, Do you give me Banana : A True Story

このように、映画の広告で使われたドメイン名もあるようです。

Thus, it seems that some domain names were used in movie advertisements.

(続く)

(To be continued)

2021/05,江端さんの技術メモ

Ubuntu Desktop 18.04でClamAVによるウィルスチェックを実行する!

を参考にして、ClamAVを、Amazon Lightsailにインストールしたら、(それが原因かどうかは、今一つはっきりしないんだけど)以下のような問題が発生した。

Amazon lightsailにsshログインできなくなった件 (ClamAV のアンインストールと AWS inspectorのアンインストール)

けど、お勧めされたので、AWS EC2(Ubuntu Desktop 18.04)の方には、週明けにインストールする予定。

(T.B.D.)

2021/05,江端さんの技術メモ

私は小心者なので、サーバにログインできなくなるだけで、青ざめてしまいます。

今日も、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に、あまり凝った仕組みを組込むな

 

 

2021/05,江端さんの忘備録

趣味と仕事の両方で「メカ」に携わっている長女に、

I asked to my senior daughter, who is involved in "mechanics" as both a hobby and a job,

―― スノータイヤからノーマルタイヤへの交換やってみるか?

"Do you want to try changing from snow tires to normal tires?"

と尋ねてみたら、『やりたい』と言いましたので、私は一切手を出さずに、口で指示だけをして、ずっと見守っていました。

She said "I do try it", so I didn't help but watch her, just gave her verbal instructions.

なかなか、手際が良くて、ちょっと驚きました。

I was a little surprised at how well she did it.

-----

実際のところ、タイヤ交換は、機材さえ揃っていれば、そんなに難しくありません。

In fact, changing a tire is not that difficult, as long as you have the right equipment.

少なくとも、英語しゃべるより簡単だし、スマホの操作よりも簡単です。

At least it's easier than speaking English, and easier than operating a smartphone.

こちらが、私の記録用の映像なのですが(YouTubeに繋がります) ――

Here's my video for the record (it leads to YouTube) --.

娘の映像を記録しておけば、もっとPV上がるな ―― と気がついた時は、作業が終っていました。

If I record my daughter's video, I'll get more PV...and when I realized that, the work was done.

2021/05,江端さんの忘備録

今日、一昨年度、高視聴率だったドラマのカップルの主人公が、結婚を発表しました。

Today, the main characters of a couple of dramas that had high ratings the year before last announced their engagement.

私には、江端家用のLINEで連絡が来ました。

I was contacted by LINE for the Ebata family.

もちろん、結婚はおめでたいことです。その気持ちに嘘偽りはありません ―― が、

Of course, marriage is something to be celebrated. There's no lie in that feeling -- however, I also think,

―― でも、赤の他人だよね?

"They are strangers, aren't they?"

とも思います。

これについては、

About this issue, in my column,

『違いがあるとすれば、私はその友人を良く知っているのですが、逆に、その友人は私のことを全然知らない、という、ただそれだけのことなのです』

"If there is a difference, it is that I know my friend well, but they don't know me at all"

にて、言及しておりますので、今回は割愛します。

So, I will skip this section as I have already mentioned it in my previous article.

-----

テレビのニュースでインタビューを見ていると、どれも当たり障りのない、面白くないものばかりだと感じます。

When I watch interviews on TV news, I find that they are all bland and uninteresting.

これは、普通の婚約ではなく、芸能人同士の婚約なのです。

This is not an ordinary marriage, but a marriage between two celebrities.

ここは一発、捻りのあるコメントが欲しいところです。

I would like them to have a shot at a comment with a twist here.

『いやー、大変おめでたいです。彼らの結婚生活が、5年間も続けられれば、もう、それは『勝ったも同然』ですよね』

"Well, I'm very happy for them. In addition, if their marriage lasts for five years, it's as good as a win, isn't it?"

という、ウイットに富むコメントを紹介して貰いたいものです。

I'd like to see to introduce some witty comments on the subject.

-----

―― という話を嫁さんにしたら、凄く嫌な顔をされました。

-- When I mentioned this to my wife, she gave me a very unpleasant look.

2021/05,江端さんの忘備録

バグが存在しないプログラムはありません。

"No bug, no program"

そんなプログラムがあったらお目にかかりたいものです。

If you know a program that the bug does not exist, please show it to me.

バグが発生しないプログラムは、単にバグの通過するルーチンを通過していないだけです。

A program that doesn't have bugs is simply not going through the routines that bugs go through.

そんなことは、プログラム開発の常識中の常識です。

Such things are common knowledge in program development.

そして、私が作ったプログラムも、しばしば他人にバグを発見されては、それを指摘されています。

And my programs are often found to be buggy by others, who then point them out to me.

それは、とても恥しいことで、死ぬほど屈辱的なことで、バグを見つけた奴に殺意さえ覚えます。

It's so embarrassing, so humiliating to the point of death, that it even makes me want to kill the guy who found the bug.

-----

しかし、それでも、歯をくいしばって、引きつる笑顔を受かべながら、

But even so, I gritted my teeth, and with a tight smile on my face,

『私のプログラムのバグを見付けて下さって、誠にありがとうございます』

"Thank you very much for finding the bug in my program"

と、お礼の言葉を述べるのが、プログラムの世界に携わる住人のコモンセンスです。

It is the common sense of the inhabitants of the program world to say thank you in this way.

―― 分かんないだろーなー、と思います。

"You wouldn't understand, I guess"

特に、面子とかを死にほど気にする反社の連中にとっては、とても信じられない世界観だろうと思います。

Especially for gangsters who care about their pride to death, I think it would be a very unbelievable worldview.

-----

政治家や自衛隊の皆さんも、「面子」が大切な組織だと思います。

I believe that politicians and the Self-Defense Forces are also organizations where "pride" is important.

ですので、

So, I can understand that

―― ワクチン大規模接種システムの検証報道に防衛大臣が「悪質だ」と抗議

"Defense Minister protests against reports of verification of large-scale vaccination system, calling it "malicious"

という気持ちは分かります。

でも、それは違うのです。

But that's not the right way to behave.

私は、朝日新聞や、毎日新聞のシンパなんぞではありません。

I am not a sympathizer of the Asahi Shimbun or the Mainichi Shimbun.

しかし、この件だけに関して言えば、

However, as far as this one thing goes.

『システム上の不具合を見つけて頂き、ありがとうございました』

"Thank you for finding the glitch in the system"

が正しいのです。

is correct

-----

私は、こんな短期間で「新型コロナウイルスワクチンの大規模接種センターの予約システム」を、曲がりなりにも稼動させてみせた皆さんに、心からの敬意を払っています。

I have the utmost respect for all of you who have managed, in such a short period of time, to get the "reservation system for the large-scale vaccination center for the new coronavirus vaccine" up and running.

加えて、私は、稼動中のシステムに、そのような例外処理の対策を組込むのがいかに難しいことかであるかも、よく分かっています。

In addition, I am well aware of how difficult it is to incorporate such exception handling measures into a working system.

システムエンジニアであるこの私は、「国民の善意を前提に稼動させ続けなければならないシステム」のジレンマを、心の底から理解できる一人です。

As a system engineer, I am one of those who can truly understand the dilemma of "a system that must continue to operate based on the goodwill of the people"

-----

それでもなお、防衛大臣は、この件に関してだけは、

And yet, the Minister of Defense has to say,

『ありがとうございました』

'Thank you very much'

と言わなければならないのです ―― はらわたが煮えくり返るほど悔しいでしょうけど。

just for this. I'm sure you must be so frustrated that your guts are boiling over.

2021/04,江端さんの技術メモ

Amazon Inspectorを使う必要にせまられて、Amazon Lightsail でできるか試してみた。

Teratermで入った、Amazon Lightsailのシェルから、

wget https://inspector-agent.amazonaws.com/linux/latest/install

sudo bash install

# o.o.o.o などの表示が出てきて失敗する場合は、/etc/init.d/awsagent.envの設定をする

# awsagent.envの内容は他のページに記載があるから探すこと

は、さくっと成功したけど、

その後、AWS マネジメントコンソール から、inspector を選んで、

[Amazon Inspector]-[評価ターゲット]→[作成]

Assessment-Target-All-Instances-All-Rules

を選んで、(全部のEC2をターゲットとする、てなことが記載されていたので)編集で何も操作せずに、「保存」を押下。

が出てくる。

[評価テンプレート]-[作成]で

Assessment-Target-All-Instances-All-Rules

を選んで、(全部のEC2をターゲットとする、てなことが記載されていたので)「編集」→「保存」を押下

そのまま「実行」を押すと

と失敗するみたいです。

====

調べてみると「Amazon Lightsail は AWSのEC2と同じ扱いはできない」てな記載があったので、ここは大人しく引き下がることにしました。

私が間違っていることを知っている方は、御一報頂ければ幸いです。

E-mailはこちら(スパム対策)

2021/01,江端さんの技術メモ

助けて頂いた資料: 

 Proxy環境でdockerを外に繋ぐ方法 

今、困っていること

Goが動かん。下記(1)~(4)をやっても、

package main

import "fmt"

func main(){
     fmt.Printf("Hello world\n")
}

以下のエラーが出てきて取れない。(なんだこれ?)

$ go run hello.go
go: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
このメージを読んで頂いたプログラミングの師匠のSさんに、"go mod vendor" を試すようにアドバイスさました。以下、その挑戦の経緯を記載します。
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go run hello.go
go: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
やっぱりダメかなぁ(ちなみに、~/hello.go なら、サクっと動く)
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod vendor
go: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
これもダメかぁ
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod download
go: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
(手あたり次第モードになってきた・・・)
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod init
go: cannot determine module path for source directory /home/ubuntu/codes/hailing_go/docker/app (outside GOPATH, module path must be specified)
Example usage:
'go mod init example.com/m' to initialize a v0 or v1 module
'go mod init example.com/m/v2' to initialize a v2 module
Run 'go help mod init' for more information.
(手あたり次第モードが進む)
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go run hello.go
go: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
やっぱりダメかぁ
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod github.com/go-chi/jwtauth/go.mod
go mod github.com/go-chi/jwtauth/go.mod: unknown command
そりゃ、だめだよなぁ
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod verify
go: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod why
go: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod init m
go: creating new go.mod: module m
あれ、ググったコマンドを適当に入力したら、"m"というモジュールができてしまったらしい。変なモジュール作ってしまって、やばくないか?
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go run hello.go
go: finding github.com/go-chi/jwtauth v4.0.4+incompatible
go: downloading github.com/go-chi/jwtauth v4.0.4+incompatible
go: extracting github.com/go-chi/jwtauth v4.0.4+incompatible
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: extracting github.com/dgrijalva/jwt-go v3.2.0+incompatible
Hello world
あれ、モジュールが自動的にインストールされて,"hello.go"が動いてしまった・・・
この話、実は続続きがある・・・
https://wp.kobore.net/%e6%9c%aa%e5%88%86%e9%a1%9e/post-2156/

(とりあえず、ここまで)

試行錯誤で分った事項

(1)/etc/apt/apt.conf を作る

Acquire::http::Proxy "http://12.34.56.789:8080";
Acquire::https::Proxy "http://12.34.56.789:8080"; // (×https://)
Acquire::ftp::Proxy "ftp://12.34.56.789:8080";

(2)/etc/systemd/system/docker.service.d/http-proxy.confを作る

/etc/systemd/system/docker.service.d/http-proxy.conf を力づくで作った(最初はなかった(みたい))。

修正前:

[Service]
Environment="HTTP_PROXY=http://12.34.56.789:8080/" "HTTPS_PROXY=https://12.34.56.789:8080" "NO_PROXY=localhost,127.0.0.1,.12.34.56.789"

修正後:

[Service]
Environment="HTTP_PROXY=http://12.34.56.789:8080/" "HTTPS_PROXY=http://12.34.56.789:8080" "NO_PROXY=localhost,127.0.0.1,.12.34.56.789"

(なんのことはない、HTTPS_PROXY の "https:"→"http:" としただけ。ただし、これは、個々の環境に依存する問題だと思う)

(3)関係のありそうな"Dockerfile"に片っ端から、以下を書き込む(関係ありそうなファイルは2つ。hitachi_ride_hailing_go/docker/postgis-pgrouting/Dockerfile
hitachi_ride_hailing_go/docker/app/Dockerfile)

ENV http_proxy http://12.34.56.789:8080
ENV https_proxy http://12.34.56.789:8080

(一番最初の”RUN”の前に書き込んでおくとよい)

(4)シェルに以下を書き込んでおく(設定方法は後で調べる)

export http="http://12.34.56.789:8080"
export https="http://12.34.56.789:8080"

 

2021/05,江端さんの忘備録

今日、安定剤を貰いに、近くのクリニックに来たのですが、「話の長いおばさん」に、辟易してしまいます。

Today, I came to a nearby clinic to get some stabilizers, but I was fed up with the "long-talk old woman".

彼女は、コロナのワクチン摂取の予約が取れない事情を、長々と、クリニックの受付で語り続けていました。

She was talking at the reception desk of the clinic about how she couldn't get an appointment to get the Corona vaccine.

待合室で話を聞いていた私の方が、キレそうになりました。

I was listening to the conversation in the waiting room, and I almost lost my temper.

『結論を先に言え!』と、そのおばさんに説教しそうになりました。

"Tell me the conclusion first!" I was almost to lecture the old woman.

-----

私が、『偉いなぁ、立派だなぁ』と思ったのは、おばさんの話に割り込むことなく、話を聞き続けていた、受付のお姉さんでした。

What I thought was great and admirable was the lady at the reception desk who kept listening to the old woman's conversation without interrupting.

これからは、こういう「非ロジカルトーク」を上手く捌ける人間が、必要となってくるのだろうと思います。

From now on, I think we will need people who can handle this kind of "non-logical talk" well.

なぜなら、私たち(私も含めて)、ロジカルに語ることや、ロジカルに記載することが、苦手だからです。

This is because we (myself included) are not very good at talking logically or describing things logically.

ロジカルトークや、ロジカルライティングは、それだけでトレーニングの対象(対価が発生する)になるほど、難しい技術です。

Logical talk and logical writing are such difficult skills that they should be the subject of training (for a price) on their own.

これを、全ての人に強いるのは、普通に「暴力」です。

It is usually "violence" to force this on everyone.

それはよく分かってはいるのですが、『30秒で説明できることを、4回繰り返して、5分以上もしゃべる続けること』も「暴力」だよな、とも思います。

I am well aware of this, but I also think that 'repeating four times what can be explained in 30 seconds and talking for more than five minutes' is also 'violence'.

-----

まあ、そう遠くない未来、私も「そう」なります。

Well, in the not-too-distant future, I will be "that" too.

ロジカルかどうかはさておき、私たちの最期は、(1)認知症にならずに死ぬか、(2)認知症なって死ぬか、の二択しかありません。

Logical or not, we have only two choices at the end of our lives: (1) die without dementia, or (2) die with dementia.

そして、今や、(2)になる可能性が「圧倒的」です。

And now there is an "overwhelming" chance that it will be (2).

(さらに、50%以上の確率でガンで死にます)。

(Furthermore, there is a greater than 50% chance that we will die of cancer).

自分が、何をしゃべりたいのか上手く纏められない時に、回りから『結論を先に言え!』と罵しられるのは、『さぞ辛いことだろうな』とは思います。

When I can't speak well and people around me are cursing me, "Speak your conclusion first!". I can imagine that this is absolutely painful for me.

しかし、その一方で、

But on the other hand...

―― どうせ、いずれ自分が罵しられることになるなら、今、他人を罵しっておいた方がおトクかな

"If I'm going to be abused sooner or later, it's better to abuse others now"

という、下衆(ゲス)なことも考えています。

I also think about the despicable matter.