Author Archives: Robins

[Solved] redis-server.exe Flashback Error: QForkMasterInit: system error caught. error code=0x000005af, message=Virtual

If you don’t change any configuration one day and somehow open the redis server to flash back, you can enter the redis-server directory in the command line and enter redis-server.exe redis.windows.conf command to view the error information

If an error is reported as follows

QForkMasterInit: system error caught. error code=0x000005af, message=VirtualAllocEx failed

It means that you have not set the maximum memory of redis

Open redis.windows.conf with Notepad

Add the code below to the last line.

maxmemory 268435456
maxheap 314572800

[Solved] docker Error response from daemon OCI runtime create failed container_linux.go380

docker: Error response from daemon: OCI runtime create failed: container_ linux. Go:380 error 

Docker fails to run after installing mysql5.7, and reports error: OCI runtime create failed

Pull mysql5.7 on docker is OK
execute the code and report an error

docker run -p 3306:3306 --name mysql 

-v /mydata/mysql/log:/var/log/mysql
-v /mydata/mysql/data:/var/lib/mysql
-v /mydata/mysql/conf:/etc/mysql
-e MYSQL_ ROOT_ PASSWORD=root
-d mysql:5.7

cd to /mydata/mysql/conf and finds that it is not mounted correctly, and there is no /etc/mysql file path

Reason for error: because of the compatibility between Linux and docker version, the docker version needs to be degraded or reinstalled

There are two solutions:

  1. Reinstall the specified version of docker
  2. Downgrade docker to the specified version

The first method: uninstall and reinstall:

//Step 1: Uninstall docker

//List the packages downloaded by docker
sudo yum list installed | grep docker

//remove all the above related installed packages sudo yum -y remove "above show related packages"
sudo yum -y remove docker-ce.x86_64
sudo yum -y remove docker-ce-cli.x86_64

// Remove related images and containers
sudo rm -rf /var/lib/docker

sudo yum remove docker 
              docker-client 
              docker-client-latest 
              docker-common 
              docker-latest 
              docker-latest-logrotate 
              docker-logrotate 
              docker-selinux 
              docker-engine-selinux 
              docker-engine
                 
//Test for deletion
docker -v


// Step 2: reinstall the specified version of docker

// Install some necessary system tools.
sudo yum install -y yum-utils device-mapper-persistent-data lvm2

// Add software source information: sudo yum-config -y
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

//Update the yum cache.
sudo yum makecache fast

//View the available versions of Docker-ce: sudo yum list docker-ce
yum list docker-ce --showduplicates | sort -r

// If you need to show only table versions, you can turn off the list for test versions: yum list
sudo yum-config-manager --enable docker-ce-edge
sudo yum-config-manager --enable docker-ce-test

//Update the yum package index
yum makecache fast

//Install the specified version of docker-ce: sudo yum install -y docker-ce
sudo yum install -y docker-ce-17.03.2.ce-1.el7.centos 

// Error: If the installation of the specified version of docker shows that the specified version of the docker-ce-selinux dependency package needs to be installed, please install.
yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm 

Then pull MySQL again

docker pull mysql:5.7

The second method: downgrade docker to the specified version:

//stop docker
sudo systemctl stop docker
//Enter the downgrade command
yum downgrade --setopt=obsoletes=0 -y docker-ce-17.03.2.ce-1.el7 docker-ce-selinux-17.03.2.ce-1.el7 containerd.io
//Checking the docker version
docker -v

Recreate container and start

docker run -p 3306:3306 --name mysql 

-v /mydata/mysql/log:/var/log/mysql
-v /mydata/mysql/data:/var/lib/mysql
-v /mydata/mysql/conf:/etc/mysql
-e MYSQL_ ROOT_ PASSWORD=root
-d mysql:5.7

[Solved] Uncaught DOMException: Failed to execute ‘readAsDataURL‘ on ‘FileReader‘: The object is already busy

Uncaught DOMException: Failed to execute ‘readAsDataURL’ on ‘FileReader’: The object is already busy reading Blobs.

Error reason: a FileReader is reused

Solution: Create a FileReader each time

function read_files(){
    document.querySelector(openfiles[data_jigsaw_puzzle]).click();
    $(openfiles[data_jigsaw_puzzle]).change(function(){
        var reader_index = 0;
        var len = this.files.length;
        while(reader_index < len){
            var reader=new FileReader();
            reader.readAsDataURL(this.files[reader_index]);  
            reader.onload=function(){
                answers.push(this.result);
            }                                    
            reader_index++;
        } 
    })
}
read_files();

[Solved] Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to

Cluster calico deployed by kuberadm runs incorrectly

report errors:

1, check calico

kubectl get pods -n kube-system

Calico-node 0/1 Running

2. check the log

kubectl describe calico-node-gdv9r -n kube-system

Calico error:
Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/bird/bird.ctl: connect: no such file or directory

Solution:

1. Remove the DOWN NIC/interface that Docker and Calico errors.

ip link docker0

2, delete Calico pod (pod will be rebuilt and run by k8s cluster after deletion)

kubectl delete pod calico-node-gdv9r -n kube-system

3, check Calico again and find it is normal</ font>

kubectl get pods -n kube-system

[Solved] error: (-215:Assertion failed) !_src.empty() in function ‘cv::cvtColor‘

Error Message:

error: (-215:Assertion failed) !_src.empty() in function ‘cv::cvtColor’

cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

Reason:

Path read error

Solution:

Original code

videos_src_path = "D:\pythonProject\python3.9\dataset\image\baozi_image\3.png"
frame = cv2.imread(videos_src_path)

Press the following to modify the read path

videos_src_path = "D:/pythonProject/python3.9/dataset/image/baozi_image/3.png"
#or  videos_src_path = r" D:\pythonProject\python3.9\dataset\image\baozi_image\3.png"
frame = cv2.imread(videos_src_path)

 

[Solved] Failed to instantiate java.util.List using constructor NO_CONSTRUCTOR with arguments

Failed to instantiate java.util.List using constructor NO_CONSTRUCTOR with arguments

Report errors

MappingInstantiationException: Failed to instantiate java.util.List using constructor NO_CONSTRUCTOR with arguments 

Reason

Entity classes mapped by a set in Mongo Library

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "a")
public class A {
	
	private List<B> b; // this is list
	
	@Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class B {

        private String bb;
    }
}

A data format of set

{ 
    "_id" : ObjectId("62df884326d4311d9c80de8d"), 
    "b" : {
        "bb" : "test" //this is object
    }
}

Solution:

Modify entity classes or process problem data.

 

[Solved] Instantiation of ‘sdram_model_plus‘ failed. The design unit was not found.

Problem description

When SDRAM initializes the module simulation, other modules are used. If the compilation is correct, the simulation will report an error:
Instantiation of ‘sdram_model_plus’ failed. The design unit was not found.

Solution:

Add files at the same time, and the name is the same to the tb file.

If you don’t find the file, you can add one of them. Just note that the name in the red box above is the same to the tb file.

[Solved] Xshelln Connect to Local VM linux Error: Could not connect to ‘XXX.168.122.1‘ (port 22): Connection failed

The error is shown in the following picture:

Solution:

Method 1:

Restart VMware, xsehell!

The second method:

1. Start SSH

service sshd start

2. Set SSH to start automatically

chkconfigsshd on

Note: if there is no SSH, install SSH first, and then perform the previous steps 1 and 2

yum install openssh-server

Finally, we go to xshell to test the connection

[Solved] TensorFlow severing Container Creat Error: failed: Out of range: Read less bytes than requested

0. Preface

Recently, I was doing tensorflow severing model deployment, and I took a yolov5 trained pt model for experiment. Everything was fine for the first few days, but today I encountered an error when creating the tensorflow severing container, the environment, commands, models, configuration files have not changed, and suddenly this error appeared.

1. Problem description

There was an error when creating the tensorflow searching container. The environment, commands, models, and configuration files did not change. Suddenly, this error occurred.

1. Error summary (F is easy to search):

  • E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: yolov5_saved_model version: 1} failed: Out of range: Read less bytes than requested
  • Failed to start server. Error: Unknown: 1 servable(s) did not become available: {{{name: yolov5_saved_model version: 1} due to error: Out of range: Read less bytes than requested}, }
  • 2022-07-30 11:15:09.097717: I tensorflow_serving/core/basic_manager.cc:279] Unload all remaining servables in the manager.

2. Error screenshot:

3. The complete error code is as follows:

(see Appendix)

2. Problem analysis:

The error is caused by the damage of the file. Specifically, I think of two possibilities: the interruption or error of the uploaded file, and the damage of the intact file due to disk problems.

Mine is the second kind

Reference https://github.com/tensorflow/tensorflow/issues/21544 Just found out. 👇

3. Solution:

Delete the model and configuration file and upload it again.

If there is no backup in advance, or you don’t know whether the file is damaged, you can re convert the model to generate a saved model model and create a new configuration file.

The following figure is the file structure and screenshot of the file I uploaded again.

models
|—-model1
|—- —-1
|—- —- —-assets
|—- —- —- —-variables
|—- —- —- —-variables. data-00000-of-00001
|—- —- —-variables. index
|—- —- —-saved_ model. pb
|—-model. config

reference resources

Similar problems:
https://github.com/tensorflow/tensorflow/issues/21544
https://bytemeta.vip/repo/Breta01/handwriting-ocr/issues/104

appendix

ubuntu% docker run --rm -p 8500:8500 --mount type=bind,source=/media/userdata/zhangxw/TFSever_Test2/yolo_cow/models,target=/models/models -t tensorflow/serving:latest-gpu --model_config_file=/models/models/model.config --allow_version_labels_for_unavailable_models=true &
[1] 8565
ubuntu% 2022-07-30 11:10:08.016885: I external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
2022-07-30 11:10:08.052728: I tensorflow_serving/model_servers/server_core.cc:465] Adding/updating models.
2022-07-30 11:10:08.052746: I tensorflow_serving/model_servers/server_core.cc:591]  (Re-)adding model: yolov5_saved_model
2022-07-30 11:10:08.153403: I tensorflow_serving/core/basic_manager.cc:740] Successfully reserved resources to load servable {name: yolov5_saved_model version: 1}
2022-07-30 11:10:08.153468: I tensorflow_serving/core/loader_harness.cc:66] Approving load for servable version {name: yolov5_saved_model version: 1}
2022-07-30 11:10:08.153495: I tensorflow_serving/core/loader_harness.cc:74] Loading servable version {name: yolov5_saved_model version: 1}
2022-07-30 11:10:08.153563: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:38] Reading SavedModel from: /models/models/model1/1
2022-07-30 11:10:08.221053: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:277] SavedModel load for tags { serve }; Status: fail: Out of range: Read less bytes than requested. Took 67495 microseconds.
2022-07-30 11:10:08.221079: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: yolov5_saved_model version: 1} failed: Out of range: Read less bytes than requested
2022-07-30 11:11:08.221228: I tensorflow_serving/util/retrier.cc:33] Retrying of Loading servable: {name: yolov5_saved_model version: 1} retry: 1
2022-07-30 11:11:08.221377: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:38] Reading SavedModel from: /models/models/model1/1
2022-07-30 11:11:08.281805: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:277] SavedModel load for tags { serve }; Status: fail: Out of range: Read less bytes than requested. Took 60430 microseconds.
2022-07-30 11:11:08.281849: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: yolov5_saved_model version: 1} failed: Out of range: Read less bytes than requested
2022-07-30 11:12:08.281994: I tensorflow_serving/util/retrier.cc:33] Retrying of Loading servable: {name: yolov5_saved_model version: 1} retry: 2
2022-07-30 11:12:08.282124: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:38] Reading SavedModel from: /models/models/model1/1
2022-07-30 11:12:08.316331: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:277] SavedModel load for tags { serve }; Status: fail: Out of range: Read less bytes than requested. Took 34210 microseconds.
2022-07-30 11:12:08.316359: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: yolov5_saved_model version: 1} failed: Out of range: Read less bytes than requested
2022-07-30 11:13:08.316498: I tensorflow_serving/util/retrier.cc:33] Retrying of Loading servable: {name: yolov5_saved_model version: 1} retry: 3
2022-07-30 11:13:08.316644: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:38] Reading SavedModel from: /models/models/model1/1
2022-07-30 11:13:08.348579: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:277] SavedModel load for tags { serve }; Status: fail: Out of range: Read less bytes than requested. Took 31936 microseconds.
2022-07-30 11:13:08.348606: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: yolov5_saved_model version: 1} failed: Out of range: Read less bytes than requested
2022-07-30 11:14:08.348747: I tensorflow_serving/util/retrier.cc:33] Retrying of Loading servable: {name: yolov5_saved_model version: 1} retry: 4
2022-07-30 11:14:08.348881: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:38] Reading SavedModel from: /models/models/model1/1
2022-07-30 11:14:08.381418: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:277] SavedModel load for tags { serve }; Status: fail: Out of range: Read less bytes than requested. Took 32539 microseconds.
2022-07-30 11:14:08.381447: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: yolov5_saved_model version: 1} failed: Out of range: Read less bytes than requested

