Category Archives: Error

[Solved] ADB connect simulator error: ADB Server Version (36) doesn’t match this client (41); killing…

0. I use the night god emulator, other emulators also the same
adb server version (36) doesn't match this client(41); killing...
* daemon started successfully
List of devices attached

The solution is as follows.
1. Check the adb version

adb version

2. Enter the nocturnal simulator directory to view the version

nox_adb version

3. It is found that the two versions are inconsistent

You need to go to the platform Tools Directory of SDK and copy adb.exe

Rename adb.exe copied from the previous step to NOx_Adb.exe to replace NOx under nocturnal simulator_adb.exe

4. Restart the night God simulator

adb devices

[Solved] Possible reasons why NPM run build cannot package NPM err! missing script: build

Error: npm ERR! missing script: build,It was later discovered that the scripts parameter in package.json is:
“scripts”: {undefined
“dev”: “vue-cli-service serve”,
“build:prod”: “vue-cli-service build”,
“build:stage”: “vue-cli-service build –mode staging”,
“preview”: “node build/index.js –preview”,
“lint”: “eslint –ext .js,.vue src”,
“test:unit”: “jest –clearCache && vue-cli-service test:unit”,
“test:ci”: “npm run lint && npm run test:unit”,
“svgo”: “svgo -f src/icons/svg –config=src/icons/svgo.yml”
},So the right commands is:
npm run build:prod --report

[Solved] return null from a method with a primitive return type (int).

1. Error information:

org.apache.ibatis.binding.BindingException: Mapper method 'com.jack.all.mapper.TUserMapper.deleteById attempted to return null from a method with a primitive return type (int).
    at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:105) ~[mybatis-plus-core-3.2.0.jar:3.2.0]
    at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61) ~[mybatis-plus-core-3.2.0.jar:3.2.0]
    at com.sun.proxy.$Proxy57.deleteById(Unknown Source) ~[na:na]
    at com.jack.all.service.impl.TUserServiceImpl.deleteId(TUserServiceImpl.java:62) ~[classes/:na]

2. Solution: the XML needs to write the corresponding, and the previous update is still performed with select, so an error is reported

    <update id="deleteById" parameterType="string">
        update t_user set isdelete=1
        <where>
            id=#{id}
        </where>
    </update>

[Solved] Raspberry pie raspivid creates a camera video stream Error: ES_OUT_SET_(GROUP_)PCR is called too late

raspivid -o - -t 0 -w 640 -h 480 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8091}' :demux=h264

I have always used the above commands to create a raw Raspberry Pi h264 stream, and then use VLC to open “http://Raspberry Pi ip:8091” to watch the video stream, but there will be a freeze every 30 seconds, and an error ES_OUT_SET_( GROUP_)PCR is called too late.

Solution:

raspivid -o - -t 0 w 640 -h 480 -fps 25| cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8091}' :demux=h264 --h264-fps=25

Use the –h264 fps option to suggest the fps of the VLC input stream.

[Solved] echart Error: Can’t get dom width or height

When using echart to draw a word cloud diagram, the diagram cannot be loaded. When the browser opens the console F12, it is found that there is no error, but there is a warning

Can’t get dom width or height

Solution: add the following code before chart initialization

    var mainContainer = document.getElementById('main');
    //Used to make the chart adaptive to height and width, and calculate the height and width of the container through the height and width of the form
     var resizeMainContainer = function () {
         mainContainer.style.width = window.innerWidth+'px';
         mainContainer.style.height = window.innerHeight*0.8+'px';
     };
     //Set the height and width of the div container
     resizeMainContainer();
     // Initialize the chart
     var mainChart = echarts.init(mainContainer);
     $(window).on('resize',function(){//
         //The screen size is adaptive, reset the height and width of the container
        resizeMainContainer();
        mainChart.resize();
    });

org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[HTTP/1.1-8080]]

Error message:

SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[HTTP/1.1-8080]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed.

reason:

Port conflict. The message above is 8080

Solution:

Modify the listening port of Tomcat and the <Connector port=”” />

vim tomcat/conf/server.xml

Find the following properties and modify the port number inside:

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

Attached:

If you use Tomcat to run Solr cluster, this error will be reported. After modifying the above, you also need to modify the corresponding port configuration in Solr.

vim solr/solr.xml

Find the following properties and modify the port number:

<solrcloud>
   <str name="host">Keep the original hostname or IP</str>
    <int name="hostPort">Modify to the new port number above</int>
</solrcloud>

umount Error: umount.nfs4: device is busy [How to Solve]

Errors are reported as follows:

