Tag Archives: Project startup error

[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] 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

Project Startup Error: Error running ‘xxxApplication‘;Command line is too long, Shoerten command line for……..

Springboot startup project error

When you start a project, you can’t start it all the time. The name of the startup class is too long. As shown in the figure below

Error running'XxxApplication';
Command line i stoo long. Shorten command line for XxxApplication or also for Spring Boot default configuration?

Modify idea configuration information

Enter the startup class configuration, click eidt configurations, and find the startup class:
in the short command line option, select the jar manifest option, because the default is the first none,

Explanation:

none :

 This is the default option and idea will not shorten the command line. If the command line exceeds the OS limit, the idea will not run your application, but the tooltip will suggest configuring a shortener.

JAR manifest:

idea passes long class paths through a temporary classpath.jar. The original class path is defined in MANIFEST.MF as the class path property in classpath.jar.

classpath file:

idea writes a long class path to a text file.

Online advice is to choose the third option, classpath file. You can choose according to your project needs

Error starting ApplicationContext. To display the auto-configuration report re-run your application

Error starting ApplicationContext. To display the auto-configuration report re-run your application with ‘debug’ enabled

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-09-08 02:07:28.798 ERROR 10540 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).


Process finished with exit code 1

When the springboot project is started, no error is reported, but it will be terminated automatically later. View POM file

       <!-- spring boot Integration mybatis -->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>1.3.0</version>
        </dependency>

        <!-- MySQL -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

The solution: in the pom.xml Remove database related dependencies (MySQL connection)- java.jar,  mybatis.xxx.jar, PageHelper, database connection pool, etc.)

There must be a default configuration file, if any. Such as database connection configuration.