1. 程式人生 > >springcloud 的enrukaclient啟動報錯

springcloud 的enrukaclient啟動報錯

2018-03-24 14:22:14.652  INFO 7296 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.spring[email protected]138ecb8: startup date [Sat Mar 24 14:22:14 CST 2018]; root of context hierarchy
2018-03-24 14:22:15.246  INFO 7296 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-03-24 14:22:15.363  INFO 7296 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$ae4c8175] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.2.RELEASE)


2018-03-24 14:22:16.734  INFO 7296 --- [           main] com.springcloud.server.EurekaClient      : No active profile set, falling back to default profiles: default
2018-03-24 14:22:16.771  INFO 7296 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot
[email protected]
11f401e: startup date [Sat Mar 24 14:22:16 CST 2018]; parent: org.spring[email protected]138ecb8
2018-03-24 14:22:17.664  INFO 7296 --- [           main] a.ConfigurationClassBeanDefinitionReader : Skipping bean definition for [BeanMethod:name=eurekaClient,declaringClass=org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration]: a definition for bean 'eurekaClient' already exists. This top-level bean definition is considered as an override.
2018-03-24 14:22:17.971  INFO 7296 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=36ead521-829b-3457-bd51-79123615f5bd
2018-03-24 14:22:18.006  INFO 7296 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-03-24 14:22:18.146  INFO 7296 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$ae4c8175] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-03-24 14:22:19.036  INFO 7296 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8763 (http)
2018-03-24 14:22:19.052  INFO 7296 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2018-03-24 14:22:19.053  INFO 7296 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.11
2018-03-24 14:22:19.327  INFO 7296 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-03-24 14:22:19.327  INFO 7296 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2556 ms
2018-03-24 14:22:19.598  INFO 7296 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2018-03-24 14:22:19.606  INFO 7296 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-03-24 14:22:19.607  INFO 7296 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-03-24 14:22:19.607  INFO 7296 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-03-24 14:22:19.607  INFO 7296 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-03-24 14:22:19.743  WARN 7296 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.netflix.eureka.EurekaDiscoveryClientConfiguration$EurekaClientConfigurationRefresher': Unsatisfied dependency expressed through field 'autoRegistration'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'eurekaAutoServiceRegistration' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.class]: Unsatisfied dependency expressed through method 'eurekaAutoServiceRegistration' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'eurekaRegistration' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.class]: Unsatisfied dependency expressed through method 'eurekaRegistration' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.netflix.discovery.EurekaClient' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2018-03-24 14:22:19.744  INFO 7296 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2018-03-24 14:22:19.855  INFO 7296 --- [           main] utoConfigurationReportLoggingInitializer : 


Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-03-24 14:22:20.162 ERROR 7296 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


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


Description:


Parameter 0 of method eurekaRegistration in org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration required a bean of type 'com.netflix.discovery.EurekaClient' that could not be found.
- Bean method 'eurekaClient' not loaded because AnyNestedCondition 0 matched 2 did not; NestedCondition on EurekaClientAutoConfiguration.OnMissingRefreshScopeCondition.MissingScope @ConditionalOnMissingBean (types: org.springframework.cloud.autoconfigure.RefreshAutoConfiguration; SearchStrategy: all) found bean 'org.springframework.cloud.autoconfigure.RefreshAutoConfiguration'; NestedCondition on EurekaClientAutoConfiguration.OnMissingRefreshScopeCondition.MissingClass @ConditionalOnMissingClass found unwanted class 'org.springframework.cloud.context.scope.refresh.RefreshScope'


Action:


Consider revisiting the conditions above or defining a bean of type 'com.netflix.discovery.EurekaClient' in your configuration.

原因:

