Tag Archives: linux

Docker pull Command Error response from daemon: Head https://registry-1.docker.io/v2/library/

Exception information:

Error response from daemon: Head https://registry-1.docker.io/v2/library/redis/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fredis%3Apull&service=registry.docker.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

There are two main ways to solve this problem

Method 1:
Parsing IP is not available. You can use dig @ 114.114.114.114 registry-1.docker.io to find the following information

;; ANSWER SECTION:
registry-1.docker.io.   forty       IN       A       3.209.182.229
Fill in the information in answer section and etc/hosts file

Method 2:
DNS resolution error
in/etc/resolv. Conf
Add Google’s DNS domain name resolution address:
nameserver 8.8.4.4
nameserver localdomain
restart the docker command after saving:

[Solved] Doris 5 Doris_core Run make Error: bk_messages.hh:214:26 error: invalid conversion from ‘char‘ …

Doris 5 error during installation

Problem Description:

Doris in Doris 5_ Error when executing make in the core folder: BK_ messages.hh:214:26 error: invalid conversion from ‘char’ to ‘const char*’ [fpermissive]

strcat(name_, ‘\ 0’);// terminate id

Solution:

Find Doris_ BK in the core folder_ Message.hh file, comment out line 214 strcat (name, '\ 0');, add name_[ 9] = '\0';

It should be changed as follows:

211   if (strlen(id)>=10)
212      {
213       strncpy(name_,id,9);
#         strcat(name_,'\0');
214       name_[9] = '\0':
215      }
216    else
217      {

[Solved] UnicodeEncodeError: ‘ascii‘ codec can‘t encode characters in position 3-9: ordinal not in range(128)

linux django UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 36-45: ordinal not in range(128)
error:

UnicodeEncodeError: 'ascii' codec can't encode characters in position 36-45: ordinal not in range(128)

Solution:

vi ~/.bashrc
export LC_ALL=C.UTF-8
source ~/.bashrc

[Solved] Go use zoom to connect DM database and start reporting error in Linux

Golang, beego framework uses worm to connect DM database, and starts to report invalid memory address or nil point dereference under Linux

GOPATH=/home/wt207/go-space #gosetup
/home/wt207/go/bin/go build -o /tmp/___1go_build_main_go -gcflags all=-N -l /home/wt207/go-space/insight-client/main.go #gosetup
/home/wt207/GoLand-2021.1.3/plugins/go/lib/dlv/linux/dlv --listen=0.0.0.0:40223 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /tmp/___1go_build_main_go --
API server listening at: [::]:40223
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd34e4e]

goroutine 1 [running]:
gitee.com/chunanyong/dm.(*Properties).GetTrimString(0x0, 0x158d9c9, 0xc, 0x0, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/zv.go:80 +0x6e
gitee.com/chunanyong/dm.(*DmConnector).mergeConfigs(0xc000034600, 0x15b2b55, 0x28, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/n.go:767 +0x274
gitee.com/chunanyong/dm.(*DmDriver).openConnector(0xc00015ce80, 0x15b2b55, 0x28, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/p.go:79 +0x105
gitee.com/chunanyong/dm.(*DmDriver).OpenConnector(0xc00015ce80, 0x15b2b55, 0x28, 0x0, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/p.go:63 +0x6d
database/sql.Open(0x157561c, 0x2, 0x15b2b55, 0x28, 0x0, 0x0, 0x0)
        /home/wt207/go/src/database/sql/sql.go:771 +0x1cb
gitee.com/chunanyong/zorm.newDataSource(0xc00007fb00, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/dataSource.go:59 +0xdc
gitee.com/chunanyong/zorm.NewDBDao(0xc00007fb00, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/DBDao.go:70 +0x6b
main.main()
        /home/wt207/go-space/insight-client/main.go:54 +0x91

Debugger finished with the exit code 0

The database connection configuration is as follows:

func main() {
	//Custom zorm log output
	//zorm.LogCallDepth = 4 //level of logging calls
	//zorm.FuncLogError = myFuncLogError //function to record exception logs
	//FuncLogPanic = myFuncLogPanic //logging panic log, default use ZormErrorLog implementation
	//FuncPrintSQL = myFuncPrintSQL // function to print sql

	//custom log output format, reassign FuncPrintSQL function
	//SetFlags(log.LstdFlags)
	//zorm.FuncPrintSQL = zorm.

	//dbDaoConfig database configuration. Here is just a simulation, production should be reading configuration configuration file, construct DataSourceConfig
	dbDaoConfig := zorm.DataSourceConfig{
		//DSN database connection string
		DSN: "dm://GO207:[email protected]:5236",
		//DSN: ". /db/test.db",
		//database driver name: mysql,postgres,oci8,sqlserver,sqlite3,dm,kingbase,aci and DBType correspond, handle databases with multiple drivers
		DriverName: "dm",
		// Database type (dialect judgment basis): mysql,postgresql,oracle,mssql,sqlite,dm,kingbase,shentong and DriverName correspond, processing database has more than one driver
		DBType: "dm",
		//MaxOpenConns Maximum number of database connections Default 50
		MaxOpenConns: 50,
		MaxIdleConns: 50, //MaxIdleConns: 50, //MaxIdleConns: 50
		MaxIdleConns: 50,
		//ConnMaxLifetimeSecond connection lifetime seconds. Default is 600 (10 minutes) after the connection is destroyed and rebuilt. MySQL default wait_timeout 28800 seconds (8 hours)
		ConnMaxLifetimeSecond: 600,
		//will use FuncPrintSQL to record SQL.
		PrintSQL: true,
		//DefaultTxOptions default configuration of transaction isolation level, default is nil
		//DefaultTxOptions: nil,
		//TxOptions{Isolation: sql.LevelDefault},
	}

	// Create dbDao according to dbDaoConfig, a database is executed only once, the first database to be executed is defaultDao, the subsequent zorm.xxx method, the default is used is defaultDao
	var err error
	dbDao, err = zorm.NewDBDao(&dbDaoConfig)
	// Mark the test as failed
	if err ! = nil {
		fmt.Println("dm database connection failed:", err)
	} else {
		fmt.Println("dm database connection successful")
	}

	beego.Run()
}

reason

The reason is to get the system default DM_ Svc.conf configuration file failed. According to the error prompt of the console, we can find the following method to get the DM of different systems_ SVC. Conf configuration file.

if filePath == "" {
    switch runtime.GOOS {
        case "windows":
	    filePath = os.Getenv("SystemRoot") + "\\system32\\dm_svc.conf"
        case "linux":
	    filePath = "/etc/dm_svc.conf"
        default:
	    return
    }
}

According to the default file path of windows system, find DM_ Open the SVC. Conf configuration file and find the following

TIME_ZONE=(480)
LANGUAGE=(cn)

Solution

Creating DM in /etc path of Linux virtual machine_ SVC. Conf configuration file, the content of which is similar to the OS. Getenv ("systemroot") + "\ \ system32 \ \ DM of windows_ SVC. Conf " DM under Path_ SVC. Conf configuration file can be consistent

An error occurred when MySQL backup with mysqldump instruction in MacOS system

Error 1064 (42000) from mysqldump command

Mysqldump – uroot – P library name & gt/ Backup path/backup file name. SQL;

Always report error:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘mysqldump -uroot -p bank>/ Users/F/bank_ back.sql’ at line 1

resolvent:

Input mysqldump command directly in the terminal, do not input mysqldump command after logging into the database.

Special thanks to the original author guanggulala.

Cannot find module ‘.. / lib / utils / unsupported. JS’ problem in installing node in centos7

When installing node in centos7 virtual machine, an error is reported: cannot find module ‘…/lib/utils/unsupported. JS’. The complete error is as follows:

the prompt is that an unsupported.js file cannot be found. Finally, it is found that the soft connection is wrong when installing this version of node in centos7, This problem may not be solved by re installation (at present, I only encounter this problem in the virtual machine of centos7). Delete the original NPM connection and re create one.

1. First, download the CD to the bin folder of the node version, where version 12.16.2 is installed

cd /opt/node-v12.16.2-linux-x64/bin

2. Delete the NPM file in the path, and enter yes when prompted

rm npm

3. Reestablish file connection

ln -s ../lib/node_modules/npm/bin/npm-cli.js ./npm

Using NPM – V command again, it is found that it is almost OK.
the whole operation is shown as follows:

ERROR bag unindexed: 2021-6-23-0103all.bag. Run rosbag reindex.

1. Problem
if you want to run a. Bag file that hasn’t been used for a long time, run the command: rosbag info XXX. Bag , and find an error, as follows:

ERROR bag unindexed: 2021-6-23-0103all.bag.  Run rosbag reindex.

If you want to play it by force: rosbag play XXX. Bag , you can’t either. The error is as follows:

 [ INFO] [1624972506.447439941]: Opening 2021-6-23-0103all.bag
[FATAL] [1624972506.448068825]: Error reading from file: wanted 4 bytes, read 0 bytes

2. Solution
according to the error prompt, enter the command:

rosbag reindex xxx.bag

Two. Bag files will be generated, as follows:

in the picture, xx.orig.bag is the first package, and xxx.bag is the package after reindex.
finally, enter the command: rosbag info XXX. Bag to output normally, as follows:

Schema validation error in conig/config.xml. See the log for detais, Schema validation can be……

The problem of config.xml when Weblogic gives an error prompt when activating changes is related to the parameter dweblogic. Configuration. Schemavidationenabled = false

terms of settlement:

You need to add this parameter to the startweblogic. Sh file

The path is: install path/xdomain/bin           Modify startweblogic. SH in the directory as shown in the figure below

Then restart

If it is clustered, each server should be configured and then started. Otherwise, the same problem may occur

YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Inval

Cause: build lamp environment, linux environment is centos6 64 bit, run the instruction “Yum remove httpd” to remove the original Apache

Complete error prompt:

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.i686 0:2.2.15-29.el6.centos will be erased
--> Processing Dependency: httpd >= 2.2.0 for package: gnome-user-share-2.28.2-3.el6.i686
--> Running transaction check
---> Package gnome-user-share.i686 0:2.28.2-3.el6 will be erased
--> Finished Dependency Resolution
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/i386/6/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

terms of settlement:

Just run the following three instructions

ed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo 

There is another solution in the original, but I solved it with the first one. If you can’t solve it with this method, you can try the second one in the original https://blog.csdn.net/weixin_ 45621658/article/details/110734514

Error handling of apt instruction e: unmet dependencies. Try ‘apt — fix broken install’ with no packages in Ubuntu 20.04

Record the error handling of * * e: unmet dependencies. Try ‘apt — fix broken install’ with no packages and errors were accounted while processing and E: sub process/usr/bin/dpkg returned an error code (1) * *
only my process and solutions are recorded here.

Process

This error was reported when using apt and apt get packages today.

$ sudo apt install git
[sudo] password for wh: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cypher-shell : Breaks: neo4j (< 3.1.4) but 2.1.5 is to be installed
 git : Depends: liberror-perl but it is not going to be installed
       Depends: git-man (> 1:2.17.1) but it is not going to be installed
       Depends: git-man (< 1:2.17.1-.) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Follow the prompts to run sudo apt -- fix broken install , and report an error. The echo is as follows:

YPreconfiguring packages ...
(Reading database ... 209743 files and directories currently installed.)
Preparing to unpack .../neo4j_1%3a3.5.14_all.deb ...
-----------------------------------------------------------------------------
It looks like you are upgrading from Neo4j 2.x. Many configuration
changes and improvements have been made in 3.0, including the location of
the databases. These changes cannot be handled automatically by this package
installation.

You will need to upgrade from Neo4j 2.x to Neo4j 3.2 and THEN to this release.
The upgrade guide for Neo4j 3.2 can be found at 
https://neo4j.com/docs/operations-manual/3.2/upgrade/
-----------------------------------------------------------------------------

dpkg: error processing archive /var/cache/apt/archives/neo4j_1%3a3.5.14_all.deb 
(--unpack):
 new neo4j package pre-installation script subprocess returned error exit status
 1
Errors were encountered while processing:
 /var/cache/apt/archives/neo4j_1%3a3.5.14_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Here I want to install neo4j_ 1%3a3.5.14_ All.deb, but I already have neo4j 2. X. I need to upgrade from neo4j 2. X to neo4j 3.2, and then to this version
the following error report also means to analyze neo4j_ 1%3a3.5.14_ Error in all.deb
(but I didn’t look at the above information carefully, so I only know that the following error report says my neo4j_ 1%3a3.5.14_ All.deb parsing error)

I’ve checked a lot of blogs here, but it doesn’t work for a long time
I followed the method in reference 1. Method 1 and method 2 are useless. I have achieved method 3
the process of trying method 3 is as follows:

$ sudo rm /var/cache/apt/archives/neo4j_1%3a3.5.14_all.deb 
$ sudo apt-get clean
$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cypher-shell : Breaks: neo4j (< 3.1.4) but 2.1.5 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

When you run sudo apt get autoremove , you will be prompted

The following packages have unmet dependencies:
 cypher-shell : Breaks: neo4j (< 3.1.4) but 2.1.5 is installed

At this time, I realized that there is a 2.1.5 version of neo4j in my system
if this step is not successful, the following instructions will not be executed successfully.

Here, I query the directory of neo4j version 2.1.5 through the where is command, and modify the corresponding directory name. It is reasonable to say that after the modification, the system cannot find neo4j2.1.5, sudo apt get autoremove should be able to execute successfully. But it didn’t.

In fact, it’s very simple here. We just need to uninstall neo4j in version 2.1.5. As follows:
perform sudo apt get remove neo4j uninstall
then follow method 3 in reference blog 1 to execute it again. The above error will not be reported in the process.

Then apt and apt get can be used normally.

reference resources

    Fix “Sub-process /usr/bin/dpkg returned an error code (1)” In Ubuntu

Win32ctypes. Pywin32. Pywintypes. Error: (2 ‘loadlibraryex’,’the system can’t find the specified file. ‘)

Win32ctypes. Pywin32. Pywintypes. Error: (2 ‘loadlibraryex’,’the system can’t find the specified file. ‘)

catalogue

Win32ctypes. Pywin32. Pywintypes. Error: (2 ‘loadlibraryex’,’the system can’t find the specified file. ‘)

Questions

Solution


Questions

Using pyinstaller to package py file as windows exe program, the following problems are encountered:

Win32ctypes. Pywin32. Pywintypes. Error: (2, ‘loadlibraryex’,’the system can’t find the specified file. ‘)

Stack overflow and CSDN, you can see all kinds of things

Some say that virtual environment must be used, but I don’t believe it;

Some people say that you must use native Python environment (not Anaconda or other integrated environment), but I don’t believe it;

Some people say that it may be caused by the too low and too high version of Python;

Some people say that maybe your version of pyinstaler is too high. Let’s have a try. I believe it;

#The following error occurred

Win32ctypes. Pywin32. Pywintypes. Error: (2, ‘loadlibraryex’,’the system can’t find the specified file. ‘)

#It is suspected that the temporary file in the original build interferes with the new build. After deleting the temporary file, it continues to build, and the same error still exists;

Solution

#Check on stack overflow and CSDN. There are all kinds of things to say. Finally, we adopted the method of reducing the version and succeeded

#   pip install pyinstaller==3.5

#   pyinstaller -F prediction.py

#The file structure after packaging is as follows:

#The prediction.exe file generated by the package is stored in the dist directory

Reference: pythoninstaller

Reference: packaging with pyinstaler failed. Error: win32ctypes. Pywin32. Pywintypes. Error: (1920, ‘loadlibraryexw’,’the system cannot access this file. ‘)

Reference: pitfalls encountered by Python pyinstall packaging tool

Reference: pyinstaller win32ctypes. Pywin32. Pywintypes. Error: (2, ‘loadlibraryexw’,’the system cannot find the file specified. ‘)

Reference: pyinnstaller win32ctypes. Pywin32. Pywintypes. Error: (1920, ‘loadlibraryexw’,’system cannot access the file ‘)

Xshell frequently disconnects, indicating socket error event: 32 error: 10053 connection failure

The SSH connection of xshell frequently prompts socket error event: 32 error: 10053

1. Cancel the check at the tunnel

2 modify/etc/SSH/sshd_ Configuration file under config

Change the value of clientaliveinterval to 60

Then restart the ssh server

At present, there is no frequent SSH disconnection problem, which should be effective