Tag Archives: Linux

[Solved] Deploying Tomcat connection in Linux Navicat reports error 2059 – authentication plugin ‘caching_sha2_Password ‘cannot be loaded: + Xi input 9 g

This problem gives me a headache because navicat15.0.26 does not support the newly added encryption method of mysql8.0, caching_sha2_Password, so we need to modify the user’s encryption method. First log in to MySQL,

mysql -uroot -p

This is my configuration information

Mysql 8.0.27
Navicat 15.0.26
tomcat 9.0.54
jdk 1.8.0.65

View encryption method:

show variables like 'default_authentication_plugin';

Log in to the database using the command-line client tool provided with MySQL database, and enter use mysql

Query the original authentication plug-in of MySQL user from the database user table

select user,host,plugin,authentication_string from user;

Replace the authentication plug-in used by the user with MySQL used in the previous version_ native_ password

ALTER USER 'root'@'localhost'IDENTIFIED WITH mysql_native_password BY'root';

Just use Navicat to connect again.

[Solved] Linux Start solr Server Error: Your open file limit is currently 1024

1. In the Linux system, when installing applications such as elastic search and Solr, the Linux system will prompt various installation failures due to various restrictions. Here are some problems encountered.

2. Various restrictions
1. View all system restrictions
ulimit – A

2. Modify the limit on the number of open files
phenomenon:

***[WARN]***Your open file limit is currently 1024. It should be set to65000 to avoid operational disruption.

Solution:

a) Switch to the root account first (note that the operation is unsuccessful if it is not switched)
b) modify the/etc/security/limits.conf file as root and add
* hard nofile 65000
* soft nofile 65000 at the end

3. Modify the opening process limit
phenomenon:

***[WARN]***Your Max Processes Limit is currently 2048.It should be set to 65000 to avoid operational disruption.

Solution:

a) Switch to the root account first (note that the operation is unsuccessful if it is not switched)
b) modify the/etc/security/limits.conf file as root and add it at the end

* hard nproc 65000
* soft nproc 65000

How to Solve Linux Kernel Compile Error

Linux Kernel Compile Error 1:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make: *** [Makefile:568: menuconfig] Error 2
Solution: Install the lexical parser flex, and the syntactic parser bison, respectively.
apt install flex
apt install bison

 

Linux Kernel Compile Error 2:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs
Report an error: include/generated/timeconst.h' failed

Solution:
sudo apt-get install bc

Python compiles and installs under Linux and reports an error: makefile: 1141: install

Execute under normal conditions:
./configure
make & amp& amp; Make install
you can install Python directly, but you report an error after updating the black layout
after checking, it is found that python3.8 is installed in Ukrainian territory, and uninstalling the components that will affect Ukrainian territory,
so you have to keep python3.8 and install your own python3.7.8
1. Install GCC and G + +
sudo apt get GCC
sudo apt get G + +

2. Recompile and install Python
     (PS: after GCC and G + + are installed, errors are still reported during compilation and installation. The solution can be omitted if GCC and G + + are updated and compiled normally:)
       sudo apt-get install build-essential
       sudo apt-get update
       sudo apt-get upgrade
       sudo apt-get dist-upgrade
       sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus
       sudo apt-get install build-essential libncursesw5-dev libgdbm-dev libc6-dev
       sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev
       sudo apt-get install libssl-dev openssl
       sudo apt-get install libffi-dev

Compile and install Python:
./configure
make & amp& amp; Make install
check whether Python installation is successful:     
Python 3.7 – V
pip3.7 – V

4. Enter pychart and find that there are no environment variables for Python 3.7, only Python 3 and python 3.8
Click:
Settings – & gt; Project:pythonproject-> Python Intepreter-> Click the settings Icon (in the upper right corner)
– & gt; add-> Select existing environment – & gt; Fill in the path:/usr/local/bin/Python 3.7 – & gt; Check make available to all projects

5. Check that Python 3.7 is displayed in the lower right corner of pychart

Linux environment installation MYSQL Error: Redirecting to /bin/systemctl start mysqld.service Failed to start mysqld.service: Unit not found.

Use service mysqld start to start MySQL in centos7 with an error:

Before mentioning this error, let’s first mention the development and current background of MySQL:

MySQL is an open source relational database management system (RDBMS), which uses the most commonly used database management language – Structured Query Language (SQL) for database management
MySQL is open source, so anyone can download it under the license of the general public license and modify it according to personalized needs
MySQL was acquired by sun on January 16, 2008. Since then, as sun was acquired by Oracle, the ownership of MySQL also fell into Oracle’s hands
next, we will mention a new database, MariaDB:

MariaDB database management system is a branch of MySQL, which is mainly maintained by the open source community. The purpose of adopting GPL license is to be fully compatible with MySQL, including API and command line, so that it can easily become a substitute for MySQL
the MariaDB database was developed by the founder of MySQL.

Here’s how to uninstall MariaDB and install MySQL:

View the list of installed MariaDB:
RPM – QA | grep MariaDB

Uninstall all installed MariaDB (according to your own MariaDB list):
RPM – E — nodeps mariadb-libs-5.5.64-1.el7.x86_ 64
rpm -e –nodeps mariadb-5.5.64-1.el7.x86_ 64
rpm -e –nodeps mariadb-server-5.5.64-1.el7.x86_ 64
rpm -e –nodeps mariadb-devel-5.5.64-1.el7.x86_ 64

check the installed MariaDB list again and ensure that all are uninstalled:
RPM – QA | grep MariaDB

download the repo source of MySQL: (version 5.6)
WGet http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

Errors may occur: – bash: WGet: if the command is not found, execute the installation WGet. If the error is not reported, do not execute:

Yum – y install WGet

install mysql-community-release-el7-5.noarch.rpm
sudo RPM – IVH mysql-community-release-el7-5.noarch.rpm

install MySQL
sudo Yum install MySQL server

wait for the installation to complete

service mysqld start

View the current MySQL status

Saved MySQL that I haven’t installed successfully for many days

NETCORE uses freespire.doc to add pictures to word on Linux. The error is: system.dllnotfoundexception: unable to load shared library ‘libgdiplus’ or one of its dependencies

According to the online practice, Ubuntu reported another error after installing libgdiplus:

System.DllNotFoundException: Unable to load shared library ‘libSkiaSharp’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_ DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory

Finally, I found a simpler solution for libgdiplus: nuget install the skiashrp.nativeassets.linux.nodependencies package

 

 

https://stackoverflow.com/questions/53693042/dllnotfoundexception-using-skiasharp-1-68-on-linux

 

Word to PDF is found to be garbled. After searching, it is found that Linux lacks Chinese fonts. Execute the following command

sudo apt-get install fonts-wqy-zenhei

After installing the Chinese font, the problem is solved

Monitoring ora XXX error message in Oracle alert file in Linux concurrent mail Perl script

Monitor ora XXX error messages in alert files.

The script code of alertlog.pl is as follows:

!/ usr/bin/perl

Name: alertlog.pl

sub countSet{

open(OUT, “>$idFile”);

Printf (out “% d”, $currcount); # write the current line number to the file

close(OUT);

}

————————–

Define Variables

————————–

$obase=”/u01/app/oracle”;

$SH_ TOP=”/home/oracle/general/sh”;

$SID=”$ARGV[0]”;

$idFile=”$SH_TOP/log/alert_${SID}.id”; # Only the start line number and end line number of the current file have been checked

If (! – f $idfile) {# if the file does not exist

Open (out, “& gt; $idfile”); # then create and open the file in writing mode

Printf (out “% s \ n”, 1); # write 1

close(OUT);

}

$alertFile=”${obase}/admin/${SID}/bdump/alert_${SID}.log”;

$errFile=”$SH _TOP/err${SID}.txt”;

$cmd=”head -1 $idFile”;

$preCount=qx/$cmd/;

chomp($preCount); # Remove line breaks at the end of string variable values

$cmd=”wc -l $alertFile | awk ‘{print $1}'”;

$currCount=qx/$cmd/;

printf (“$preCount:$currCount\n”);

–Modified tail +preCount with tail -minusCount for Linux Compliance

$minusCount=$currCount-$preCount;

$cmd=”tail -$minusCount $alertFile | grep “ORA-” | /bin/egrep -v -f $SH_TOP/errLogAlert.dat | sort -u> $errFile”;

printf (“$cmd \n”) ;

system($cmd);

Ssize=-s $errFile;