umount /data/nginx/html/pc/static
    umount.nfs4: /data/nginx/html/pc/static: device is busy

1. Through fuser, See which process is occupying the file

fuser -m -v /data/nginx/html/pc/static/test

– M indicates the file system or block device (in mount state) where the specified file is located. All processes accessing the file system are listed

– V indicates verbose mode. The process is displayed in PS mode, including PID, user, command and access fields

If the prompt: – bash: fuser: command not found, it indicates that there is no corresponding package,

Solution:

yum install psmisc -y

2. Kill the corresponding process,

kill -9 Corresponding process code

3. Cancel the mount again

umount /data/nginx/html/pc/static

[Solved] CURL Install Error: GnuTLS: The TLS connection was non-properly terminated. Unable to establish SSL connection.

curl install Error: Unable to establish SSL connection

[root@rzk curl]# wget https://curl.haxx.se/download/curl-7.54.0.tar.gz
--2021-11-25 16:47:14--  https://curl.haxx.se/download/curl-7.54.0.tar.gz
Resolving curl.haxx.se (curl.haxx.se)... 151.101.230.49, 2a04:4e42:11::561
Connecting to curl.haxx.se (curl.haxx.se)|151.101.230.49|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://curl.se/download/curl-7.54.0.tar.gz [following]
--2021-11-25 16:47:15--  https://curl.se/download/curl-7.54.0.tar.gz
Resolving curl.se (curl.se)... 151.101.194.49, 151.101.2.49, 151.101.66.49, ...
Connecting to curl.se (curl.se)|151.101.194.49|:443... connected.
GnuTLS: The TLS connection was non-properly terminated.
Unable to establish SSL connection.

Solution:

VIM enters local DNS configuration VIM/etc/resolv.conf

Add DNS for Ali

nameserver  223.5.5.5
nameserver  223.6.6.6

and then reloaded

Installation curl

Downloaded curlpack, location https://curl.haxx.se/download/

wget https://curl.haxx.se/download/curl-7.59.0.tar.gz

2007

tar -xzvf curl-7.59.0.tar.gz

Progress installation catalog

cd curl-7.59.0

compile,

./configure

make && & amp; Replacement make install

Check the version.

[ root@rzk Curl-7.54.0]# curl –version

curl 7.54.0 (x86_64-pc-linux-gnu) libcurl/7.54.0 OpenSSL/1.1.1g zlib/1.2.11

Protocols: dict file ftp ftps gopher http://imap imaps pop3 pop3s rtsp smb smtp smtps counts tftp

Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

[Solved] HDFS Error: org.apache.hadoop.security.AccessControlException: Permission denied

HDFS Error: org.apache.hadoop.security.AccessControlException: Permission denied

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

public class TestHDFS {
    public static void main(String[] args) throws Exception{
        Configuration conf = new Configuration();
        conf.set("fs.defaultFS", "hdfs://master:8020");
        FileSystem fs = FileSystem.get(conf);

        //If it exists, it will overwrite the previous directory
        boolean success = fs.mkdirs(new Path("/xiaol"));
        System.out.println(success);
    }
}

Exception in thread “main” org.apache.hadoop.security.AccessControlException: Permission denied: user=xiaol, access=WRITE, inode=”/xiaol”:root:supergroup:drwxr-xr-x

Solution

1. Modify the configuration file

In the HDFS configuration file, change dfs.permissions.enabled to false

2. Change HDFS root permission

hadoop fs -chmod 777 /

3. Add access user

Hadoop will perform permission authentication when accessing HDFS. The process of obtaining the user name is as follows:

Read Hadoop_USER_Name system environment variable. If it is not empty, take it as username. If it is empty

Read Hadoop_ SER_Name is a Java environment variable. If it is empty

Get username from the instance of com.sun.security.auth.ntuserprincipal or com.sun.security.auth.unixprincipal.

If all the above attempts fail, an exception loginexception (“can’t find user name”) will be thrown

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import java.util.Properties;

public class TestHDFS {
    public static void main(String[] args) throws Exception{
        Properties properties = System.getProperties();
        properties.setProperty("HADOOP_USER_NAME", "root");

        Configuration conf = new Configuration();
        conf.set("fs.defaultFS", "hdfs://master:8020");
        FileSystem fs = FileSystem.get(conf);

        //If it exists, it will overwrite the previous directory
        boolean success = fs.mkdirs(new Path("/xiaol"));
        System.out.println(success);
    }
}

This is actually a vulnerability. If the user uses the user name of root or other directories, he can perform any operation on the corresponding directories, so it is still very dangerous.