These are chat archives for spring-cloud/spring-cloud

26th
Dec 2015
ccit-spence
@ccit-spence
Dec 26 2015 07:33
Is Eureka supposed to set the IP of an instance based on the eureka.instance.hostname = 192.168.0.5 This is based on preferIP being set to true.
This question is coming from having a server with multiple ethernet ports. How does Eureka pick a port?
Dave Syer
@dsyer
Dec 26 2015 07:47
If you set the hostname in config that's what you get I think
Otherwise it has to guess
You mean "address" right, not "port"?
Netflix native code guesses using AWS SDK (not a guess as such)
Spring Cloud has to guess
ccit-spence
@ccit-spence
Dec 26 2015 07:59
Yes, I do mean “ip address"
So then by my example above it should be “192.168.0.5” within the status page of the Eureka dashboard?
ccit-spence
@ccit-spence
Dec 26 2015 08:05
For some reason I am getting a different IP. They are docker containers. two instances same config different host and two different results
I have never had a container not honor the hostname setting
Dave Syer
@dsyer
Dec 26 2015 08:10
The status page is computed if you don't provide an absolute URI. I guess it's possible there is s race condition.
Status page is more of a hint than a canonical address though
You should see your hostname in /eureka/apps/MYAPP
ccit-spence
@ccit-spence
Dec 26 2015 08:12
so it should not have and impact
When I look at the /eureka/apps/MYAPP
<instanceId>192.168.99.1:core-hystrix:9000</instanceId>
<hostName>192.168.0.100</hostName>
<app>MYAPP</app>
<ipAddr>192.168.99.1</ipAddr>
Dave Syer
@dsyer
Dec 26 2015 08:14
Docker networking is something of a minefield
ccit-spence
@ccit-spence
Dec 26 2015 08:15
192.168.0.100 is correct 192.168.99.1 is another ethernet port
yeah, docker can be a bit rough sometimes
Dave Syer
@dsyer
Dec 26 2015 08:16
What version of Spring Cloud are you using?
ccit-spence
@ccit-spence
Dec 26 2015 08:16
Brixton M3
Dave Syer
@dsyer
Dec 26 2015 08:16
(on the client)
ccit-spence
@ccit-spence
Dec 26 2015 08:16
all server and client
Dave Syer
@dsyer
Dec 26 2015 08:17
I don't think the server changed its contract
Probably a good idea to upgrade to Brixton.M4 anyway
But I have no idea if it will help
ccit-spence
@ccit-spence
Dec 26 2015 08:18
ok, I will give it a try.
I have not tested this with an app using ribbon. Would/Could this be an issue?
Dave Syer
@dsyer
Dec 26 2015 08:19
Ribbon is just a consumer of eureka
It won't change the way the status page gets registered
ccit-spence
@ccit-spence
Dec 26 2015 08:19
it consumes the hostname not the ip though, right?
Dave Syer
@dsyer
Dec 26 2015 08:19
Ah, I see.
I think so.
So your clients might work if they don't use the status page directly
ccit-spence
@ccit-spence
Dec 26 2015 08:20
I will do some testing. It is a new dev environment so will be able to test fairly extensively
ccit-spence
@ccit-spence
Dec 26 2015 08:27
This same setup on AWS EC2 works perfectly. Was trying a local docker setup and it is giving a bit of a fuss. WIll work on it some more and see if I can nail down the issues.
ccit-spence
@ccit-spence
Dec 26 2015 08:38
@dsyer I have spring-cloud-starter-bus-amqp and when upgrading to BrixtonM4 getting a failed dep for spring-cloud-starter-stream-rabbit: 1.0.0.M3
did something change?
Dave Syer
@dsyer
Dec 26 2015 08:42
The rabbit starter should be there I think
It's not though is it?
I think it's staged somewhere
ccit-spence
@ccit-spence
Dec 26 2015 08:44
no seems to be M2 not M3 like BrixtonM4 wants
We'll have to get that promoted or something
ccit-spence
@ccit-spence
Dec 26 2015 08:46
ok, just making sure I didn’t do something wrong
Dave Syer
@dsyer
Dec 26 2015 08:47
It's broken. We haven't announced M4 yet
But we'll need to get that fixed
ccit-spence
@ccit-spence
Dec 26 2015 08:47
makes sense since I thought I was on the latest milestone
do you want me to create an issue for it?
Dave Syer
@dsyer
Dec 26 2015 09:16
I guess in spring-cloud-stream makes sense
ccit-spence
@ccit-spence
Dec 26 2015 10:12
ok
Not sure I would consider this a cloud question but it is using spring cloud. I have a Vaadin microservice that fails unit test with the following:
javax.validation.ValidationException: Unable to find a default provider
if I include this in my POM it fixes the issue
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.3.0.Final</version>
        </dependency>
This service is Spring Boot 1.3.0.RELEASE and Brixton.M3
ccit-spence
@ccit-spence
Dec 26 2015 10:24
I’m not 100% what is needing / causing the need for the validator to be included. No database is in use. It is using hateoas and lombok and several vaadin deps
Dave Syer
@dsyer
Dec 26 2015 10:35
Validator is used in the web tier as well
It's included in the web starter for instance
Maybe Vaadin requires it (I have no idea)
(Definitely not a Cloud question)
Marcin Grzejszczak
@marcingrzejszczak
Dec 26 2015 10:42

@dsyer :

Ah. That would explain why it works in the tests.

Since we set up everything using docker-compose then all those containers are using the same network - thus that's why they can talk to each other via service discovery

sourabhhsharma
@sourabhhsharma
Dec 26 2015 12:02
Hi @ccit-spence, did you raise an issue for spring-cloud-starter-stream-rabbit: 1.0.0.M3 (Brixton.M4)?
ccit-spence
@ccit-spence
Dec 26 2015 21:26
@sourabhhsharma Yes I did, spring-cloud/spring-cloud-stream#265