针对Analyzeadockerinstancestartfailure这个问题,本篇文章进行了详细的解答,同时本文还将给你拓展5WaystoUseLogDatatoAnalyzeSystemPerf
针对Analyze a docker instance start failure这个问题,本篇文章进行了详细的解答,同时本文还将给你拓展5 Ways to Use Log Data to Analyze System Performance--reference、adb: failed to install app-debug.apk: Failure [INSTALL_FAILED_ABORTED: User rejected permissions]、Amazon Textract 返回不同的结果在 WebApp Demo、AnalyzeDocumentRequest 和 StartDocumentAnalysisRequest 之间返回不同的结果、Android adb安装apk问题 Failure [INSTALL_FAILED_VERIFICATION_FAILURE]等相关知识,希望可以帮助到你。
本文目录一览:- Analyze a docker instance start failure
- 5 Ways to Use Log Data to Analyze System Performance--reference
- adb: failed to install app-debug.apk: Failure [INSTALL_FAILED_ABORTED: User rejected permissions]
- Amazon Textract 返回不同的结果在 WebApp Demo、AnalyzeDocumentRequest 和 StartDocumentAnalysisRequest 之间返回不同的结果
- Android adb安装apk问题 Failure [INSTALL_FAILED_VERIFICATION_FAILURE]
Analyze a docker instance start failure
错误信息:Cannot start container xxxxxxxxxxx | Error getting container xxxxxxxxxxxxxxx from driver devicemapper: Error mounting | invalid argument Error | failed to start containers
现象:4 个 Docker 实例中,三个(基本没在使用)能正常启动,一个(内容最多的那个)不能正常启动。
触发诱因:服务器(Docker 宿主机)意外断电。
[root@bogon ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@bogon ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a91dadc56996 b1c89dd2c773 "/bin/auto_service.s 7 weeks ago Exited (137) 23 hours ago mawen
91a542541bb1 b1c89dd2c773 "/bin/auto_service.s 8 weeks ago Exited (128) 28 hours ago rgq
fc0a891e1861 68a34cb5482c "/bin/auto_service.s 3 months ago Exited (0) 28 hours ago songheng
79177df3ddc2 b1c89dd2c773 "/bin/auto_service.s 5 months ago Exited (137) 23 hours ago guozhenya
[root@bogon ~]# docker start 91a542541bb1
Error response from daemon: Cannot start container 91a542541bb1: Error getting container 91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1 from driver devicemapper: Error mounting ''/dev/mapper/docker-253:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1'' on ''/home/docker/images/devicemapper/mnt/91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1'': invalid argument
Error: failed to start containers: [91a542541bb1]
Error response from daemon: Cannot start container 91a542541bb1:
Error getting container 91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1 from driver devicemapper:
Error mounting ''/dev/mapper/docker-253:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1''
on ''/home/docker/images/devicemapper/mnt/91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1'':
invalid argument Error: failed to start containers: [91a542541bb1]
早期查到的原因及方案,并未解决此问题。
https://access.redhat.com/solutions/1565673
https://segmentfault.com/q/1010000003003635
https://www.lsproc.com/post/docker-faq/
https://blog.csdn.net/wangjia184/article/details/43151041
报错 mount 错误,无论是用 GUI 的磁盘管理工具,还是用如下命令行,都会报错。
[root@bogon mapper]# cd /dev/mapper/
[root@bogon mapper]# ll
total 0
crw-rw----. 1 root root 10, 236 Oct 16 20:08 control
lrwxrwxrwx. 1 root root 7 Oct 16 20:22 docker-253:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1 -> ../dm-4
lrwxrwxrwx. 1 root root 7 Oct 16 20:15 docker-253:2-13369361-pool -> ../dm-3
lrwxrwxrwx. 1 root root 7 Oct 16 20:08 VolGroup-lv_home -> ../dm-2
lrwxrwxrwx. 1 root root 7 Oct 16 20:08 VolGroup-lv_root -> ../dm-0
lrwxrwxrwx. 1 root root 7 Oct 16 20:08 VolGroup-lv_swap -> ../dm-1
[root@bogon mapper]# sudo mkdir -p /mnt/base
[root@bogon mapper]# ll
total 0
crw-rw----. 1 root root 10, 236 Oct 16 20:08 control
lrwxrwxrwx. 1 root root 7 Oct 16 20:22 docker-253:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1 -> ../dm-4
lrwxrwxrwx. 1 root root 7 Oct 16 20:15 docker-253:2-13369361-pool -> ../dm-3
lrwxrwxrwx. 1 root root 7 Oct 16 20:08 VolGroup-lv_home -> ../dm-2
lrwxrwxrwx. 1 root root 7 Oct 16 20:08 VolGroup-lv_root -> ../dm-0
lrwxrwxrwx. 1 root root 7 Oct 16 20:08 VolGroup-lv_swap -> ../dm-1
[root@bogon mapper]# mount docker-253:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1 /mnt/base
mount: wrong fs type, bad option, bad superblock on /dev/mapper/docker-253:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
[root@bogon mapper]# dmesg | tail
EXT4-fs (dm-4): bad geometry: block count 5242880 exceeds size of device (2621440 blocks)
EXT4-fs (dm-4): bad geometry: block count 5242880 exceeds size of device (2621440 blocks)
EXT4-fs (dm-4): bad geometry: block count 5242880 exceeds size of device (2621440 blocks)
device mapper 这个驱动的详细解释,很科普的一篇文章:
https://coolshell.cn/articles/17200.html
帖子留言更精彩。
http://www.cnblogs.com/GarfieldEr007/p/5424629.html
结论:DeviceMapper 这种东西问题太多了,我们应该把其加入黑名单。
尝试各种方式修复 Docker 的硬盘文件,结果还是失败了。
[root@bogon mapper]# fsck.ext4 docker-253\:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1
e2fsck 1.41.12 (17-May-2010)
The filesystem size (according to the superblock) is 5242880 blocks
The physical size of the device is 2621440 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes
[root@bogon mapper]# e2fsck docker-253\:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1
e2fsck 1.41.12 (17-May-2010)
The filesystem size (according to the superblock) is 5242880 blocks
The physical size of the device is 2621440 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes
[root@bogon mapper]# resize2fs docker-253\:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1
resize2fs 1.41.12 (17-May-2010)
resize2fs: New size smaller than minimum (4808845)
[root@bogon mapper]# resize2fs docker-253\:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1 52428800
resize2fs 1.41.12 (17-May-2010)
The containing partition (or device) is only 2621440 (4k) blocks.
You requested a new size of 52428800 blocks.
各种尝试的方案:
https://access.redhat.com/solutions/55010
最后只能格式化了:
https://unix.stackexchange.com/questions/115698/fix-ext4-fs-bad-geometry-block-count-exceeds-size-of-device
https://serverfault.com/questions/548237/cant-mount-home-after-trying-to-resize-bad-geometry-block-count-exceeds-size
https://www.linuxquestions.org/questions/linux-hardware-18/size-in-superblock-is-different-from-the-physical-size-of-the-partition-298175/
mke2fs -t ext4 docker-253\:2-13369361-91a542541bb1478834df2c40796fbbbba4a0448063d4401871c7f2b63e5246f1
另外的一些收获:
https://engineeringblog.yelp.com/2016/01/dumb-init-an-init-for-docker.html
https://bugzilla.redhat.com/show_bug.cgi?id=1121736
https://docs.docker.com/install/linux/docker-ee/rhel/#prerequisites
On Red Hat Enterprise Linux, Docker EE supports storage drivers, overlay2
and devicemapper
. In Docker EE 17.06.2-ee-5 and higher, overlay2
is the recommended storage driver. The following limitations apply:
-
OverlayFS: If
selinux
is enabled, theoverlay2
storage driver is supported on RHEL 7.4 or higher. Ifselinux
is disabled,overlay2
is supported on RHEL 7.2 or higher with kernel version 3.10.0-693 and higher. -
Device Mapper: On production systems using
devicemapper
, you must usedirect-lvm
mode, which requires one or more dedicated block devices. Fast storage such as solid-state media (SSD) is recommended. Do not start Docker until properly configured per the storage guide.
再分别聊聊 Docker storage drivers
执行 docker info:
Win10+Hyper-V
C:\Users\RenGuoQiang>docker info
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 3
Server Version: 18.06.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d64c661f1d51c48782c9cec8fda7604785f93587
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.93-linuxkit-aufs
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: linuxkit-00155df70119
ID: TPBZ:PK4T:IR52:NNN6:X4BI:2P4W:QBXD:T5ZH:4UAZ:HCPC:5QZY:HJ23
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 34
Goroutines: 55
System Time: 2018-10-17T05:48:24.8681549Z
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Ubuntu xx:
Storage Driver: aufs
centos6/7
[root@bogon mapper]# docker info
Containers: 4
Images: 41
Storage Driver: devicemapper
Pool Name: docker-253:2-13369361-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 14.24 GB
Data Space Total: 107.4 GB
Data Space Available: 93.13 GB
Metadata Space Used: 26.58 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.121 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Data loop file: /home/docker/images/devicemapper/devicemapper/data
Metadata loop file: /home/docker/images/devicemapper/devicemapper/metadata
Library Version: 1.02.117-RHEL6 (2016-12-13)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.4.161-1.el6.elrepo.x86_64
Operating System: <unknown>
CPUs: 4
Total Memory: 31.43 GiB
Name: bogon
ID: KU2E:PTFN:25CJ:234F:LTHQ:7IEB:JMT6:T4NQ:UPB7:BOCV:LKQF:6QKX
https://stackoverflow.com/questions/27800340/error-starting-docker-containers
This is known bug occuring with devicemapper
driver only.
Here is the reference of the bug: https://github.com/docker/docker/issues/4036
Best solution is to switch either to aufs
or overlayfs
drivers.
Note that this question seems to be a duplicate from this one: Docker building fails randomly with Error mounting
用 centos 就容易被坑。
5 Ways to Use Log Data to Analyze System Performance--reference
<div>
Recently we looked across some of the most common behaviors that our community of 25,000 users looked for in their logs with a particular focus on web server logs. In fact our research identified the top 15 web server tags and alerts created by our customers – you can read more about these from in our section – and you can also easily create tags or alerts based on the patterns to identify these behaviours in your systems.
This week we are focusing on performance analysis using log data. Again we looked across our community of over 25,000 users and identified 5 ways in which people use log data to analyze system performance. As always customer data was anonymized and privacy protected. Over the course of the next week we will be diving into each of these area’s in more detail and will feature customers first hand accounts of how they are using logs to help identify and resolve such issues in their systems.
Our research looked at more than 200k patterns from across our Community to identify important events in their log data. With a particular focus on performance related issues we identified the following 5 areas as trending and common across our user base.:
1. Slow Response Times:Response times are one of the most common and useful performance measures that are available from your log data. They give you an immediate understanding of how long a request is taking to be returned. For example web server logs can give you insight into how long a request takes to return a response to a client device. This can include time taken for the different components behind your web server (application servers,DBs) to process the request so it can give an immediate view as to how well your application is performing. Recording response times from the client device/broswer can give you an even more complete picture since it also captures page load time in the app/browser as well as network latency.
A good rule of thumb when measuring response times is to as outlined by Jakob Nielsen in his publication on ‘Usability Engineering’ back in 1993 that is still relevant today. In short 0.1 second is about the limit for having the user feel that the system is reacting instantaneously,1.0 second is about the limit for the user’s flow of thought to stay uninterrupted,and 10 seconds is about the limit for keeping the user’s attention focused on the dialogue.
Slow response time patterns almost always follow the pattern below:
- response_time>X
Where response_time is the field value representing the server or client’s response and ‘X’ is a threshold,which if exceeded,you want the event to be highlighted or a notification to be sent so that you and your team are aware that somebody is having a poor user experience.
2. Memory Issues and Garbage Collection: Outofmemory errors can be pretty catastrophic when they occur as they often result in the application crashing due to lack of resources. Thus you want to know about these when they occur and creating tags and generating notifications via alerts when these events occur is always recommended.
However a leading indicator of outofmemory issues can be your garbage collection behavior, thus tracking this and getting notified if heap used vs free heap space is over a particular threshold,or if garbage collection is taking a long time can be particularly useful and can often point you in the direction of memory leaks. Identifying a memory leak before an out of memory exception can be the difference between a major system outage and a simple server restart until the issue is patched.
Furthermore slow or long garbage collection can also be one of the reasons for user’s experiencing slow application behavior as during garbage collection your system can slow down or in some situations it blocks until garbage collection is complete (e.g. with ‘stop the world’ garbage collection).
Below are some examples of common patterns used to identify some of the memory related issues outlined above:
- Out of memory
- exceeds memory limit
- memory leak detected
- java.lang.OutOfMemoryError
- System.OutOfMemoryException
- memwatch:leak: Ended heapDiff
- GC AND stats
3. Deadlocks and Threading Issues
Deadlocks can occur in many shapes and sizes and can have pretty bad effects when they occur – everywhere from bringing your system to a complete halt to simply slowing it down. In short,a deadlock is a situation in which two or more competing actions are each waiting for the other to finish,and thus neither ever does. For example, we say that a set of processes or threads is deadlocked when each thread is waiting for an event that only another process in the set can cause.
Not surprisingly deadlocks feature as one of our top 5 performance related issues that our users write patterns to detect in their systems.
Most deadlock patterns simply contain the keyword ‘deadlock’,but some of the common patterns follow the following structure:
- ‘deadlock’
- ‘Deadlock found when trying to get lock’
- ‘Unexpected error while processing request: deadlock;’
4. High Resource Usage (CPU/Disk/ Network)
In many cases a slow down in system performance may not be as a result of any major software flaw,but can be a simple case of the load on your system increasing,yet not having increased resources available to deal with this. Tracking resource usage can allow you to see when you require additional capacity such that you can kick off more server instances for example.
Example patterns used when analysing resource usage:
- metric=/CPUUtilization/ AND minimum>X
- cpu>X
- disk>X
- disk is at or near capacity
- not enough space on the disk
- java.io.IOException: No space left on device
- insufficient bandwidth
5. Database Issues and Slow Queries
Knowing when a query failed can be useful as it allows you to identify situations when a request may have returned without the relevant data and thus helps you identify when users are not getting the data they need. However more subtle issues can be when a user is getting the correct results but the results are taking a long time to return and while technically the system may be fine and bug free a slow user experience may be hurting your top line.
Tracking slow queries allows you to track how your DB queries are performing. Setting acceptable thresholds for query time and reporting on anything that exceeds these thresholds can help you quickly identify when your users experience is being effected.
Example patterns:
- SqlException
- SQL Timeout
- Long query
- Slow query
- WARNING: Query took longer than X
- Query_time > X
As always let us know if you think we have left out any important issues that you like to track in your logs. To start tracking your own system performance, and include these patterns listed above to automatically create tags and alerts relevant for your system.
adb: failed to install app-debug.apk: Failure [INSTALL_FAILED_ABORTED: User rejected permissions]
一、使用 adb 的 usb 真机调试,安装错误:
adb: failed to install app-debug.apk: Failure [INSTALL_FAILED_ABORTED: User rejected permissions]
用于拒绝安装:
解决方案:
1. 手机开启开发者模式
2. 从开发者模式的设置中,关闭,安装需要用户确认的选项:
结果:
更多:
Error validating package name. Must look like: `com.company.Name`. Currently is: `xxxx`
Android 模拟器启动不了 - 问题解决方案
Gradle 简介
Amazon Textract 返回不同的结果在 WebApp Demo、AnalyzeDocumentRequest 和 StartDocumentAnalysisRequest 之间返回不同的结果
如何解决Amazon Textract 返回不同的结果在 WebApp Demo、AnalyzeDocumentRequest 和 StartDocumentAnalysisRequest 之间返回不同的结果?
这是我关于 StackOverFlow 的第一个问题,我想通过 Amazon Textract 从(扫描的)PDf 文档中提取键值对 (FORMS)。然而,我注意到的是,webapp 演示返回的一些键值对(https://us-east-2.console.aws.amazon.com/textract/home?region=us-east-2#/demo)可在代码中实现的方法中没有强>.
此外,在这两种方法之间,同步方法(AnalyzeDocumentRequest),它不接受PDF但强制将文档预先转换为图像,在turn 查找键值对 (Sync Result Example) 异步方法没有。 (Async Result Example)
这个问题与这个人的问题类似,当他谈到两种分析文档的方法之间的结果差异时:AWS Textract - GetDocumentAnalysisRequest only returns correct results for first page of document
代码实现等同于这些示例:
- 同步方法:https://docs.aws.amazon.com/textract/latest/dg/examples-extract-kvp.html
- 异步方法:https://github.com/awsdocs/amazon-textract-developer-guide/blob/master/doc_source/async-analyzing-with-sqs.md
有人遇到过同样的问题吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
Android adb安装apk问题 Failure [INSTALL_FAILED_VERIFICATION_FAILURE]
adb安装apk时遇到问题 Failure [INSTALL_FAILED_VERIFICATION_FAILURE]
前提环境
adb工具即Android Debug Bridge(安卓调试桥) tools。它就是一个命令行窗口,用于通过电脑端与模拟器或者真实设备交互。
下载后解压 http://adbshell.com/downloads/
把执行路径加入PATH
使用adb安装程序
一般情况下可以:
C:\Users\Admin> adb shell
shell@A10-70F:/data $ pm install /data/local/tmp/BS_XXX_HDV3.0.0.1252.apk
或者这样
C:\Users\Admin> adb install -r D:\BSZH-APK\BS_XXX_HDV3.0.0.1252.apk
如出现 Failure [INSTALL_FAILED_VERIFICATION_FAILURE] 这个问题可以尝试下面方法.
如果不行的话, 可以换测试包试试( 可能系统版本与安装包不兼容 )
> adb push D:\BSZH-APK\4.4\BS_XXX_HDV3.0.1.1493.apk /data/local/tmp/BS_XXX_HDV3.0.1.1493
> adb shell pm install -r /data/local/tmp/BS_XXX_HDV3.0.1.1493
今天关于Analyze a docker instance start failure的介绍到此结束,谢谢您的阅读,有关5 Ways to Use Log Data to Analyze System Performance--reference、adb: failed to install app-debug.apk: Failure [INSTALL_FAILED_ABORTED: User rejected permissions]、Amazon Textract 返回不同的结果在 WebApp Demo、AnalyzeDocumentRequest 和 StartDocumentAnalysisRequest 之间返回不同的结果、Android adb安装apk问题 Failure [INSTALL_FAILED_VERIFICATION_FAILURE]等更多相关知识的信息可以在本站进行查询。
本文标签: