Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample ping startup errors #3

Open
magaton opened this issue Apr 19, 2016 · 6 comments
Open

sample ping startup errors #3

magaton opened this issue Apr 19, 2016 · 6 comments

Comments

@magaton
Copy link

magaton commented Apr 19, 2016

I cannot run sample-ping app.
At first I am getting this (with original Brixton.M3 dependency):

Unable to un-register Monitor:MonitorConfig{name=bootstrap, tags=class=AsyncResolver, policy=DefaultPublishingPolicy}

javax.management.InstanceNotFoundException: com.netflix.servo:name=eurekaClient.resolver.lastLoadTimestamp,class=AsyncResolver,id=bootstrap,level=INFO,type=GAUGE

Then, after I upgrade to Brixton.RC1:

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.web.client.RestTemplate org.bk.consumer.ribbon.RibbonEurekaPongClient.restTemplate; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.web.client.RestTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.cloud.client.loadbalancer.LoadBalanced()}

Any idea?
Thanks

@pjkCochin
Copy link
Contributor

I just started the applications, and all of them seems to startup fine. Here is the order I started them in

  1. Sampe-eureka
  2. sample-config
  3. sample-pong
    4.sample-ping
    I started all of them with mvn sprint-boot:run.

I did not upgrade or make any changes to the codebase.

Hope this help!

Thanks,
Paul

@pjkCochin
Copy link
Contributor

Oops, I spoke too soon. I am getting this error now.

Paul

@pjkCochin
Copy link
Contributor

Looks like this error does not stop the application from starting up and registering to eureka. you can still send message and receive response.
This maybe related to not running sample-monitor?

Thanks,
Paul

@Louisblack
Copy link

I'm also getting this error.
Updating RestTemplateDirectPong and RibbonDirectPongClient to use RestOperations instead of RestTemplate helped. I also had to add a bean to the configuration.

``@Configuration
public class RootConfiguration {

@Bean
@Primary
public RestOperations nonLoadbalancedRestTemplate() {
    return new RestTemplate();
}

@Bean
@LoadBalanced
public RestOperations loadbalancedRestTemplate() {
    return new RestTemplate();
}

Finally, removing the @qualifier from HystrixWrappedPongClient.feignPongClient fixed it. I'll fork and create a pull request when I get home for you to check out.

@Louisblack
Copy link

Also spoke to soon... that makes it start but it can't connect to the other service - says host samplepong is not available

@webjoin
Copy link

webjoin commented Jul 25, 2016

I'm also getting this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants