Category Archives: Error

[Solved] Vermagic error and signature error in insmod

Handling of vermagic errors when insmod drives.
uname -a to see the vermagic on the environment
If the driver code is consistent, you can force to modify the UTS_RELEASE macro in include/generated/utsrelease.h to be consistent with the environment, and then compile the KO.
Signature error: signature and/or required key missing – tainting kernel
Reason: The kernel is enabled for signing, the driver is not signed.
Signature-related options in the kernel.
CONFIG_MODULE_SIG_FORMAT=y
CONFIG_MODULE_SIG=y
#CONFIG_MODULE_SIG_FORCE is not set
CONFIG_MODULE_SIG_ALL=y
#CONFIG_MODULE_SIG_SHA1 is not set
#CONFIG_MODULE_SIG_SHA224 is not set
#CONFIG_MODULE_SIG_SHA256 is not set
#CONFIG_MODULE_SIG_SHA384 is not set
CONFIG_MODULE_SIG_SHA512=y
CONFIG_MODULE_SIG_HASH=“sha512”
CONFIG_MODULE_SIG_KEY=“certs/signing_key.pem”
Signature method:
./scripts/sign-file sha512 ./certs/signing_key.pem ./certs/signing_key.x509 drivers/xxx.ko

[Solved] Tensorflow error or keras error and tf.keras error: oom video memory is insufficient

Hint: if you want to see a list of allocated tenants when oom happens, add Report_tensor_allocations_upon_oom to RunOptions for current allocation info.

Problem description

The problems encountered in today’s 50% off cross-validation and grid search are that the amount of data was too large or bitch_ It also occurs when the size is too large, as shown in the figure:
use the command: Watch – N 0.1 NVIDIA SMI in Linux to view the GPU usage

reason

Due to the lack of video memory, but it is not the real lack of video memory, but because TensorFlow has eaten up the video memory, but there is no actual effective utilization. Therefore, the required video memory can be allocated to TensorFlow. (keras based on TensorFlow is also applicable)

Solution:

1. Set small pitch_Size, although it can be used, the indicator does not cure the root cause
2. Manually set the GPU. In train.py:

(1) in tensorflow
import tensorflow as tf
import os

os.environ["CUDA_VISIBLE_DEVICES"] = "0" Specify which GPU to use
config = tf.ConfigProto()
config.gpu_options.allow_growth = True # Allocate video memory on demand
config.gpu_options.per_process_gpu_memory_fraction = 0.4 # Maximum memory usage 40%
session = tf.Session(config=config)) # Create tensorflow session
...
(2) in keras
import tensorflow as tf
from keras.models import Sequential
import os
from keras.backend.tensorflow_backend import set_session ## Different from tf.keras

os.environ["CUDA_VISIBLE_DEVICES"] = "0"
config = tf.ConfigProto()
config.gpu_options.allow_growth = True  # Allocate video memory on demand
set_session(tf.Session(config=config)) # Pass the settings to keras

model = Sequential()
...
(3) in tf.keras
import tensorflow as tf
from tensorflow.keras.models import Sequential

import os
from tensorflow_core.python.keras.backend import set_session # Different from tf.keras

os.environ["CUDA_VISIBLE_DEVICES"] = "0"
config = tf.ConfigProto()
config.gpu_options.allow_growth = True  # Allocate video memory on demand
config.gpu_options.per_process_gpu_memory_fraction = 0.4 # use 40% of the maximum video memory
set_session(tf.Session(config=config)) # Pass the settings to tf.keras

model = Sequential()
...

Supplement:
tf.keras can use data reading multithreading acceleration:

model.fit(x_train,y_train,use_multiprocessing=True, workers=4) # Enable multithreading, using 4 CPUs

Empty session:

from tensorflow import keras
keras.backend.clear_session() 

After emptying, you can continue to create a new session

How to Solve Archetype generate Error

Unable to add module to the current project as it is not of packaging type ‘pom’

I modified two places. You can have a try,
1. My original java version number was 15.0. Later, I added it completely according to version number 15 under Java – variant

<!-- java version --> 
  <profile>
      <id>jdk-15</id>
      <activation>
	    <activeByDefault>true</activeByDefault>
        <jdk>15</jdk>
      </activation>

      <properties>
        <maven.compiler.source>15</maven.compiler.source>
		<maven.compiler.target>15</maven.compiler.target>
		<maven.compiler.compilerVersion>15</maven.compiler.compilerVersion>
      </properties>
  </profile>

I suggest you complete it

2. I wrote a POM myself in the original project directory, and I deleted it
the second one I tested. The pom.xml file cannot be found in the directory where the project is to be created
then run the generate command to successfully create the project

[Solved] Docker Start Error: iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 10241

Start docker to report error content:
iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 10241 -j DNAT –to-destination 172.17.0.2:50000 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)

Solution: Restart docker

systemctl restart docker

Git pull code error fatal: authentication failed fo

Git pull code error fatal: authentication failed fo

Detailed error reporting information:

git.exe pull --progress -v --no-rebase 
"http://nj.eliansun.com:8082/tfs/DefaultCollection/
%E6%B1%9F%E8%8B%8F%E5%8C%BB%E4%B
F%9D%E9%A1%B9%E7%9B%AE/_git/01_%E6%B
1%9F%E8%8B%8F%E5%8C%BB%E4%BF%9D%E
5%9B%BD%E5%AE%B6%E6%96%B0%E5%B9%B3%E5%8F%B0" zj_demo
fatal: Authentication failed for 'http://nj.eliansun.com:8082/tfs/DefaultCollection/%E6%B1%9F%E
8%8B%8F%E5%8C%
BB%E4%BF%9D%E9%A1%B9%E7%9B%AE/_git/01_%
E6%B1%9F%E8%8B%8F%E5%8C%BB%E4%BF%9D
%E5%9B%BD%E5%AE%B6%E6%96%B0%E5%B9%B3%E5%8F%B0/'

The general description is that your voucher is wrong. If you have changed your password recently, you need to modify your local voucher as follows:

Open control panel in --- user account --- credentials management --- windows credentials --- edit --- save

If the account and password are correct (not in accordance with the above), please look below

First kind

Use the command to re-enter the account password

git config --system --unset credential.helper

Errors, i.e. permission problems, may occur, for example:

error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied

The file C:/program files/git/mingw64/etc has insufficient permissions. Change the operation permissions under this folder to all permissions. Windows 10 system can be set to everyone, and then re execute the above commands.

Second

If the above operation cannot modify the permission or the above operation is still invalid, you can use the tool [tortoisegit] for short, little turtle

The specific operations are as follows:
enter the little turtle setting page

double click git, select Edit gitconfig (y) to enter the page, and then modify the following position

Amend as follows

[credential]
	helper = store

After pulling or other operations, you will be prompted to enter the account password before operation

JanusGraph Error: Unknown external index backend [How to Solve]

Use java to connect janusgraph to create a graph. The error is the code in line 50 of the program, which is used to generate a mixed index. The screenshot is as follows:

Later, a screenshot is posted in the official document of version 0.6:

the example about definitions a mixed index containing the property keys name and age. The definition references to the indexing backend name search so that janusgraph knows which configured indexing backend it should use for this particular index The search parameter specified in the buildmixedindex call must match the second claim in the janusgraph configuration definition like this: index.search.backend if the index was named solrsearch then the configuration definition would appear like this: index.solrsearch.backend.
this means that the parameters of the buildmixedindex method should be the same as those specified The written index configuration of the configuration file is consistent with the second sub sentence. For example, my is: index. Search. Backend = elasticsearch
then the parameter of buildmixedindex should be search. After the code in line 50 is modified, no error will be reported

openwrt ipv6 nat6 ip6tables [How to Solve]

Install packages
opkg update
opkg install kmod-ipt-nat6
Run ip6tables -t nat -L
Error:  ip6tables v1.4.21: can’t initialize ip6tables table `nat’: Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.

Solutioin:
The original ipv6 nat6 requires a kernel version of 3.9.0 or higher and an iptables version of 1.4.8 or higher.
Upgrade the corresponding kernel and iptables packages to solve the problem.

[Solved] PostgreSQL Error: Could not connect to server: no such file or directory

1. Problem description

when operating PostgreSQL database service, an error message is received: 

Could not connect to server: no such file or directory

2. Solution

PostgreSQL error message “could not connect to server: no such file or directory” it is known that it is caused by the problem of postmaster

the error message indicates that PostgreSQL is not running in the system where the user logs in. When handling this common error, check “postmaster.PID” in the data directory. Ensure that the configuration of PostgreSQL allows TCP/IP connections

SAP RETAIL Automatic replenishment WRP1R transaction code error: Forecast values for determining target stock do not exist –

SAP retail auto replenishment wrp1r transaction code error – forecast values for determining target stock do not exist-

The MRP type is RF

The material has no inventory,

Execute automatic replenishment transaction code wrp1r,

Error: EWT 131 forecast values for determining target stock do not exist, as shown in the figure above.

The reason is that the forecast data is not maintained for materials. MM42 modifies the master data,

Click the forecast values button,

Maintain forecast data by week and save.

If you execute the transaction code wrp1r again, you will no longer report an error,

Successfully triggered the replenishment order!!!

How to Solve bootstrap.sh error during the construction of fabric environment

I also checked some blogs and found that it can be solved in this way. Record it here.

Cause finding

When building the fabric 1.4.4 environment, bootstrap.sh reported an error and forgot the screenshot. The error should be this course not resolve host: nexus.Hyperledger.Org
the reason is that nexus.hyperledger.org is no longer maintained
analysis bootstrap.Sh shows that it is the download of binary files, and an error is reported here, You can’t connect and download

and then further analyze the bootstrap.Shfile. You can see that this file mainly does three things: downloading fabric sample, binary script file and docker image
when downloading binary files, call the binariesinstall function, that is, the function reporting an error in the figure above

Solution:

Found the problem and how to solve it
that is, modify the bootstrap.Hfile to automatically download fabric sample and docker images, manually download binary script files, and then upload them to the specified path
step1 modify the bootstrap.H file
comment download the binary file module

and then execute ./bootstrap. Sh , there may be an error when downloading the image

I don’t know the specific reason, but just pull it manually. It’s not a big problem

Pull first and then add tags
docker pull hyperledger/fabric-peer:1.4.4
docker image tag hyperledger/fabric-peer:1.4.4 hyperledger/fabric-peer:latest

Step 2 download binary files
the download path is as follows
https://github.com/hyperledger/fabric/releases/download/v1.4.4/hyperledger-fabric-linux-amd64-1.4.4.tar.gz
https://github.com/hyperledger/fabric-ca/releases/download/v1.4.4/hyperledger-fabric-ca-linux-amd64-1.4.4.tar.gz
if you don’t surf the Internet scientifically, The download speed will be very slow. Here I also uploaded resources. You can download
upload the downloaded files to the /fabric/scripts/fabric samples/first network/ folder and unzip them

tar -xzvf hyperledger-fabric-linux-amd64-1.4.4.tar.gz
tar -xzvf hyperledger-fabric-ca-linux-amd64-1.4.4.tar.gz

In fact, there seems to be another solution. I haven’t tried. Please refer to this blog: Ubuntu 18.04 configuring hyperledger fabric 1.4.4 environment (basic)

PostgreSQL insert data error: column “XXX” does not exist solution

Background

An error is reported when the shell script runs the python write data script task:

  File "./xxx.py", line 59, in xxx
    cur.execute(insert_sql(col_string, str(data_list)))
psycopg2.ProgrammingError: column "it’s adj for sb and it's adj of sb" does not exist
LINE 1: ...1', 'student', 16, '八年级下册', 20211028, 50347, "it’s adj ...

reason

After print output, it is found that this number is written with an error:

the difference between it’s adj for sb & it's adj of sb 

It can be seen that it is actually a mixture of ' and ' (as an obsessive-compulsive disorder patient who writes in accordance with internet writing norms, I really can’t stand this mixture).

Then the related problem is found on stackoverflow: insert text with single quotes in PostgreSQL. However, in my opinion, its solution still does not meet my requirements. After all, the data written to PG cannot be forcibly converted from a single ' to ' ' because of an error. Therefore, I replaced ' with ' , found that the execution was still an error, and realized that the key problem was not here.

Then I found the reason in this blog. According to the official website of wiki.postgresql:

PostgreSQL uses only single quotes for this (i.e. WHERE name = 'John'). Double quotes are used to quote system identifiers; field names, table names, etc. (i.e. WHERE "last name" = 'Smith').
MySQL uses ` (accent mark or backtick) to quote system identifiers, which is decidedly non-standard.

Because the complete format of the data written above is:

insert into xxx (field1, field2, field3) values ('student', "The difference between it's adj for sb and it's adj of sb", 'Concept class')

It is found that only field 2 is ", while the double quotation marks " of PG represent the system identifier and cannot be written into PG at all. In fact, I guess it is because there is ' inside the string, resulting in the external quotation marks becoming ".

So I made character replacement in Python code:

str.replace("\"", "\'").replace("\'s ", "’s ")

First replace the external " with ', and then replace ' with '. However, it should be noted that 's may match ' student ', so I matched one more space and replaced 's empty with 's empty .