$ docker-compose ps -a NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS es-cluster-01 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-01 About a minute ago Up About a minute (healthy) 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp es-cluster-02 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-02 About a minute ago Up About a minute (healthy) 0.0.0.0:9202->9200/tcp, 0.0.0.0:9302->9300/tcp es-cluster-03 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-03 About a minute ago Up About a minute (healthy) 0.0.0.0:9203->9200/tcp, 0.0.0.0:9303->9300/tcp kibana-cluster kibana:7.17.9 "/bin/tini -- /usr/l…" kibana-cluster About a minute ago Up 11 seconds (health: starting) 0.0.0.0:5601->5601/tcp setup-cluster elasticsearch:7.17.9 "/bin/tini -- /usr/l…" setup-cluster About a minute ago Up About a minute 9200/tcp, 9300/tcp
再过一会还是不见kibana启动好,却发现es-client-01退出,查看日志没有任何错误提示。
1 2 3 4 5 6
$ docker-compose ps NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS es-cluster-02 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-02 2 minutes ago Up 2 minutes (healthy) 0.0.0.0:9202->9200/tcp, 0.0.0.0:9302->9300/tcp es-cluster-03 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-03 2 minutes ago Up 2 minutes (healthy) 0.0.0.0:9203->9200/tcp, 0.0.0.0:9303->9300/tcp kibana-cluster kibana:7.17.9 "/bin/tini -- /usr/l…" kibana-cluster 2 minutes ago Up About a minute (health: starting) 0.0.0.0:5601->5601/tcp setup-cluster elasticsearch:7.17.9 "/bin/tini -- /usr/l…" setup-cluster 2 minutes ago Up 2 minutes 9200/tcp, 9300/tcp
然后执行想着执行docker-compose up -d 把es-client-01起来,结果是
1 2 3 4 5 6
$ docker-compose ps NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS es-cluster-01 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-01 19 minutes ago Up 16 minutes (healthy) 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp es-cluster-03 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-03 19 minutes ago Up 19 minutes (healthy) 0.0.0.0:9203->9200/tcp, 0.0.0.0:9303->9300/tcp kibana-cluster kibana:7.17.9 "/bin/tini -- /usr/l…" kibana-cluster 19 minutes ago Up 18 minutes (healthy) 0.0.0.0:5601->5601/tcp setup-cluster elasticsearch:7.17.9 "/bin/tini -- /usr/l…" setup-cluster 19 minutes ago Up 19 minutes 9200/tcp, 9300/tcp
这是后02 node又退出了,而且还是没有任何出错提示。感觉是这个集群只有两个能起来。
这时候直接访问es 和 kibana 都正常。
这时候用 ElasticSearch Head 查看es集群,发现一切正常,集群健康值green。
在老款笔记本执行
在2015款MacBook 上执行,这台电脑启动比较慢,应该是cpu 、内存、硬盘速度都不够快。
第一次完提示03不健康,估计是kibana检查重试的次数到了后自己退出了。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
$ docker-compose up -d [+] Running 4/5 ⠿ Container setup-cluster Started 0.9s ⠿ Container es-cluster-01 Healthy 156.1s ⠿ Container es-cluster-03 Error 155.6s ⠿ Container es-cluster-02 Healthy 156.5s ⠿ Container kibana-cluster Created 0.1s dependency failed to start: container for service "es-cluster-03" is unhealthy
$ docker-compose ps NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS es-cluster-01 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-01 2 minutes ago Up About a minute (health: starting) 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp es-cluster-02 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-02 2 minutes ago Up About a minute (health: starting) 0.0.0.0:9202->9200/tcp, 0.0.0.0:9302->9300/tcp es-cluster-03 elasticsearch:7.17.9 "/bin/tini -- /usr/l…" es-cluster-03 2 minutes ago Up About a minute (health: starting) 0.0.0.0:9203->9200/tcp, 0.0.0.0:9303->9300/tcp setup-cluster elasticsearch:7.17.9 "/bin/tini -- /usr/l…" setup-cluster 2 minutes ago Up About a minute 9200/tcp, 9300/tcp
es-cluster-02 | {“type”: “server”, “timestamp”: “2023-02-18T06:11:25,259Z”, “level”: “WARN”, “component”: “o.e.c.r.a.DiskThresholdMonitor”, “cluster.name”: “docker-cluster”, “node.name”: “es-cluster-02”, “message”: “high disk watermark [90%] exceeded on [pdT2lWRmQEi04k5GYvrWuA][es-cluster-01][/usr/share/elasticsearch/data/nodes/0] free: 88.6gb[9.2%], shards will be relocated away from this node; currently relocating away shards totalling [0] bytes; the node is expected to continue to exceed the high disk watermark when these relocations are complete”, “cluster.uuid”: “xaadt2vISeWTK4hk8RDJeA”, “node.id”: “7rYuhhyeS86iyKOtUChBKw” }
GNU ddrescue是一个用于磁盘、CD-ROM与其他数字存储媒体的资料恢复工具。其将原始存储区块从一个设备或文件复制到另一个,同时以智能方式处理读取错误,透过从部分读取的区块中截取尚称良好的扇区来最小化资料损失。 GNU ddrescue是用C++编程语言编写的,并以开源软件的形式提供,最初于2004年发布。
1
brew install ddrescue
Locate the drive using diskutil list.
1 2 3
/dev/disk3 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: PRJ_20090118 *4.4 GB disk3
Unmount the disk
1
diskutil unmount /dev/disk3
Start a rescue operation of the disk into an image. Make sure the location of Rescue.dmg is replaced with your desired location.
[mpeg @ 0x7fd5c0816400] stream 1 : no PTS found at end of file, duration not set [ac3 @ 0x7fd5c081ca00] incomplete frame8kB time=00:16:28.91 bitrate=1628.7kbits/s dup=4945 drop=0 speed=2.92x
‘hvc1’ stores all parameter sets inside the MP4 container below the sample description boxes. ‘hev1’ stores all parameter sets in band (inside the HEVC stream). 我决定试试,只转一个vob,免得太慢。
[hevc_videotoolbox @ 0x7f87d8058a00] Error: cannot create compression session: -12908 [hevc_videotoolbox @ 0x7f87d8058a00] Try -allow_sw 1. The hardware encoder may be busy, or not supported. Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[hevc_videotoolbox @ 0x7f78eb80f200] Error: cannot create compression session: -12908 [hevc_videotoolbox @ 0x7f78eb80f200] Try -allow_sw 1. The hardware encoder may be busy, or not supported. Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting paddlepaddle==2.3.2 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ba/bf/bc6a1dd9a1126d8cd1467917d34bf12c9282152f99afc5b8cad29118eda4/paddlepaddle-2.3.2-cp37-cp37m-macosx_10_6_intel.whl (93.0 MB) Collecting numpy>=1.13 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/32/dd/43d8b2b2ebf424f6555271a4c9f5b50dc3cc0aafa66c72b4d36863f71358/numpy-1.21.6-cp37-cp37m-macosx_10_9_x86_64.whl (16.9 MB) Collecting decorator Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d5/50/83c593b07763e1161326b3b8c6686f0f4b0f24d5526546bee538c89837d6/decorator-5.1.1-py3-none-any.whl (9.1 kB) Collecting paddle-bfloat==0.1.7 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c6/40/65edb5bf459317bdc808f884805784470c9b5ab38b81df23fac02e02f5b8/paddle_bfloat-0.1.7-cp37-cp37m-macosx_10_9_x86_64.whl (44 kB) Collecting six Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting protobuf<=3.20.0,>=3.1.0 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/be/f0/2633123b475c9ae6e9be25351c7ba6ca3adc223d73789ca2f6f5e4686723/protobuf-3.20.0-cp37-cp37m-macosx_10_9_x86_64.whl (961 kB) Collecting astor Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c3/88/97eef84f48fa04fbd6750e62dcceafba6c63c81b7ac1420856c8dcc0a3f9/astor-0.8.1-py2.py3-none-any.whl (27 kB) Collecting Pillow Downloading https://pypi.tuna.tsinghua.edu.cn/packages/91/1d/57a09a69508a27c1c6caa4197ce7fac5be5b7d736889ba1a20931ff4efca/Pillow-9.4.0-1-cp37-cp37m-macosx_10_10_x86_64.whl (3.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 14.4 MB/s eta 0:00:00 Collecting opt-einsum==3.3.0 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/bc/19/404708a7e54ad2798907210462fd950c3442ea51acc8790f3da48d2bee8b/opt_einsum-3.3.0-py3-none-any.whl (65 kB) Collecting requests>=2.20.0 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ca/91/6d9b8ccacd0412c08820f72cebaa4f0c0441b5cda699c90f618b6f8a1b42/requests-2.28.1-py3-none-any.whl (62 kB) Collecting idna<4,>=2.5 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl (61 kB) Collecting urllib3<1.27,>=1.21.1 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/65/0c/cc6644eaa594585e5875f46f3c83ee8762b647b51fc5b0fb253a242df2dc/urllib3-1.26.13-py2.py3-none-any.whl (140 kB) Collecting charset-normalizer<3,>=2 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/db/51/a507c856293ab05cdc1db77ff4bc1268ddd39f29e7dc4919aa497f0adbec/charset_normalizer-2.1.1-py3-none-any.whl (39 kB) Requirement already satisfied: certifi>=2017.4.17 in ./opt/anaconda3/envs/paddle232-py3710/lib/python3.7/site-packages (from requests>=2.20.0->paddlepaddle==2.3.2) (2022.12.7) Installing collected packages: paddle-bfloat, urllib3, six, protobuf, Pillow, numpy, idna, decorator, charset-normalizer, astor, requests, opt-einsum, paddlepaddle Successfully installed Pillow-9.4.0 astor-0.8.1 charset-normalizer-2.1.1 decorator-5.1.1 idna-3.4 numpy-1.21.6 opt-einsum-3.3.0 paddle-bfloat-0.1.7 paddlepaddle-2.3.2 protobuf-3.20.0 requests-2.28.1 six-1.16.0 urllib3-1.26.13
(paddle232-py3710) wanghongxing:~ whx$ which paddle /Users/whx/opt/anaconda3/envs/paddle232-py3710/bin/paddle (paddle232-py3710) wanghongxing:~ whx$ paddle version <stdin>:3: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PaddlePaddle 2.3.2, compiled with with_avx: ON with_gpu: OFF with_mkl: OFF with_mkldnn: OFF with_python: ON
(paddle232-py3710) wanghongxing:guyuai-emotion-train whx$ pip3 install paddle Collecting paddle Using cached paddle-1.0.2.tar.gz (579 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [8 lines of output] Traceback (most recent call last): File "<string>", line 36, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/private/var/folders/6d/lxb9s6557cx2wq_2fs6s2_bm0000gr/T/pip-install-h1m6_55m/paddle_d36d8dad2117474f8fc2aaa140c6ac30/setup.py", line 3, in <module> import paddle File "/private/var/folders/6d/lxb9s6557cx2wq_2fs6s2_bm0000gr/T/pip-install-h1m6_55m/paddle_d36d8dad2117474f8fc2aaa140c6ac30/paddle/__init__.py", line 5, in <module> import common, dual, tight, data, prox ModuleNotFoundError: No module named 'common' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details.
然后手动安装依赖包
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
pip install common pip install dual pip install tight pip install data pip install prox
(paddle232-py3710) wanghongxing:guyuai-emotion-train whx$ pip3 install paddle==1.0.2 Collecting paddle==1.0.2 Using cached paddle-1.0.2.tar.gz (579 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: paddle Building wheel for paddle (setup.py) ... done Created wheel for paddle: filename=paddle-1.0.2-py3-none-any.whl size=33366 sha256=63916ce0eea092ef9e690f3e992b51f32f955eabc66070be6e9feba60d672973 Stored in directory: /Users/whx/Library/Caches/pip/wheels/e2/38/0e/382f68d54c6949b370f1438aa96172ff44a8ed367134cce32e Successfully built paddle Installing collected packages: paddle Successfully installed paddle-1.0.2
# ipfs ls QmZicCMMw7xfcbMHbZ1hNJ1n9om1jDFywdjQFXEkGwGQMW QmRxqKo5fUnpNPzvWcPnBZfkV9533bqZLBzRWFeWtkjbME 21 sub.html
# ipfs ls QmWR5PNWprgGfnYS9t3MUZGV1YtYifWkebgrh7UB6Zi3xD QmRxqKo5fUnpNPzvWcPnBZfkV9533bqZLBzRWFeWtkjbME 21 sub.html QmbxCEbzgQZmy38pew5Wy6cbfiefW8z3vGbepZuZzcgchP 10 test1.txt
绑定节点名 publish
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# ipfs name publish QmeoLK9ZsQK9zroLjb7HNxhyqE37ieL66uFnLRJoWD4bxL Published to k51qzi5uqu5dk53t2hi2f8dhupwl2kkxypggp4dd7svxkxirwg411zfthqn08e: /ipfs/QmeoLK9ZsQK9zroLjb7HNxhyqE37ieL66uFnLRJoWD4bxL # ipfs cat /ipns/k51qzi5uqu5dk53t2hi2f8dhupwl2kkxypggp4dd7svxkxirwg411zfthqn08e/index.html index.html from test
# echo "index.html version new" >test/index.html # ipfs add -r test added QmNZt9aFJHtggpXupw2VjsvZ1RksV7AfjhLgBSSN5q9a51 test/index.html added QmRxqKo5fUnpNPzvWcPnBZfkV9533bqZLBzRWFeWtkjbME test/sub/sub.html added QmbxCEbzgQZmy38pew5Wy6cbfiefW8z3vGbepZuZzcgchP test/sub/test1.txt added QmbNyHGiz83bNbUnyNjXTjr1pm8AhD5XHyhQfS6iLiwBT1 test/test.html added QmWR5PNWprgGfnYS9t3MUZGV1YtYifWkebgrh7UB6Zi3xD test/sub added QmbwhfHfarbU3X9wa8ovtK7Q4fGkd8R3B8biH4kUD7CmuU test # ipfs name publish QmbwhfHfarbU3X9wa8ovtK7Q4fGkd8R3B8biH4kUD7CmuU Published to k51qzi5uqu5dk53t2hi2f8dhupwl2kkxypggp4dd7svxkxirwg411zfthqn08e: /ipfs/QmbwhfHfarbU3X9wa8ovtK7Q4fGkd8R3B8biH4kUD7CmuU # ipfs cat /ipns/k51qzi5uqu5dk53t2hi2f8dhupwl2kkxypggp4dd7svxkxirwg411zfthqn08e/index.html index.html version new