Tag Archives: report errors

Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: [How to Solve]

1. Cause of error: the password of the database connection is wrong, so it can be modified

I use the Nacos registry to check whether the password is correct in the configuration file application.properties

2. Reasons for error reporting  : The access port is occupied. Please refer to this document to release the port

https://blog.csdn.net/weixin_ 56859779/article/details/119204459?spm=1001.2014.3001.5502

3. Cause of error: the provider of remote call, the port of application.yml in the configuration file is wrong, and it is changed to the access port

[Solved] Unable to find “…\setuptools-40.8.0-py3.7.egg\EGG-INFO“ when adding binary and data files

Unable to find “e:\pythonenv\dataspider\lib\sit-packages\setuptools-40.8.0-py3.7.egg\EGG-INFO” when adding binary and data files.

Error resolution.
The version of setuptools is too low, upgrade the version on it, click File-settings-project:xxx-Project interpreter – click

然后install package即可

[Solved] TS Error: Could not find a declaration file for module

Some NPM packages have no problem using native JS, and some packages will report “could not find a declaration file for module” error after changing ts.

There are two ways to solve this problem

1. Download the @ type/error reporting package (some package developers may not upload their own. D.ts code to the NPM branch, then they will report an error saying that they can’t find this package, don’t worry about the next step)

2. The most direct, simple and effective solution: create a new shims-vue.d.ts file in the root directory of the project

//declare declaration declares an ambient module (i.e., a module declaration without internal implementation) 
declare module '*.vue' {
  import Vue from 'vue'
  export default Vue
}
 
 
declare module 'XX'
// xx is the name of the package that your package cannot find declared

The only thing to note is that after the first creation of the file with vscode, it should be restarted to see the effect, and then it will take effect. After the declaration is saved, the error will disappear immediately.

Local can link to the server database, upload jar package to the server will report an error

Question:

The problem encountered in the project is very strange. MySQL database is installed on CentOS, and the project is spring boot.

When the project is started locally, it is normal to connect to the server database, the local database client is normal to connect to the server database, and the server is normal to connect to the client database. When the project is deployed to the server, an exception is thrown.

A lot of misinformation..

The most important thing is:

java.sql.SQLException: Access denied for user ''@'localhost' (using password: YES)

reason:

I forgot to repack every time you run a project, idea will not help you repackage it. You need to do it yourself

Other questions can be referred to

https://www.cnblogs.com/secbro/p/12544158.html

Django PythonConsole error: Requested setting DEFAULT_INDEX_TABLESPACE

Error:
django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

Solution:
Add to the python file that reports the error:

import os,django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_name.settings") # project_name project name
django.setup()

Mybatis Error: Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.

Error reporting in mybatis learning: cause: org.apache.ibatis.builder.builderexception: error creating document instance. Cause: com.sun.org.apache.xerces.internal.impl.io.malformedbytesequenceexception: byte 1 of 1-byte UTF-8 sequence is invalid.)

Error details solution

Error details

java.lang.ExceptionInInitializerError
	at com.yy.dao.UserDaoTest.test(UserDaoTest.java:16)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error building SqlSession.
### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1 字节的 UTF-8 序列的字节 1 无效。
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80)
	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:64)
	at com.yy.utils.MybatisUtils.<clinit>(MybatisUtils.java:20)
	... 23 more
Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1 字节的 UTF-8 序列的字节 1 无效。
	at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:260)
	at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:126)
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.<init>(XMLConfigBuilder.java:81)
	at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:77)
	... 25 more
Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1 字节的 UTF-8 序列的字节 1 无效。
	at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:701)
	at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:567)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1895)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData(XMLEntityScanner.java:1375)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanComment(XMLScanner.java:801)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanComment(XMLDocumentFragmentScannerImpl.java:1034)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2982)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
	at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:258)
	... 28 more


Process finished with exit code -1

When I taught mybatis by myself, I always reported this error because I wrote comments in two. XML files for easy learning

resolvent

Just delete all the Chinese comments in. XML

Just use this to record the error report, so as to avoid wasting time to find solutions when reporting errors again in the future.

Springboot project start swagger prompt error err_ CONNECTION_ Refused solution

Project scenario:

(this is a common problem for novices!) Springboot project starts debugging in idea. When swagger is used to test the API on browser, the server stops after starting the project, and prompts localhost on browser to reject our connection request. At the same time, it prompts err_ CONNECTION_ REFUSED


Problem Description:

prompt: the problems encountered in project debugging are caused by the wrong startup and operation of your own choice:

1. Running results after starting the project in idea:

Automatically shut down the thread and shut down JPA. The key is that after I run it directly, I automatically shut down all the threads, and no error was reported. The browser was not opened. I did some debugging in the early stage, and I don’t know how to do it. I used eclipse and idea to do a lot of things before school,!!! Here is my power debugging option.

2. Browser display results
this is the end of my search for [thread – 5]. I can’t successfully start to access the browser’s address http://localhost : 8181/swagger-ui.html, the browser error is as follows:



Cause analysis:

I read this blog: https://blog.csdn.net/zj15527620802/article/details/84889346
The problem is very simple, that is, the selection of debugging options is wrong. I’m too careless to run


Solution:

To run the project, just choose the one at the end of application

after successful execution

[Solved] Job for network.service failed because the control process exited with error code. See “systemctl st

Job for network.service failed because the control process exited with error code. See “systemctl status network.service” and “journalctl -xe” for details.

1、 The xshell is down and the reconnection failed. First Ping to see if the network is connected. Second, restart the network service and find an error. Third, view the error information according to the prompt. Fourth, solutions. First, check whether the configuration file is wrong. Second, there may be a conflict with the network manager service. Just close the service directly

3. If the two methods 1 and 2 still fail, try to delete all the other irrelevant network card location files under/etc/sysconfig/network scripts to avoid unnecessary influence. 5. Verify the network

Standby for a while, found that xshell connection failed, found that network connection failed, and restart failed.

1、 The xshell is down and the reconnection failed. Ping first to see if the network is connected

[root@db01 ~]# ping www.google.com
ping: www.google.com: Unknown name or service

2、 Restart the network service and find an error

[root@db01 ~]# systemctl restart network
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

3、 Check the error information according to the prompt

[root@db01 ~]# systemctl status network.service
● network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since 四 2021-06-03 05:23:42 CST; 23s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 8821 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 systemd[1]: network.service: control process exited, code=e...s=1
6月 03 05:23:42 db01 systemd[1]: Failed to start LSB: Bring up/down networking.
6月 03 05:23:42 db01 systemd[1]: Unit network.service entered failed state.
6月 03 05:23:42 db01 systemd[1]: network.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

4、 Solutions

1. Check whether the configuration file is wrong

[root@db01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
NAME=ens33
UUID=b5672928-cbbb-4428-a752-8bd9c14098e7
····
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.10.102
PREFIX=24
GATEWAY=192.168.10.2
DNS1=114.114.114.114
DNS2=8.8.8.8
DNS3=119.29.29.29
[root@db01 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:0c:29:3f:0f:29 brd ff:ff:ff:ff:ff:ff
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:3a:15:b7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:3a:15:b7 brd ff:ff:ff:ff:ff:ff

2. There may be a conflict with the NetworkManager service. Just close the service directly

[root@db01 ~]# systemctl stop NetworkManager
[root@db01 ~]# systemctl restart network

3. If both methods 1 and 2 fail after verification, try to delete all other irrelevant network card location files under/etc/sysconfig/network scripts to avoid unnecessary influence

[root@db01 network-scripts]# ls
ifcfg-ens33      ifdown-ipv6      ifdown-tunnel  ifup-isdn    ifup-TeamPort
ifcfg-ens33.bak  ifdown-isdn      ifup           ifup-plip    ifup-tunnel
ifcfg-lo         ifdown-post      ifup-aliases   ifup-plusb   ifup-wireless
ifdown           ifdown-ppp       ifup-bnep      ifup-post    init.ipv6-global
ifdown-bnep      ifdown-routes    ifup-eth       ifup-ppp     network-functions
ifdown-eth       ifdown-sit       ifup-ib        ifup-routes  network-functions-ipv6
ifdown-ib        ifdown-Team      ifup-ippp      ifup-sit
ifdown-ippp      ifdown-TeamPort  ifup-ipv6      ifup-Team

5、 Verification Network

[root@db01 ~]# ping www.google.com
PING www.baidu.com (39.156.66.14) 56(84) bytes of data.
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=1 ttl=128 time=55.8 ms
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=2 ttl=128 time=42.8 ms
^C
--- www.baidu.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 42.825/49.312/55.800/6.491 ms
[root@db01 ~]# 

Solve the error OMP: error # 15: initializing libiomp5. Dylib

resolvent

Method 1

conda install nomkl

It can be solved after installation

Method 2

Add in code

import os

os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"

Problem analysis

The complete error is: OMP: error # 15: initializing libiomp5.dylib, but found libomp.dylib already initialized , the error is caused by repeatedly loading the DLL.

Reference article

Github I ssues:https ://github.com/dmlc/xgboost/issues/1715