ubuntu% 2022-07-30 11:15:08.381606: I tensorflow_serving/util/retrier.cc:33] Retrying of Loading servable: {name: yolov5_saved_model version: 1} retry: 5
2022-07-30 11:15:08.381749: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:38] Reading SavedModel from: /models/models/model1/1
2022-07-30 11:15:08.413642: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:277] SavedModel load for tags { serve }; Status: fail: Out of range: Read less bytes than requested. Took 31895 microseconds.
2022-07-30 11:15:08.413673: E tensorflow_serving/util/retrier.cc:37] Loading servable: {name: yolov5_saved_model version: 1} failed: Out of range: Read less bytes than requested
2022-07-30 11:15:08.413680: I tensorflow_serving/util/retrier.cc:46] Retrying of Loading servable: {name: yolov5_saved_model version: 1} exhausted max_num_retries: 5
2022-07-30 11:15:08.413698: I tensorflow_serving/core/loader_harness.cc:155] Encountered an error for servable version {name: yolov5_saved_model version: 1}: Out of range: Read less bytes than requested
2022-07-30 11:15:08.413705: E tensorflow_serving/core/aspired_versions_manager.cc:388] Servable {name: yolov5_saved_model version: 1} cannot be loaded: Out of range: Read less bytes than requested
Failed to start server. Error: Unknown: 1 servable(s) did not become available: {{{name: yolov5_saved_model version: 1} due to error: Out of range: Read less bytes than requested}, }
2022-07-30 11:15:09.097717: I tensorflow_serving/core/basic_manager.cc:279] Unload all remaining servables in the manager.

[1]  + exit 255   docker run --rm -p 8500:8500 --mount  -t tensorflow/serving:latest-gpu
ubuntu%
```![Please add a picture description](https://img-blog.csdnimg.cn/1f8990d3771e4eeea98e3eb1bddd1f24.png)

[Solved] :app:processDebugResources Android resource linking failed Android resource linking failed

Error Message:

:app:processDebugResources Android resource linking failed Android resource linking failed

Error prompt of Android Studio:

:app:processDebugResources
Android resource linking failed
Android resource linking failed

The Solution is as follows:

Just remove it as the screenshot below: