ありふれているけど、いつの時でも頭を抱える状況に、今回も頭を抱えています。
It's common, however, it has made me annoyed, and I am annoyed now.

今回は、chkdskでも、復旧できませんでした。
This time, "chkdsk" didn't save me.
各種の市販ツールも試してみたのですが、ダメでした。
I tried various commercial tools, but they were in vain.
江端智一のホームページ
ありふれているけど、いつの時でも頭を抱える状況に、今回も頭を抱えています。
It's common, however, it has made me annoyed, and I am annoyed now.

今回は、chkdskでも、復旧できませんでした。
This time, "chkdsk" didn't save me.
各種の市販ツールも試してみたのですが、ダメでした。
I tried various commercial tools, but they were in vain.
https://teratail.com/questions/8xzab7sat8gujj#reply-3jfh5txotuqxqb
の質問サイトに投げたものですが、ローカルでも作っておきます。
TLS対応にしているGo言語のサーバを、Dockerコンテナの中から使えるようにしたい
GO言語を使ってサーバを作っています。これらのサーバをDockerコンテナに格納して、運用しやすくしたいと考えております。
Dockerコンテナに格納すると、https(×http)通信が使えません。
cert.pem、key.pemを使わない場合、http://127.0.0.1:18888で、ブラウザに"hello"メッセージがされますが、cert.pem、key.pemを使ってhttps://127.0.0.1:18888とした場合、「このサイトにアクセスできません」と表示されます。
GO言語
package main
import (
"flag"
"fmt"
"log"
"net/http"
"net/http/httputil"
"os"
)
var url_host string
func handler(w http.ResponseWriter, r *http.Request) {
dump, err := httputil.DumpRequest(r, true)
if err != nil {
http.Error(w, fmt.Sprint(err), http.StatusInternalServerError)
return
}
fmt.Println(string(dump))
fmt.Fprintf(w, "<html><body>hello</body></html>\n")
}
var addr = flag.String("addr", "127.0.0.1:18888", "http service address") // テスト
func main() {
http.HandleFunc("/", handler)
fmt.Println("url_host:", url_host)
log.Println("start http listening :18888")
var httpErr error
if _, err := os.Stat("./cert.pem"); err == nil {
if httpErr = http.ListenAndServeTLS(*addr, "./cert.pem", "./key.pem", nil); httpErr != nil {
log.Fatal("No pem file with https error: ", httpErr.Error())
}
}
}
ちなみに、cert.pemと、key.pemは、"127.0.0.1","localhost"で通るように作ってあります。
#FROM golang:apline
FROM golang:1.16.3-alpine
WORKDIR /go
ADD . /go
CMD ["go", "run", "main.go"]
docker-compose.yml
version: '3'
services:
app:
build: .
ports:
- "18888:18888" # "ホストのポート:コンテナのポート"
上記のmain.go のfunc main()を以下のようにしている場合は,http(×https)で通信できます。
func main() {
var httpServer http.Server
http.HandleFunc("/", handler)
log.Println("start http listening :18888")
httpServer.Addr = ":18888"
log.Println(httpServer.ListenAndServe())
}
■Windows10上のDocker for Windowsを使用しています。
■Dockerコンテナを使わないで、 windowsのコマンドプロンプトから起動する場合は、"https://127.0.0.1:18888"は問題なく起動します。
で、頂いたご回答が以下の通り。
Dockerfile
#FROM golang:apline
FROM golang:1.16.3-alpine
WORKDIR /app
ADD . /app
CMD ["go", "run", "main.go", "-addr", ":18888"]
と最後の一行を、CMD ["go", "run", "main.go", "-addr", ":18888"]
とするだけでした。
で、以外な盲点が、
ブラウザのキャッシュを消去しないと、変更がブラウザに反映されない
だったりします。(何度も経験しているのに、これをよく忘れるんだよなぁ)
散々、色々試したあげく、最初に頂いた、Dockerfileの内容に変更することで、無事問題を解決することができました。現在、Dockerの中で立ち上げたgoのサーバに対して、https://localhost:18888で表示されることを確認しました。
今後のサーバ立ち上げに関して、かなり有益な知見となりました(実サーバ運用では、ご指摘の内容を反映してリスクを回避したいと思います)。 この度は、誠にありがとうございました。
以上
本日、リモート環境で打ち合わせをしている最中に、比較的大きめの地震が発生しました。
During a remote meeting, a relatively big earthquake occurred.
が、打ち合わせはそのまま問題なく進んでいるので、『いちいち地震を気にしないで会議を進めるのだ』と思っていました。
However, the meeting continued without any trouble, I thought "They don't care about earthquakes"
ところが、3秒くらい経過したところで、「あ、揺れている」「比較的大きいですね」という声がチラホラ聞こえてきました。
After about three seconds, the voice "Oh, it's shaking," or "It's relatively big" were coming, so I thought
―― 生れてはじめて、地震波の存在をリアルに実感した
"For the first time in my life, I really felt the existence of earthquake waves"
と思いました。
-----
ただ、Twitterで震源地情報などを調べると、どうも、違和感がある。
However, I felt a sense of discomfort, when I looked up the epicenter on Twitter.
私の住んでいるところが、一番震源地より遠いはずです。
My location must be far from the epicenter, I thought.
私の考えた、仮説の一つは、『他の人の(高価な)家は免震構造が頑強であるが、私の(高価でない)家は敏感にP波(初期微動)を感じられる』です。
One of my hypotheses is that "other member's houses are expensive and robust seismic isolation structures, but my house is not expensive and can feel P-waves (initial microtremors) sensitively.
あまり愉快な仮説ではありませんが。
Anyway, it is not a very pleasant hypothesis.
なんでこれが
FROM golang:1.16.3-alpineWORKDIR /goADD . /go# CMD ["go", "run", "main.go","-addr" ":18888"]# CMD ["go", "run", "main.go","-addr" ":18888"]# CMD ["main.exe"]
こうなる?

わからん・・・
私は、自分のWebサイトをDB化しています ―― GoogleエンジンとWordPressの検索機能を使っているだけですが。
I use my website as DataBase, using just the Google search engine and search functions of WordPress.
これ結構便利です。
This is really useful.
「○○についてネタが欲しい」と思った時に、すぐに探し出せるからです。
Whenever I want to tell a story about a specified theme, I can find it soon.
-----
今日も会社で、あるテーマについて投稿しなければならなかったのですが、数秒でネタを見つけました。
Today I was ordered to submit a short story about a specific theme, and I could find it in a few seconds.
まあ、ネタの使い回しもあるので、何度も同じ話を聞かされている人もいるでしょうが ―― まあ、そこは、諦めて下さい。
Well some people should hear my story again and again, I ask them to give up.
-----
なんだかんだ言って、私のWebの創立は、1993年です ―― 創業30年の老舗Webサイトです。
Anyway, my Web establishment was founded in 1993 -- a 30-year old Web site.
まあ、規模的には「和菓子屋」というよりは「駄菓子屋」ですが ――
Well, in terms of scale, it's more of a "candy store" than a "wagashi ya" -- however,
それでも歴史だけに着目すれば、AmazonやGoogleなどのGAFAなんぞは、小僧のようなものです。
Still, if you focus only on history, GAFAs like Amazon and Google are like little boys.
決して、負け惜しみではありません。
By no means is this a sore loser?
昨日書いたようなデッドロックに、本日、遭遇することになりました。
Today, I faced the "Dead Lock" I wrote yesterday.
だいたいヤバいことは、システムをいじった直後に発生するというのは「お約束」です。
Almost all of the troubles will happen just after the system modification. This is so typical.
-----
で、このデッドロック対策について、教えを乞い、100ページのマニュアルを送ってもらったのですが、「もうダメだ」と諦めました。
In order to avoid the deadlock, I asked workers in my company. A guy gave me a manual book with more than 100 pages. After reading it, I gave up easily.
しかし、その人から『簡単ですよ』と言われて、実際に試してみたら、ざっくり1分で設定が完了しました。
However, the guy gives a reply, "It was a piece of cake", I could complete the set in a minute
-----
ここから導かれる事実は2つ。
The facts lead to the following.
■マニュアルは、本当に欲しいことを、分からないように記載される傾向がある
- Manual books are apt to be written difficult, so too hard to get us what we want.
■人間(というか、私)は、マニュアルより、人間の言葉を信じる傾向にある
- A human being (like me) is apt to believe human words more than manuals.
ということです。
私も今回のメモを纏めましたが、「10行の文章 + 図面のハードコーピー2枚」になりました。
I made a memorandum about what I did, and the volumes are only 10 line-document and two hardcopy sheets.
-----
マニュアルがあんなに長く、分かりにくいのは、問題が発生した時に「問題」になるからです。
The reason why manuals are so long and hard to read is to become a problem if the problem happens.
一方、私のメモは私の為のものなので、他の人がそれを読んでシステムを壊すなどの被害が起ったところで ―― 私の、知ったことではありません。
On the other hand, my memorandum is just for me, so even if someone tries some actions by reading my memorandum, it is not my business.
私だって、他の人のメモで、色々酷い目にあったこともあります ―― これは『お互い様』です。
Even I also got in terrible trouble by reading another's memorandum. So It is "mutual"
まあ、普通の企業には、恐しくてとてもできないことだとは思いますが。
Well, I think it is something that ordinary companies are too afraid to do.
ITシステムが会社になかった時代 ―― いや、本当にそういう時代があったんです。
"The ear where there is No IT system in companies". --- I am not kidding.? The era had existed in the old days.
ほんの20年くらい前は、それが当たり前でした。
It was natural just before 20 years ago.
勤怠管理の提出を怠れば、総務部が怒りの声で電話をしてきて、遅延した伝票の処理は庶務担当の人に、頭を下げて、定期的にお土産を提供していれば、なんとかなりました。
If I failed to submit my time and attendance, a person in the general affair department called me in an angry voice. When I delayed vouchers to the accounting department,? I kept my head down and sometimes I give them souvenirs periodically.
事務処理は、"なあなあ"な人間関係で、なんとかこなすことができたのです。
The paperwork was managed through a casual relationship.
そういう意味では、インターフェースの優れた、いわゆる「ネアカ」「陽キャ」「恫喝」「土下座」というのは、社内において圧倒的に有利、というか、立派な「インタフェース」だったのです。
In that sense, the so-called "cheerfulness," "cherry," "frights," and "down on their knees", were superior interfaces to keep our paper management in my company.
-----
しかし、ITシステムは、そんなこと『気にしません』。
However, IT system doesn't take care of them at all.
決済日を70日経過しても、警告一つ寄越さず、期末の精算処理の時点で、社内が大騒ぎになります。
Even if the deadlines pass through over 70 days, the IT system doesn't put any alert message. As a result, on the day of the end of the fiscal year,? my company came to be in a fuss.
締切の時間を5分遅れたら、報告書を受理しません。
IT system rejects to get a report even if I delay submitting it by just five minutes.
それどころか、末日のシステム集中でシステムダウンをしても、それに対して謝罪も弁済も補償も猶予もなく、そのまま、手続を『不受理』とします。
On the contrary, even if the IT system is down for access concentrations, they have no apology, reimbursement, compensation, or grace, and just reject my submission.
そのため、以前は締切日に資料を提出するのは避けていました。 なぜなら、その日は「システムダウンの日」だと決めているからです。
Therefore I used to avoid submitting any materials on the deadline day. Because I decide the day is "The system down day".
つまるところ、AI技術などと関係なく、業務のIT化によって、私たちは、すでに
In short, regardless of AI technologies, with IT management by computer, we have already become
『システムの奴隷』
"Slavers of the IT system"
と、なっているのです。
-----
私の勤務している会社では、会社の業務システムに対して、年に数回のパスワード変更を実施しなければなりません。
My company orders us to change my "password" several times a year for the company work system.
それを実施しない場合の、システム側からの制裁は、単純で、そして残酷です。
When we don't do it, the sanctions from the systems are simple and brutal.
『全業務システムへのアクセス停止』です。
"All accesses to all work systems are suspended".
業務システムだけでなく、メール、チャット、IP電話、何もかもかもが使えなくなります。
Not only the work systems, but also e-mail, chat, IP phones, and everything else will be out of service.
-----
ところが、パスワードの変更をすると、そのパスワードの変更を他のシステムで承認するという面倒なシーケンスが働きます。
However, when I try to change my password, the change must be admitted by another system. This is a seriously complicated status.
この結果何が発生するかというと ―― デッドロックです。
As a result, what will happen? It is a "deadlock".
システムにアクセスするのに新しいパスワードが必要なのですが、そのパスワードを承認するシステムが、そのパスワードでなければログインできない、という状態になり ――
When I try to access a work system, I need to use the new password. However, the system also needs the new password.
つまるところ、『パスワード変更をすることで、どのシステムにもアクセスできなくなる』という状態が発生するのです。
In short, the situation of "changing password makes me not access any work system" occurs.
デッドロックを発生させない為に、あるシステムにパスワード変更の効果が及ぶ前に処理をしなければならないなど、クソ面倒くさい気遣いが必要になっています。
In order to avoid the deadlock, I have to start the system before being spread the changing password to the system. Anyway, it is an annoying process I have to.
こうなると、もはや、単なる奴隷ではなく、
In a sense, I am not just a slave but,
『システムの下僕』
"Servant of the System"
といっても過言ではないでしょう。
現代の私たちは、望む望まずに関わらず、マイクロソフト社の「Windows OS」と「Office」の奴隷・・・もとい、ユーザとなっています。
I believe that it would not be an exaggeration.
腹立たしいことこの上もありませんが、「ネアカ」「陽キャ」「恫喝」「土下座」を排除した世界の一つの形であるのは事実です。
It is beyond infuriating, but it is true that this is one of the worlds that eliminate "cheerfulness," "cherry," "frights," and "down on their knees".
ただ、システムデッドロックに陥った場合、そこから抜け出すのは、簡単ではない世界です。
Still, it is also very difficult to escape from the world when we are caught by the system deadlock.
-----
次のAI技術の目指すものは、「ネアカ」「陽キャ」「恫喝」「土下座」などのアナログインターフェースを、正しく理解するものなのかもしれません。
The next-generation AI technology might be something to understand the interfaces of "cheerfulness," "cherry," "frights," and "down on their knees".
もっとも、そのAI技術では、コンピュータが『うるせい!大声出すな!!』と応答してくるかもしれませんが。
However, with the AI technology, a computer might respond with "Shut up! Stop yelling!!" against your loud claims.
cert.pem やら key.pem に、localhost や 127.0.0.1を含めて作っていなかったから。以上
C:\Users\ebata\kitaya>curl https://localhost:8080
curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - 失効の関数は証明書の失効を確認できませんでした。
最近の私の英語の教師は、全部"IT"(×"AI")です。
Recently, my English teachers are IT (not AI).
翻訳も、文法も、慣用表現も、チェックは全部ITがやってくれます。
ITs are checking translations, grammar, and idioms of my English.
しかも、ほとんどフリー(無料)。
In addition, they are almost free. So I feel
―― 『語学は人前で恥をかいて習得する』という時代の終焉
The end of an era of "Learning a language with shame in public"
を感じます。
私、以前、英語はコミュニケーションではなくて、コンピュータのインターフェースの為に必要となる、という論を展開したことがあります。
I used to develop the argument that English will be needed not by communication but by the interface of computers.
今や、コンピュータのインターフェースどころか、コミュニケーションの道具として、ITに英語を教えてもらっている有様です。
Now, computers are, beyond my imagination, not only the interface with a human beings but also a teacher we use English as a communication tool.
という話、どっかで書いたなぁ、と思ったら、こちらにありました。
I remember that I had already written the same story before, and I found the following blog.
-----
ただ一つ問題があるとすれば、ITに鍛えて貰うのであれば、日常的に英語を使わなければなりません。
There is a problem to be trained by computer to learn English, we have to continue to use English day by day.
それは、どんなやり方でも構わないのですが、基本的に「毎日、英語を使う」という環境が必要であって、そんな環境、普通に手に入るものではありません。
Any way is good for you, however, the important thing is "using English every day" and the environment. It might be hard to get the environment.
私のように、『日英併著の日記を書いて公開する』というような(気持ちの悪い)決意でもしない限りは無理でしょう。
Like me, "disclosing blogs written in both English and Japanese" is one of several methods, however, ordinal people cannot continue to do that.
ここで大切なのは、やはり『公開』です。
We should emphasize the "disclosing".
一般的に『公開』は怖いことです。観衆の目に晒されて批判を受ける覚悟が必要になるからです。
Generally, "disclosing" is fear for anyone, because, we have to prepare to accept criticisms from many people in the world.
------
そのように考えていくと、
Come to think of it,
―― 『語学は人前で恥をかいて習得する』という時代は、まだ終焉していない?
Is the era of "Learning a language with shame in public" continuing?
のかもしれません。
That might be true.
GWの最初の2日間は、コラムを書いていて、そこからずっとコーディングをしていました。
I had written a long column for the first two days, and after that, I have been coding since then.
が、まあ、予想を越えてコーディングが面倒くさくて、現時点でも予想した進捗の5割も達成していない状況です。
However, beyond my first estimation, I have completed less than just half progress in the present.
いわゆる、『2行のデバッグに丸一日』というやつです ―― 最近の私のブログを読んで頂ければ状況はご理解頂けるとは思いますが。
This is so called, "Two line debugs for one whole day". You could be understanding my real progress by reading recent my columns.
まあ、その『2行のデバッグに丸一日』の結果を、私がバシバシと公開しているのは、私が気前が良い訳ではありません。
I disclosed the result of "Two lines debug for whole one day" easily, however, I am not "open-minded".
世界中の多くのそういう人の記事に助けて貰っているからです ―― "Give and Take"です。
I have been helped by the person who opens their technical tips easily every day. It is a typical "Give and Take"
-----
ところで、私については、"I take"は間違いがないのですが、"I give"については、ちょっと疑義があります。
By the way, for me, It is true that "I take", on the other hand, it is doubtful whether "I give" is.
良いものを頂いて、粗品を返却しているというのでは、なんとも申し訳ありません。
It is not excusable even if I take "something awesome" but I give "something little".
で、まあ、私のブログの横に出てくる参照情報を見ています。

So now I am reading the reference information on my blog page.
まあ、"トントン"くらいにはなっているのかな、と思っています。
I hope that they are almost "even"
『江端のサイトにアクセスしたけど、全然、役に立っていない』ということもありますからね。
There might be many cases that "the information is not useful, even if you access Ebata's Web site".
-----
以前、上司から、
Before, my boss told me that
『江端さんは、社内の特許・秘密情報に抵触しない範囲で、非常に上手く技術情報を開示していることは、よく分かっています。"匠の技"だと思います』
"I know well that Ebata-san opens technical information except for our company secret, security, and patentable information, It is "master craftsmanship", I believe"
と言われたことがあります。
一方、釘も刺されました。
On the other hand, my boss ordered me that,
『しかし、若手研究員の中には、江端さんの"匠の技"に気がつかない者もいます。その者への教育もしっかりやって下さいね』
"Some young researchers in my company might not notice your "master craftsmanship".so I hope you ask to instruct them about your methods"
と。
-----
という訳で、社内の研究員の諸君。
So, young researchers in my company.
自分の力量では、「社内情報を流してしまうかもしれない」と思っているなら、私のマネをしない方がいいです
You don't follow my examples if you worry about your "leak of information".
ゆめゆめ『匿名』ごときで逃げられると思わないようにして下さい。
You don't think that you can run away by using "anonymous"
もし会社が命じれば、私が『追手』になるケースすら考えられます。
Even if my company orders me, I become a "chaser" to you by far.
忘れないでください ―― 私は「会社の犬」です。
Don't forget it. I am a "company's dog".