@EnableEurekaClient
@RestController
@SpringBootApplication
public class EurekaClient {
public static void main(String[] args) {
SpringApplication.run(EurekaClient.class, args);

    }

我的啟動類也叫EurekaClient與com.netflix.discovery.EurekaClientyou起衝突了。spring例項化bean時取得名字應該就是類名的縮寫,所以就例項化不了。而且最後一句也提示你有衝突了。Consider revisiting the conditions above or defining a bean of type 'com.netflix.discovery.EurekaClient' in your configuration.

我把啟動類改成EurekaClientApplication就好了

相關推薦

springcloudenrukaclient啟動

2018-03-24 14:22:14.652  INFO 7296 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.spring[email prote

springcloud eureka啟動

1、 Cannot execute request on any known server或者 ClientHandlerException: java.net.ConnectException: Connection refused 這個問題是由於eureka註冊中心也會嘗試將自己作為客戶

springcloud啟動LoggerFactory is not a Logback LoggerContext but Logback...

本地啟動微服務,直接報錯LoggerFactory is not a Logback LoggerContext but Logback….,  查了一番,是logback搞得鬼,開啟pom依賴樹,搜尋logback,發現在spring-boot-starter-web下有間

SpringCloud啟動---EurekaServer

java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V 這個錯誤的原因是由於SpringBoot的版本

SpringCloud Eureka引起的 啟動 無法啟動問題

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call ‘refresh’ before multicasting events via the context:

springcloud啟動Failed to initialize DiscoveryClient

org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.cl

安裝mongodb後啟動libstdc++

nbsp 下載 安裝mongodb 文件 lib64 png str rep 啟動 安裝mongo後啟動報錯如下圖 顯然說是libstdc++.so文件版本的問題,這種一般都是gcc版本太低了 接著查詢gcc的版本 strings /usr/lib/libstd

linux下weblogic11g成功安裝後,啟動Getting boot identity from user

tro ace author reason tac ica ons pst pri <2015-7-1 下午05時46分33秒 CST> <Info> <Management> <BEA-141107> <Versi

spriing boot 啟動:Cannot determine embedded database driver class for database type NONE

.class sre 5.0 sin via cor pan cep can 最近在學習使用spring boot。使用maven創建好工程,只引用需要用到的spring boot相關的jar包,除此之外沒有任何的配置。 寫了一個最簡單的例子,如下所示: 1 pa

centos7 網卡啟動

mac解決辦法:網卡mac 寫入配置文件本文出自 “磚家博客” 博客,請務必保留此出處http://wsxxsl.blog.51cto.com/9085838/1929829centos7 網卡啟動報錯

kibana 啟動

kibana 啟動報錯kibana4.1 啟動報錯{"name":"Kibana","hostname":"linux-node1.example.com","pid":3941,"level":60,"err":{"message":"unknown error","name":"Error","stack

freeradius 啟動Refusing to start with libssl version OpenSSL 1.0.1

all bss sim span family sin pop div con 改動etc/raddb下的radiusd.conf文件 找到allow_vulnerable_openssl = no,改動成allow_vulnerable_openssl = ye

關於spring boot項目啟動問題

系列 cnblogs mage 函數 img boot 1.8 沒有 mod 這次用了spring boot,項目在啟動時報錯,由於我用的是jdk 1.7 ,該項目默認的是jdk 1.8,所以要把下面這一系列配置改好才行。廢話不多說,上圖: 一看發現,項

解決window7 x64位Anaconda啟動:AttributeError: '_NamespacePath' object has no attribute 'sort'

tools 詳細 官網 rec tro pytho context object led 最近論文需要用到python做數據分析,python語法簡單,但是Windows下安裝第三方包惡心的要命,statsmodels用pip死活安裝不上,網上查了說包相互依賴windows

msyql 啟動 找不到pid 文件

mysql 數據庫啟動 pid 文件安裝完mysql 啟動mysql 數據庫 報錯 Starting MySQL.The server quit without updating PID file (/app/mysql/mysql/data/mysqld.pid).[FAILED]Starting MyS

WAS Server 啟動無法找到秘鑰解決辦法

webshpere報錯日誌:[7/18/17 18:04:24:582 CST] 0000000a ORBRas E com.ibm.ws.orbimpl.transport.WSTransport createServerSocket P=254162:O=0:CT ORBX0390E: Ca

Myeclipse啟動:An error has occurred.See the log file

entry classpath ret 出現 restore div nap cati security 出現這個問題是因為斷電前myeclipse還在運行,日誌報錯如下: !ENTRY org.eclipse.osgi 4 0 2017-07-24 08:29:48.4

php-fpm啟動:libgearman.so.8: No such file or directory in Unknown on line 0

php 報錯 php-fpm 從一臺服務器上拷貝php-fpm程序到另一臺後啟動提示錯誤:/etc/init.d/php-fpm-5.4 start Starting php-fpm [27-Jul-2017 11:31:39] NOTICE: PHP message: PHP Warning:

spring-boot:run啟動

cti filter col mave main -m 報錯 pre shared Intellij Idea中的spring boot項目,使用main方法運行可以啟動,但是使用mvn spring-boot:run啟動總是報錯 大概意思就是找不到類:org/apache

ogg啟動libnnz11.so: cannot open shared object file

version pat director ggsci 11.2.1 aries targe 64bit ews 當ogg軟件解壓,並給予正確的權限後,在啟動ogg時會遇到如下報錯: [[email protected]/* */ ogg]# ./ggsci./g