Author Archives: Robins

[Solved] Kali hydra update Error: hydra: symbol lookup error

 hydra: symbol lookup error:/lib/x86_64-linux-gnu/libmongoc-1.0.so.0: undefined symbol: mongocrypt_kms_ctx_get_kms_provider

Problems found during solution:

dpkg: warning: downgrading libmongoc-1.0-0 from 1.20.0-1 to 1.17.6-1
(Reading database … 496048 files and directories currently installed.)
Preparing to unpack libmongoc-1.0-0_ 1.17.6-1_ amd64. deb …
Unpacking libmongoc-1.0-0 (1.17.6-1) over (1.20.0-1) …
Setting up libmongoc-1.0-0 (1.17.6-1) …
Processing triggers for libc-bin (2.33-1) …

come to conclusion:

libmongoc-1.0. so. 0 incompatibility due to dynamic link library version upgrade

Resolution process:

From link https://packages.debian.org/bullseye/libmongoc-1.0-0

Download the package and replace the latest package.

There may be other follow-up problems. In addition, the problem that cannot be used has been solved at present.

[Solved] 2003 – cant connect o mysql server on xxx (10060 unknown error)

2003 – cant connect o mysql server on xxx (10060 unknown error)

When using local Navicat to connect to the database in Linux, it is found that an error as shown in the following figure occurs

This error means that in Linux, our firewall does not release the port used by the database, resulting in the failure of Navicat connection.

Solution:

1. Check whether MySQL in Linux has been started

ps -ef | grep mysql

Execute the command, as shown in the figure, it has been started

2. Release MySQL port 3306

firewall-cmd --zone=public --add-port=3306/tcp --permanent

3. Restart the firewall and see if it works

firewall-cmd --reload        #restart firewall
firewall-cmd --list-ports    #check the open ports

 

[Solved] dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

Problem phenomenon

Unpacking nvidia-340 (340.107-0ubuntu0~gpu18.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-340_340.107-0ubuntu0~gpu18.04.1_amd64.deb (--unpack):
 trying to overwrite '/lib/udev/rules.d/71-nvidia.rules', which is also in package nvidia-kernel-common-396 396.45-0ubuntu0~gpu18.04.2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-340_340.107-0ubuntu0~gpu18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Solution:

Using the following instructions, it will solve the “attempt to overwrite error” with the power of powerful dpkg.

sudo dpkg -i --force-overwrite /var/cache/apt/archives/nvidia-340_340.107-0ubuntu0~gpu18.04.1_amd64.deb    
//Note that the last /var... .amd64.deb section, which is the path name of the file you reported the error to

Then run the following command to repair any damaged packages.

sudo apt -f install

[Solved] Error setting null for parameter #6 with JdbcType OTHER…

Environmental Science:

Oracle Database

Error content:

### Cause: org. apache. ibatis. type. TypeException: Error setting null for parameter #10 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.Sqlexception: invalid column type

When mybatis inserts a null value, you need to specify a jdbctype because mybatis cannot convert

Solution:

In the insert statement, add JDBC type

For example:

#{name,jdbcType=VARCHAR}

[Solved] Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-*

1. Overview

When I use PIP3 install paramiko, an error is reported

...
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-23ykqx51/pynacl/

Google has tried many methods of its predecessors for a long time, and finally found the answer.

pip3 install --upgrade pip

Then execute PIP3 install paramiko, but no error is reported, and the installation is successful.

[Solved] MySQL Error: ERROR 1273 (HY000) at line 199: Unknown collation: ‘utf8mb4_0900_ai_ci’

When a higher version of mysql, such as mysql8, the exported sql file

is imported into a lower version of mysql

If the utf8mb4 character set is used, this error will occur

ERROR 1273 (HY000) at line 199: Unknown collation: ‘utf8mb4_0900_ai_ci’

The solution is to replace the utf8mb4_0900_ai_ci with utf8mb4_general_ci in the sql file in bulk

Kafka Start Error: Corrupt index found & org.apache.kafka.common.protocol.types.SchemaException: Error reading field ‘version’: java.nio.BufferUnderflowException

Today, after starting Kafka, it was found that only one node was started successfully and the other two failed. Check the log as follows

After multi-party inspection, it turned out that the service was not normally shut down before

Solution:

According to the log prompt, we need to manually delete the two index files under each partition, restart the cluster, and Kafka will automatically rebuild the index files

find /opt/module/kafka/logs/ -name "*.timeindex" |xargs rm -f
find /opt/module/kafka/logs/ -name "*.index" |xargs rm -f

Just restart the service.

[Solved] Unable to open debugger port (127.0.0.1:53471): java.net.SocketException “Socket closed”

21:59 Error running ‘Vipsoft’: Cannot run program “/Users/jimmy/Java/apache-tomcat-9.0.14/bin/catalina.sh” (in directory “/Users/jimmy/Java/apache-tomcat-9.0.14/bin”): error=13, Permission denied
21:59 Error running ‘Vipsoft’: Unable to open debugger port (127.0.0.1:53471): java.net.SocketException “Socket closed”

Solution: Open a terminal, go to the apache-tomcat-9.0.14\bin directory, and execute chmod 777 *.sh

A large number of ESC symbols appear in the log file of logback

When using the spring boot project of ruoyi, if you find that the console log has no color, you want to add the color, and then modify the logback XML, add% highlight,% cyan,% red, etc., and then the console will have color.

The problem is that a large number of ESCs appear in the log file, as shown in the following figure:

 

Solution:

That is, the color mark is used for console printing, and the color mark is removed when printing to the file, that is, at least two sets of patterns and complete logback are configured The XML is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <property name="log.path" value="/home/ruoyi/logs" />
    <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight(%5p) %magenta(${PID}) [%16.16t] %cyan(%-40.40logger{39}): %msg%n" />
    <property name="log.file" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID} [%16.16t] %-40.40logger{39}: %msg%n" />
    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>${log.pattern}</pattern>
        </encoder>
    </appender>
    
    <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.path}/sys-info.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>60</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>${log.file}</pattern>
        </encoder>
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>INFO</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
    </appender>
    
    <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.path}/sys-error.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>60</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>${log.file}</pattern>
        </encoder>
        <filter class="ch.qos.logback.classic.filter.LevelFilter">
            <level>ERROR</level>
            <onMatch>ACCEPT</onMatch>
            <onMismatch>DENY</onMismatch>
        </filter>
    </appender>
    
    <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.path}/sys-user.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>60</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>${log.file}</pattern>
        </encoder>
    </appender>
    
    <logger name="com.ruoyi" level="info" />
    <logger name="org.springframework" level="warn" />

    <root level="info">
        <appender-ref ref="console" />
    </root>
    
    <root level="info">
        <appender-ref ref="file_info" />
        <appender-ref ref="file_error" />
    </root>
    
    <logger name="sys-user" level="info">
        <appender-ref ref="sys-user"/>
    </logger>
</configuration>

Then there’s no problem