if ($size >1){

printf (“Sending Alert for $SID \n”);

$cmd=”$SH_TOP/alert_notification_db.ksh -s “Alert Log Error” -d $SID -h ‘hostname’ -f $errFile”;

printf(“$cmd \n”);

system($cmd);

}

& countSet; # Execute counterset to write $currcount to the file $idfile

——————————

In order to run the above monitoring script, we need to start with sorace_ Bdump directory under base/admin/$Oracle Sid directory, such as/u01/APP/Oracle/admin/+ ASM/bdump

In addition, we also need to create an alert in the bdump directory that points to the tracking directory_+ ASM [i]. Log symbolic link. Examples are as follows:

exaddb01:/u01/app/oracle/admin/+ASM/bdump

+ASM1 -oracle:1s -1tr

total 0

Irwxrwxrwx 1 oracle dba 57 Nov 13 2011 alert_+ ASM.1og-→

/001/app/oracle/diag/asm/+asm/+ASM1/trace/alert_+ ASM1.1og

In the above example, the symbolic link created is alert + asm.log (no ASM instance name is used), which points to alert_+ Asm1.log file

This is intentional, because by doing so, we can configure the same cron task on each database server, regardless of whether the server is in independent mode or a node in RAC

The cron task looks like this:

–Monitor Alert Logs

0,10,20,30,40,50 * * * * /home/oracle/general/sh/alertlog.p1 +ASM >/ tmp/alertlog_+ ASM.log 2>& amp; one

SH top in the above script alertlog.pl defines where to execute the script. Under the SH top directory, the line number of the last line of the alarm log is recorded in the log subdirectory

This log subdirectory should be created as part of the alarm log file monitoring configuration:

exaddb01:/home/oracle/general/sh/log

TOOLSDEV1 – oracle:cat alert_+ ASM.id

191126

If, for some reason, you want to mine from the beginning of the alarm log, you can simply add alert_+ Modify the content of asm.id file to 0

The alert notify ati on db.ksh line in the above Perl script can also be replaced by mail or mailx

In our example, each detected ora message in the alarm log file will be uploaded to an Oracle table for further analysis in the future.

Like database alarm logs, ASM alarm logs need to be cleaned and archived:

exaddb01:/home/oracle/general/sh

+ASM1 – oracle: cat rotate_ asm.ksh

export CONF=/tmp/asml.conf

cat <& lt;!!& gt;$ CONF

/u01/app/oracle/diag/asm/+asm/+ASM1/trace/alert_+ ASM1.log

weekly

copytruncate

rotate 4

compress

}

!!

1ogrotate -s $SH/1og_ rotate_ asml -f $CONF-s SSH/log_ rotate_ listener_ scanl -f $CONF

The – s option in the above command enables the logrotate utility (log management tool under Linux) to specify other status files

In order for Oracle or grid users to execute the logrotate command, you must specify the – s option. Because the default status file is/var/lib/logrotate.status

Generally speaking, only the root user has permission to write to the file- The f option forces the rotation of log files, even if the logrotate tool considers this rotation unnecessary

The last option specifies the profile for log rotation. In this configuration file, we can set the following contents:

·Location of log files to be rotated and rotation options

·Rotation frequency

·Number of files to keep

·Whether to use compression

After we execute the log rotation script for the first time, we can see that the old alarm log has been compressed, and the size of the newly generated log file is 0 bytes:

exaddb01:/u01/app/oracle/diag/asm/+asm/+ASM1/trace

+ASM1 – oracle: 1s -1 alert_+ ASM*

-rw-r—–1 oracle dba 0 Dec 11 14:55 alert +ASM1.log

-rw-r—–1 oracle dba 643647 Dec 11 14:55 alert_+ ASM1.log.1.gz

Attachment:

####################################################################################

Every 15 seconds

* * * * * sleep 15;/ home/oracle/general/sh/alertlog.p1 +ASM >/ tmp/alertlog_+ ASM.log 2>& amp; one

####################################################################################

Linux: How to configurate Environment Variables

Configure by modifying the ~ /. Bashrc file in the user directory:

vim ~/.bashrc

# add in the last line
export PATH=$PATH:/home/uusama/mysql/bin

matters needing attention:

Effective time: it takes effect when a new terminal is opened with the same user, or it takes effect manually source ~ /. Bashrc

Effective period: permanent

Effective range: only valid for the current user

If a subsequent environment variable loading file overwrites the Path definition, it may not take effect