Tag Archives: back-end

[Solved] Project Startup Error: Redis health check failed:Unable to connect to localhost6379

Error reporting details

Analysis and solution

There is no connection of Redis in my project, so it’s strange to report an error. Combined with the sentence redis health check failed , I guess maybe someone introduced Redis, and then do the health check of redis.

Solution: Configurate as below in application.yml:

# Disable Actuator Monitoring of Redis Connections
management:
  health:
    redis:
      enabled: false

[Solved] Windows PyCharm Start Error: failed to load JVM DLL pycharmjbrbinserverjvm.dll

Windows opens pycharm and reports an error: failed to load JVM DLL pycharmjbrinserverjvm.dll

JDK is downloaded and installed successfully, and environment variables are configured successfully
solution: Pycharm can be run as an administrator

Other methods are useless
1. Install Microsoft Visual C+ + 2010 redistributable package -> “there is a 2015 version in the computer
2. JDK version problem ->” verify that it is correct, and still report an error after downloading other configurations
3. Reinstall pycharm after installing JDK – “useless
4. Restart the computer -” useless

[Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS

1. ERROR MESSAGE
Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat at

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-04-01 16:13:51.487 ERROR 17944 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at com.beinuan.spring.cloud.EurekaAppBootstarp.main(EurekaAppBootstarp.java:12) [classes/:na]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:88) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:438) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	... 8 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'traceFilterRegistration' defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Unsatisfied dependency expressed through method 'traceFilterRegistration' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.servlet.Filter' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value=httpTraceFilter)}
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:787) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:528) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:202) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:253) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:227) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_144]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) ~[na:1.8.0_144]
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_144]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) ~[na:1.8.0_144]
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:459) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:107) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	... 13 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.servlet.Filter' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value=httpTraceFilter)}
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1695) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1253) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:874) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:778) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
	... 53 common frames omitted

Solution: finally, it is found that there is a conflict between the versions of sprngboot and springcloud

I’m using springboot2.2.0RELEASE and spring-cloud Greenwich.SR2 these two versions…

Using springboot2.2.0 is 119 jar packages.

Finally, use springboot 2.1.6 is 116 jar packages


Version correspondence

[Solved] Redis Client On Error Error connect ECONNREFUSED 11.20.200.6379 Config right

preface

Error when docker installs redis and starts


Solution:

Modify profile

 vim redis.conf 

Comment out??Code

Restart redis:

docker start redis

If the connection using the local client is unsuccessful, you can only enter the redis shell to modify the configuration file:

root@iZ8vb4poq26tme4bwexb4lZ:/usr/local/docker/redis# ps -ef | grep redis
redis     2605     1  1  2020 ?       2-18:12:56 /usr/bin/redis-server *:20000
root      5834 24173  0 21:18 pts/0    00:00:00 grep --color=auto redis
999      20678 20643  0 20:52 ?       00:00:04 redis-server 127.0.0.1:6379

[Solved] Project Startup Error: Redis health check failed: Unable to connect to localhost6379

Error reporting details

Analysis and solution

There is no connection of redis in my project, so it’s strange to report an error. Combined with the sentence redis health check failed, guess which thing introduced redis, and then do the health check of redis.

The solution is as follows: configurate as the following in application.yml

# Disable Actuator monitoring of Redis connections
management:
  health:
    redis:
      enabled: false

[Solved] ES Error: Elasticsearch health check failed

Original error report:

2020-11-30 18:39:08.019  WARN 17664 --- [-192.168.113.22] s.b.a.e.ElasticsearchRestHealthIndicator : Elasticsearch health check failed

java.net.ConnectException: Timeout connecting to [localhost/127.0.0.1:9200]
	at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:943) ~[elasticsearch-rest-client-6.4.3.jar:6.4.3]
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:227) ~[elasticsearch-rest-client-6.4.3.jar:6.4.3]
	at org.springframework.boot.actuate.elasticsearch.ElasticsearchRestHealthIndicator.doHealthCheck(ElasticsearchRestHealthIndicator.java:60) ~[spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:82) ~[spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.actuate.health.CompositeHealthIndicator.health(CompositeHealthIndicator.java:95) [spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.actuate.health.HealthEndpoint.health(HealthEndpoint.java:50) [spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161]
	at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282) [spring-core-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker.invoke(ReflectiveOperationInvoker.java:76) [spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation.invoke(AbstractDiscoveredOperation.java:60) [spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.actuate.endpoint.jmx.EndpointMBean.invoke(EndpointMBean.java:121) [spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.actuate.endpoint.jmx.EndpointMBean.invoke(EndpointMBean.java:96) [spring-boot-actuator-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [na:1.8.0_161]
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [na:1.8.0_161]
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) [na:1.8.0_161]
	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) [na:1.8.0_161]
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) [na:1.8.0_161]
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) [na:1.8.0_161]
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) [na:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161]
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:361) [na:1.8.0_161]
	at sun.rmi.transport.Transport$1.run(Transport.java:200) [na:1.8.0_161]
	at sun.rmi.transport.Transport$1.run(Transport.java:197) [na:1.8.0_161]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_161]
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196) [na:1.8.0_161]
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) [na:1.8.0_161]
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) [na:1.8.0_161]
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) [na:1.8.0_161]
	at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_161]
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) [na:1.8.0_161]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_161]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_161]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_161]
Caused by: java.net.ConnectException: Timeout connecting to [localhost/127.0.0.1:9200]
	at org.apache.http.nio.pool.RouteSpecificPool.timeout(RouteSpecificPool.java:169) ~[httpcore-nio-4.4.11.jar:4.4.11]
	at org.apache.http.nio.pool.AbstractNIOConnPool.requestTimeout(AbstractNIOConnPool.java:628) ~[httpcore-nio-4.4.11.jar:4.4.11]
	at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.timeout(AbstractNIOConnPool.java:894) ~[httpcore-nio-4.4.11.jar:4.4.11]
	at org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(SessionRequestImpl.java:183) ~[httpcore-nio-4.4.11.jar:4.4.11]
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:210) ~[httpcore-nio-4.4.11.jar:4.4.11]
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:155) ~[httpcore-nio-4.4.11.jar:4.4.11]
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351) ~[httpcore-nio-4.4.11.jar:4.4.11]
	at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221) ~[httpasyncclient-4.1.4.jar:4.1.4]
	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) ~[httpasyncclient-4.1.4.jar:4.1.4]
	... 1 common frames omitted

Solution: add the following configuration to solve the problem successfully

  data:
    elasticsearch:
      repositories:
        enabled: true
      cluster-nodes: 192.168.136.137:9300
      cluster-name: docker-cluster
  #      Add the following configuration to pass the health check
  elasticsearch:
    rest:
      uris: ["http://192.168.136.137:9200"]

[Solved] Error:java: Compilation failed: internal java compiler error

Error phenomenon

When using idea to import a new project or upgrade idea or create a new project, the following exception message will appear:

Error:java: Compilation failed: internal java compiler error 

Cause of error

This error is mainly caused by the JDK version. There are two reasons: the compiled version does not match, and the current project JDK version does not support.

View the JDK of the project

File -> Project Structure-> Project Settings -> Project or use the shortcut Ctrl+Alt+shift+S to open the JDK configuration of the project:

Check whether these two points are consistent with the target JDK.

View the JDK of the project

Click modules in the figure above to view the corresponding JDK version:

View java compiler version

When importing Java projects, the probability of this problem is high.

To solve this problem, reopening or modifying the contents of the POM file (Maven project) is likely to cause the JDK version to change back to 1.5. If it is a maven project, you can specify JDK related information in the POM file:

<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

[Solved] Error: Message failed: 554 5.2.0 STOREDRV.Submission.Exception:OutboundSpamException;

office 365 SMTP outlook error:

Error: Message failed: 554 5.2.0 STOREDRV.Submission.Exception:OutboundSpamException; Failed to process message due to a permanent exception with message [BeginDiagnosticData]WASCL UserAction verdict is not None. Actual verdict is RefuseQuota, ShowTierUpgrade. OutboundSpamException: WASCL UserAction verdict is not None. Actual verdict is RefuseQuota, ShowTierUpgrade.[EndDiagnosticData] [Hostname=HK0PR02MB3217.apcprd02.prod.outlook.com]
      at SMTPConnection._formatError (/Users/qilongyu/personal-code/qerFriends/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
      at SMTPConnection._actionSMTPStream (/Users/qilongyu/personal-code/qerFriends/node_modules/nodemailer/lib/smtp-connection/index.js:1674:34)
      at SMTPConnection.<anonymous> (/Users/qilongyu/personal-code/qerFriends/node_modules/nodemailer/lib/smtp-connection/index.js:1152:22)
      at SMTPConnection._processResponse (/Users/qilongyu/personal-code/qerFriends/node_modules/nodemailer/lib/smtp-connection/index.js:947:20)
      at SMTPConnection._onData (/Users/qilongyu/personal-code/qerFriends/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)
      at TLSSocket.SMTPConnection._onSocketData (/Users/qilongyu/personal-code/qerFriends/node_modules/nodemailer/lib/smtp-connection/index.js:189:44)
      at TLSSocket.emit (node:events:520:28)
      at TLSSocket.emit (node:domain:475:12)
      at addChunk (node:internal/streams/readable:315:12)
      at readableAddChunk (node:internal/streams/readable:289:9)
    How to Solve:

1. Check whether user and from is the same or not? (Solution)

2. Check whether it has been limited, just check the ms email in outlook mail.

[Solved] Docker Start Error: System.InvalidOperationException Failed to set version to docker-desktop exit code

Project scenario:

Docker 3.2.2
win10 Home Edition

Problem Description:

The docker opens error: System.InvalidOperationException: Failed to set version to docker-desktop: exit code: -1
detailed error report:

System.InvalidOperationException:
Failed to set version to docker-desktop: exit code: -1
 stdout: ?S??v?[a?{|?W
N/ec??v?dO0
stderr: 
   在 Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) 位置 C:workspacesPR-15387srcgithub.comdockerpinatawinsrcDocker.ApiServicesWSL2WslCommand.cs:Line 146
   在 Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__8.MoveNext() 位置 C:workspacesPR-15387srcgithub.comdockerpinatawinsrcDocker.DesktopEnginesWSL2WSL2Provisioning.cs:Line 82
--- The end of the stack trace in the previous location where the exception was raised ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__26.MoveNext() 位置 C:workspacesPR-15387srcgithub.comdockerpinatawinsrcDocker.DesktopEnginesWSL2LinuxWSL2Engine.cs:Line 104
--- The end of the stack trace in the previous location where the exception was raised ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() 位置 C:workspacesPR-15387srcgithub.comdockerpinatawinsrcDocker.ApiServicesStateMachinesTaskExtensions.cs:Line 29
--- The end of the stack trace in the previous location where the exception was raised ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() 位置 C:workspacesPR-15387srcgithub.comdockerpinatawinsrcDocker.ApiServicesStateMachinesStartTransition.cs:Line 67
--- The end of the stack trace in the previous location where the exception was raised ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() 位置 C:workspacesPR-15387srcgithub.comdockerpinatawinsrcDocker.ApiServicesStateMachinesStartTransition.cs:Line 92

Screenshot:

 

Solution:

Execute under cmd/shell

netsh winsock reset

Then restart docker

[Solved] hadoop Error: 9000 failed on connection exception java.net.ConnectException Denied to Access

To view the files on haddop, enter:

hadoop fs -ls /

The following occurred:

ls: Call From yx/127.0.1.1 to 0.0.0.0:9000 failed on connection exception: 
java.net.ConnectException: Denied to Access 
For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

Display 9000 port access denied
from the configuration file, you can know that Hadoop needs to access the machine through 9000 port, but now 9000 port access is denied
Input:

telnet localhost 9000

Display:

Trying 127.0.0.1…
telnet: Unable to connect to remote host: Connection refused

Input:

nmap -p 9000 localhost

Display:

Starting Nmap 7.80 ( https://nmap.org ) at 2020-04-25 14:57 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000051s latency).
PORT STATE SERVICE
9000/tcp closed cslistener
Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds

 

Use the command:

 lsof -i :9000

See which app is using the port. If the result is empty (return value 1), it is not opened
the above is just to check the status and will not change anything.

Because hadoop connects to the local port in core-site.xml
Open $HADOOP_HOME/etc/hadoop/core-site.xml

<configuration>
<property>
    <name>hadoop.tmp.dir</name>
    <value>/data/tmp/hadoop/tmp</value>
</property>
<property>
    <name>fs.defaultFS</name>
    <value>hdfs://0.0.0.0:9000</value>
</property>
</configuration>

It is found that I have not configured the port number, which is modified to:
hdfs://localhost:9000
It still not work.
I tried many methods, and finally found that the most commonly used method on the Internet is to use this method, which is really OK:

cd $HADOOP_HOME/bin
hdfs namenode -format

But I still couldn’t run it. I tried many times and all the results were the same. Later, then I found an error:

WARN common.Util: Path /data/tmp/hadoop/hdfs/name should be specified as a URI in configuration files. Please update hdfs configuration.

This is due to the non-standard path. The file describing the path is in:

$HADOOP_HOMW/etc/hadoop/hdfs-site.xml

Place in the file:

 <property>  
     <name>dfs.datanode.data.dir</name>  
     <value>/data/tmp/hadoop/hdfs/data</value>  
 </property>

Amend to read:

  <property>  
     <name>dfs.datanode.data.dir</name>  
     <value>file:///data/tmp/hadoop/hdfs/data</value>  
 </property>

The warning disappears
but this does not play a decisive role. My reason is that the security mode is turned on. Just turn off the security mode

cd $HADOOP_HOME/bin
hadoop dfsadmin -safemode leave

Users can

hadoop dfsadmin -safemode value

Operation security mode
value value:
enter: enter security mode
leave: force to leave security mode
get: return to security mode status
wait: until the end of security mode
now:

root@yx:/apps/hadoop/bin# hadoop fs -ls /
20/04/25 19:24:24 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Found 1 items
drwxr-xr-x   - root supergroup          0 2020-04-25 17:13 /test