Category Archives: How to Fix

ERROR 1820 (HY000): Unknown error 1820,ERROR 1046 (3D000):

After MySQL logs in, an error occurs when executing the statement:

root@localhost 09:05:  [(none)]> use mysql;
ERROR 1820 (HY000): Unknown error 1820
root@localhost 09:05:  [(none)]> show tables;
ERROR 1046 (3D000): 

terms of settlement:

root@localhost 09:06:   [(none)]> Set password = password (‘password ‘);

  I hope it will help you

/usr/sbin/zabbix_agentd: error while loading shared libraries: libcurl.so.4

Problem Description: the following error is reported when starting ZABBIX agent:

[root@vm-172-16-1-113 ~]# systemctl start zabbix-agent
Job for zabbix-agent.service failed because the control process exited with error code. See "systemctl status zabbix-agent.service" and "journalctl -xe" for details.
[root@vm-172-16-1-113 ~]# journalctl -xe
-- Subject: Unit zabbix-agent.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit zabbix-agent.service has begun starting up.
Sep 08 21:02:51 vm-172-16-1-113 zabbix_agentd[15221]: /usr/sbin/zabbix_agentd: error while loading shared libraries: libcurl.so.4:
Sep 08 21:02:51 vm-172-16-1-113 systemd[1]: zabbix-agent.service: control process exited, code=exited status=127
Sep 08 21:02:51 vm-172-16-1-113 systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit zabbix-agent.service has failed.
-- 
-- The result is failed.
Sep 08 21:02:51 vm-172-16-1-113 systemd[1]: Unit zabbix-agent.service entered failed state.
Sep 08 21:02:51 vm-172-16-1-113 systemd[1]: zabbix-agent.service failed.
Sep 08 21:02:51 vm-172-16-1-113 polkitd[3455]: Unregistered Authentication Agent for unix-process:15210:141884514 (system bus name
Sep 08 21:03:01 vm-172-16-1-113 systemd[1]: zabbix-agent.service holdoff time over, scheduling restart.
Sep 08 21:03:01 vm-172-16-1-113 systemd[1]: Stopped Zabbix Agent.
-- Subject: Unit zabbix-agent.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit zabbix-agent.service has finished shutting down.
Sep 08 21:03:01 vm-172-16-1-113 systemd[1]: Starting Zabbix Agent...
-- Subject: Unit zabbix-agent.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit zabbix-agent.service has begun starting up.
Sep 08 21:03:01 vm-172-16-1-113 zabbix_agentd[15230]: /usr/sbin/zabbix_agentd: error while loading shared libraries: libcurl.so.4:
Sep 08 21:03:01 vm-172-16-1-113 systemd[1]: zabbix-agent.service: control process exited, code=exited status=127
Sep 08 21:03:01 vm-172-16-1-113 systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit zabbix-agent.service has failed.
-- 
-- The result is failed.
Sep 08 21:03:01 vm-172-16-1-113 systemd[1]: Unit zabbix-agent.service entered failed state.
Sep 08 21:03:01 vm-172-16-1-113 systemd[1]: zabbix-agent.service failed

The keyword is /usr/SBIN/ZABBIX_ agentd: error while loading shared libraries: libcurl.so.4

Indeed, the libcurl installation is as follows. It is found that it is still not possible

[root@vm-172-16-1-113 ~]# yum -y install libcurl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.huaweicloud.com
 * updates: mirrors.tuna.tsinghua.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package libcurl.x86_64 0:7.29.0-51.el7 will be updated
--> Processing Dependency: libcurl = 7.29.0-51.el7 for package: curl-7.29.0-51.el7.x86_64
---> Package libcurl.x86_64 0:7.29.0-59.el7_9.1 will be an update
--> Processing Dependency: libssh2(x86-64) >= 1.8.0 for package: libcurl-7.29.0-59.el7_9.1.x86_64
--> Running transaction check
---> Package curl.x86_64 0:7.29.0-51.el7 will be updated
---> Package curl.x86_64 0:7.29.0-59.el7_9.1 will be an update
---> Package libssh2.x86_64 0:1.4.3-12.el7 will be updated
---> Package libssh2.x86_64 0:1.8.0-4.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================
 Package                     Arch                       Version                                 Repository                   Size
==================================================================================================================================
Updating:
 libcurl                     x86_64                     7.29.0-59.el7_9.1                       updates                     223 k
Updating for dependencies:
 curl                        x86_64                     7.29.0-59.el7_9.1                       updates                     271 k
 libssh2                     x86_64                     1.8.0-4.el7                             base                         88 k

Transaction Summary
==================================================================================================================================
Upgrade  1 Package (+2 Dependent packages)

Total download size: 582 k
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/3): libcurl-7.29.0-59.el7_9.1.x86_64.rpm                                                                | 223 kB  00:00:00     
(2/3): curl-7.29.0-59.el7_9.1.x86_64.rpm                                                                   | 271 kB  00:00:00     
(3/3): libssh2-1.8.0-4.el7.x86_64.rpm                                                                      |  88 kB  00:00:00     
----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                             3.4 MB/s | 582 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libssh2-1.8.0-4.el7.x86_64                                                                                     1/6 
  Updating   : libcurl-7.29.0-59.el7_9.1.x86_64                                                                               2/6 
  Updating   : curl-7.29.0-59.el7_9.1.x86_64                                                                                  3/6 
  Cleanup    : curl-7.29.0-51.el7.x86_64                                                                                      4/6 
  Cleanup    : libcurl-7.29.0-51.el7.x86_64                                                                                   5/6 
  Cleanup    : libssh2-1.4.3-12.el7.x86_64                                                                                    6/6 
  Verifying  : curl-7.29.0-59.el7_9.1.x86_64                                                                                  1/6 
  Verifying  : libssh2-1.8.0-4.el7.x86_64                                                                                     2/6 
  Verifying  : libcurl-7.29.0-59.el7_9.1.x86_64                                                                               3/6 
  Verifying  : libssh2-1.4.3-12.el7.x86_64                                                                                    4/6 
  Verifying  : libcurl-7.29.0-51.el7.x86_64                                                                                   5/6 
  Verifying  : curl-7.29.0-51.el7.x86_64                                                                                      6/6 

Updated:
  libcurl.x86_64 0:7.29.0-59.el7_9.1                                                                                              

Dependency Updated:
  curl.x86_64 0:7.29.0-59.el7_9.1                                   libssh2.x86_64 0:1.8.0-4.el7                                  

Complete!
[root@vm-172-16-1-113 ~]# systemctl start zabbix-agent
Job for zabbix-agent.service failed because the control process exited with error code. See "systemctl status zabbix-agent.service" and "journalctl -xe" for details.
[root@vm-172-16-1-113 ~]# journalctl -xe
-- Unit zabbix-agent.service has begun starting up.
Sep 08 21:03:52 vm-172-16-1-113 zabbix_agentd[15278]: /usr/sbin/zabbix_agentd: error while loading shared libraries: libcurl.so.4:
Sep 08 21:03:52 vm-172-16-1-113 systemd[1]: zabbix-agent.service: control process exited, code=exited status=127
Sep 08 21:03:52 vm-172-16-1-113 systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit zabbix-agent.service has failed.
-- 
-- The result is failed.
Sep 08 21:03:52 vm-172-16-1-113 systemd[1]: Unit zabbix-agent.service entered failed state.
Sep 08 21:03:52 vm-172-16-1-113 systemd[1]: zabbix-agent.service failed.
Sep 08 21:03:54 vm-172-16-1-113 yum[15277]: Updated: libssh2-1.8.0-4.el7.x86_64
Sep 08 21:03:54 vm-172-16-1-113 yum[15277]: Updated: libcurl-7.29.0-59.el7_9.1.x86_64
Sep 08 21:03:55 vm-172-16-1-113 yum[15277]: Updated: curl-7.29.0-59.el7_9.1.x86_64
Sep 08 21:03:58 vm-172-16-1-113 polkitd[3455]: Registered Authentication Agent for unix-process:15291:141892032 (system bus name :
Sep 08 21:04:02 vm-172-16-1-113 systemd[1]: zabbix-agent.service holdoff time over, scheduling restart.
Sep 08 21:04:02 vm-172-16-1-113 systemd[1]: Stopped Zabbix Agent.
-- Subject: Unit zabbix-agent.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit zabbix-agent.service has finished shutting down.
Sep 08 21:04:02 vm-172-16-1-113 systemd[1]: Starting Zabbix Agent...
-- Subject: Unit zabbix-agent.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit zabbix-agent.service has begun starting up.
Sep 08 21:04:02 vm-172-16-1-113 zabbix_agentd[15300]: /usr/sbin/zabbix_agentd: error while loading shared libraries: libcurl.so.4:
Sep 08 21:04:02 vm-172-16-1-113 systemd[1]: zabbix-agent.service: control process exited, code=exited status=127
Sep 08 21:04:02 vm-172-16-1-113 systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit zabbix-agent.service has failed.
-- 
-- The result is failed.
Sep 08 21:04:02 vm-172-16-1-113 systemd[1]: Unit zabbix-agent.service entered failed state.
Sep 08 21:04:02 vm-172-16-1-113 systemd[1]: zabbix-agent.service failed.
Sep 08 21:04:02 vm-172-16-1-113 polkitd[3455]: Unregistered Authentication Agent for unix-process:15291:141892032 (system bus name

See if libcurl. So. 4 does exist. It seems that the system does not recognize it

[root@vm-172-16-1-113 ~]# ls /usr/lib64/libcurl.so.4
/usr/lib64/libcurl.so.4

Join ld.so.conf and try ldconfig

[root@vm-172-16-1-113 ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf

[root@vm-172-16-1-113 ~]# echo '/usr/lib64' >> /etc/ld.so.conf.d/zabbix.conf
[root@vm-172-16-1-113 ~]# ldconfig

Starting ZABBIX again still doesn’t work

Take another look at SELinux

I looked around because of it

Set setenforce 0
temporarily, and then you can start it

ERROR 11668 — [ restartedMain] o.s.boot.SpringApplication : Application run failed

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-09-07 10:54:33.588 ERROR 11668 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'paymentController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'paymentServiceIml': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'paymentDao' defined in file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\com\tzm\springcloud\dao\PaymentDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:337) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
	at com.tzm.springcloud.PaymentMain8001.main(PaymentMain8001.java:9) [classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.2.2.RELEASE.jar:2.2.2.RELEASE]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'paymentServiceIml': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'paymentDao' defined in file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\com\tzm\springcloud\dao\PaymentDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:337) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:537) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:513) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:653) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:224) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:116) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:334) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	... 22 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'paymentDao' defined in file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\com\tzm\springcloud\dao\PaymentDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1526) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1406) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:454) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:543) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:513) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:653) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:224) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:116) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:334) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	... 38 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1511) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	... 52 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	... 65 common frames omitted
Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:522) ~[mybatis-spring-2.0.0.jar:2.0.0]
	at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:408) ~[mybatis-spring-2.0.0.jar:2.0.0]
	at org.mybatis.spring.SqlSessionFactoryBean.getObject(SqlSessionFactoryBean.java:541) ~[mybatis-spring-2.0.0.jar:2.0.0]
	at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.sqlSessionFactory(MybatisAutoConfiguration.java:150) ~[mybatis-spring-boot-autoconfigure-2.0.0.jar:2.0.0]
	at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$70d6e910.CGLIB$sqlSessionFactory$1(<generated>) ~[mybatis-spring-boot-autoconfigure-2.0.0.jar:2.0.0]
	at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$70d6e910$$FastClassBySpringCGLIB$$b9434f2c.invoke(<generated>) ~[mybatis-spring-boot-autoconfigure-2.0.0.jar:2.0.0]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$70d6e910.sqlSessionFactory(<generated>) ~[mybatis-spring-boot-autoconfigure-2.0.0.jar:2.0.0]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
	... 66 common frames omitted
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:\tamzm\prodect\SYSBBS\springcloud\cloud-provider-payment8001\target\classes\mapper\PaymentMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:122) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:94) ~[mybatis-3.5.0.jar:3.5.0]
	at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:520) ~[mybatis-spring-2.0.0.jar:2.0.0]
	... 79 common frames omitted
Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:118) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildResultMappingFromContext(XMLMapperBuilder.java:395) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:284) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:253) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:245) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:118) ~[mybatis-3.5.0.jar:3.5.0]
	... 81 common frames omitted
Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.  Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:120) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116) ~[mybatis-3.5.0.jar:3.5.0]
	... 86 common frames omitted
Caused by: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
	at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:200) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:89) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.io.Resources.classForName(Resources.java:261) ~[mybatis-3.5.0.jar:3.5.0]
	at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:116) ~[mybatis-3.5.0.jar:3.5.0]
	... 88 common frames omitted


Process finished with exit code 0

resolvent

Remove the JDBC type in xxxmapper.xml

 

RuntimeError: CUDA error: device-side assert triggered

reason

The reason for the error is that when calculating the loss function in pytorch, the tag is (batch, height, width). If the category is 10, the value should be 0 ~ 9, that is:
0 & lt= value<= C-1, where C is the number of channels or categories

terms of settlement

My category is 10, and the value is 1 ~ 10, so you only need to subtract 1, as shown below.

c_loss = nn.CrossEntropyLoss()
labels_v = labels_v-1 
loss0 = c_loss(d0, labels_v.long())

Summary

This is mainly because the tag data of your training data may exceed the number of tags set in the configuration file. Or the number of tags in the validation set exceeds the number of tags in the training set.

Error running ‘Tomcat 9‘: Address localhost:1099 is already in use

Error running ‘Tomcat 9’: Address localhost:1099 is already in use

Error

reason

Port 1099 is occupied, so Tomcat cannot be started

resolvent

    Win + R enter CMD to open the DOS window, use netstat – aon|findstr 1099 command to see what occupies port 1099, and use taskkill/PID 1220/F command to end the process

    Pay attention to what proportion is found. Enter the corresponding number after the PID

[Solved] Redis Error: org.springframework.data.redis.RedisConnectionFailureExceptionjava.net.SocketTimeoutException

Error Message:
ERROR 760004 — [http-nio-443-exec-463]o.s.boot.web.support.ErrorPageFilter : Forwarding to error page from request [/***/***] due to exception [java.net.SocketTimeoutException: Read timed out; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out]

org.springframework.data.redis.RedisConnectionFailureException: java.net.SocketTimeoutException: Read timed out; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
	at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:241) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.connection.jedis.JedisConnection.hGet(JedisConnection.java:2985) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.connection.DefaultStringRedisConnection.hGet(DefaultStringRedisConnection.java:364) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.core.DefaultHashOperations$1.doInRedis(DefaultHashOperations.java:52) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.core.DefaultHashOperations$1.doInRedis(DefaultHashOperations.java:49) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:207) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:169) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:91) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at org.springframework.data.redis.core.DefaultHashOperations.get(DefaultHashOperations.java:49) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	at com.easyserp.service.TokenUtilImpl.getInfoByToken(TokenUtilImpl.java:62) ~[classes/:na]
	at com.easyserp.controller.logincontroller.LogincontrollerResp.wxShare(LogincontrollerResp.java:245) ~[classes/:na]
	at sun.reflect.GeneratedMethodAccessor379.invoke(Unknown Source) ~[na:na]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_221]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_221]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) ~[servlet-api.jar:na]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) ~[servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [catalina.jar:7.0.88]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.88]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat7-websocket.jar:7.0.88]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.88]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.88]
	at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.88]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.88]
	at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110) ~[spring-boot-actuator-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.88]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.88]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.88]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.88]
	at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) ~[spring-boot-actuator-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.88]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.88]
	at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:115) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:59) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:90) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.88]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.88]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [catalina.jar:7.0.88]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) [catalina.jar:7.0.88]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498) [catalina.jar:7.0.88]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) [catalina.jar:7.0.88]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.88]
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025) [catalina.jar:7.0.88]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.88]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) [catalina.jar:7.0.88]
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1139) [tomcat-coyote.jar:7.0.88]
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) [tomcat-coyote.jar:7.0.88]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775) [tomcat-coyote.jar:7.0.88]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734) [tomcat-coyote.jar:7.0.88]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_221]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_221]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.88]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_221]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
	at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:202) ~[jedis-2.9.0.jar:na]
	at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) ~[jedis-2.9.0.jar:na]
	at redis.clients.jedis.Protocol.process(Protocol.java:151) ~[jedis-2.9.0.jar:na]
	at redis.clients.jedis.Protocol.read(Protocol.java:215) ~[jedis-2.9.0.jar:na]
	at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340) ~[jedis-2.9.0.jar:na]
	at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:259) ~[jedis-2.9.0.jar:na]
	at redis.clients.jedis.BinaryJedis.hget(BinaryJedis.java:855) ~[jedis-2.9.0.jar:na]
	at org.springframework.data.redis.connection.jedis.JedisConnection.hGet(JedisConnection.java:2983) ~[spring-data-redis-1.8.9.RELEASE.jar:na]
	... 69 common frames omitted
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_221]
	at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_221]
	at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[na:1.8.0_221]
	at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_221]
	at java.net.SocketInputStream.read(SocketInputStream.java:127) ~[na:1.8.0_221]
	at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:196) ~[jedis-2.9.0.jar:na]
	... 76 common frames omitted

Solution:
change the redis configuration parameter and path in the project

# REDIS (RedisProperties)
# Redis database index (default is 0)
spring.redis.database=0
# Redis server address
spring.redis.host=localhost
# Redis server connection port
spring.redis.port=6379
# Redis server connection password (default is empty)
spring.redis.password=
# Maximum number of connections to the connection pool (use negative values to indicate no limit)
spring.redis.pool.max-active=1000
# Maximum connection pool blocking wait time (use negative values to indicate no limit)
spring.redis.pool.max-wait=-1
# The maximum idle connections in the connection pool
spring.redis.pool.max-idle=300
# The minimum idle connections in the connection pool
spring.redis.pool.min-idle=100
# Connection timeout (milliseconds)
spring.redis.timeout=60000

Check whether the configuration bind 127.0.0.1 in redis.windows-service.conf file is the local IP address
the maximum number of connections in the redis connection pool can only alleviate the concurrency to a certain extent. In stand-alone applications, redis is a single thread. Even if the configuration is large, it can not fundamentally solve the problem. It is recommended to build a redis cluster.

VsCode+Anaconda+jupyter Error: Kernel died with exit code

The problem is solved later!!!!

Installation
vscade and Anaconda are installed on their own in Baidu. Python plug-ins are installed in vscade. The file operation of creating . Ipynb suffix is similar to the web version of Jupiter notebook
Error content:

Kernel died with exit code 1. D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode. warn( D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\traitlets\traitlets.py:2151: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '70f91ecb-d1b9-4e6f-bab4-f4eb00d14e8c' instead of 'b"70f91ecb-d1b9-4e6f-bab4-f4eb00d14e8c"'. warn( Traceback (most recent call last): File "D:\IDE\Anaconda3\envs\pytorch\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\IDE\Anaconda3\envs\pytorch\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\ipykernel_launcher.py", line 16, in <module> app.launch_new_instance() File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\traitlets\config\application.py", line 844, in launch_instance app.initialize(argv) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\traitlets\config\application.py", line 87, in inner return method(app, *args, **kwargs) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\ipykernel\kernelapp.py", line 570, in initialize self.write_connection_file() File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\ipykernel\kernelapp.py", line 230, in write_connection_file write_connection_file(cf, ip=self.ip, key=self.session.key, transport=self.transport, File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file with secure_write(fname) as f: File "D:\IDE\Anaconda3\envs\pytorch\lib\contextlib.py", line 113, in __enter__ return next(self.gen) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\jupyter_client\connect.py", line 100, in secure_write win32_restrict_file_to_user(fname) File "D:\IDE\Anaconda3\envs\pytorch\lib\site-packages\jupyter_client\connect.py", line 53, in win32_restrict_file_to_user import win32api ImportError: DLL load failed while importing win32api: 找不到指定的程序。

The solution is:

pip install pywin32==228

Error response from daemon for private harbor login

[root@k8s-master1 k8s-01]# docker login 172.18.8.214
Username: admin
Password:
Error response from daemon: Get https://172.18.8.214/v2/: dial tcp 172.18.8.214:443: connect: connection refused
[root@k8s-master1 k8s-01]#

Load the image locally and use HTTP or HTTPS. By default, the HTTPS protocol must be used. If you confirm that you do not use secure, you can use HTTP

[root@k8s-master1 k8s-01]# cat /etc/docker/daemon.json
{
	"registry-mirrors":["https://0cde955d3600f3000fe5c004160e0320.mirror.swr.myhuaweicloud.com"],
	"insecure-registries": ["172.18.8.214", "172.18.8.215"]  
}
[root@k8s-master1 k8s-01]#

Start docker validation

[root@k8s-master1 k8s-01]# systemctl restart docker
[root@k8s-master1 k8s-01]# docker login 172.18.8.214
Username: admin
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
[root@k8s-master1 k8s-01]#

Docker error response from daemon: Conflict: unable to deletexxxxx

An error is reported when docker deletes an image. After docker images, the output is as follows:

REPOSITORY                             TAG                        IMAGE ID            CREATED             SIZE
nvidia/cuda                            9.0-base                   74f5aea45cf6        6 weeks ago         134MB
paddlepaddle/paddle                    1.1.0-gpu-cuda8.0-cudnn7   b3cd25f64a2a        8 weeks ago         2.76GB
hub.baidubce.com/paddlepaddle/paddle   1.1.0-gpu-cuda8.0-cudnn7   b3cd25f64a2a        8 weeks ago         2.76GB
paddlepaddle/paddle                    1.1.0-gpu-cuda9.0-cudnn7   0df4fe3ecea3        8 weeks ago         2.89GB
hub.baidubce.com/paddlepaddle/paddle   1.1.0-gpu-cuda9.0-cudnn7   0df4fe3ecea3

The first image directly docker RMI 74f5aea45cf6 will be deleted successfully. However, the latter two images appear in pairs. The direct docker RMI deletion fails. The error message is as follows:

Error response from daemon:
conflict: unable to delete b3cd25f64a2a (must be forced) - image 
is referenced in multiple repositories

Solution:

First, specify the name instead of the image ID when docker RMI, and then execute docker RMI – f image IDJ:

docker rmi paddlepaddle/paddle:1.1.0-gpu-cuda8.0-cudnn7
docker rmi -f b3cd25f64a2a

When Jenkins deploys the project, GIT reports an error fatal: index file smaller than expected

@When Jenkins deploys the project, GIT reports an error fatal: index file smaller than expectedtoc

Recently, when learning to deploy Jenkins, microservice construction has been reporting errors:

Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://gitee.com/xxx +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: fatal: index file smaller than expected

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2450)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2051)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:573)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:994)
	... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE

The GIT problem found on the Internet is solved as follows:

View links

Because Jenkins uses git deployed on the server to pull the remote warehouse, I handle it according to the above method and re push it. It still doesn’t work.

Later, it was found that the workspace in Jenkins should be cleaned up first, and Jenkins should be pulled from the remote warehouse again. The problem was solved. As shown in the figure: