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
Why would eureka server return isAws false? #942
Comments
Hi @wimnat this looks related to spring cloud Netflix. I would advise to ask questions at https://github.com/spring-cloud/spring-cloud-netflix |
Hi @wimnat, did you follow up on this and got an answer? |
@shmulika - i posted an answer on the SO post |
Hi @wimnat and @qiangdavidliu , I think something is missing in the solution and I think it might still be related to Netflix/eureka original code/compatibility. In order for Spring Netflix Eureka to return isAws true and bind to an EIP it seems to require this bean configured (as seen on several posts e.g. spring-cloud/spring-cloud-netflix#102):
This seemingly works nicely, isAws=true and the instance binds to the EIP. However, it does not take into consideration that the publicIpv4 address changes and enters a buggy state. If I understand correctly this is the result of the EurekaInstanceConfigBean and the DataCenterInfo being static. @wimnat - did you encounter this also? Thanks! |
I did not encounter this issue because I'm using an EIP. EIPs do not change. This is what the documentation states to do. Is there a particular reason you're not using an EIP? |
Sorry for not being clear enough - I AM using EIPs. But the very first time the instance comes up, the EC2 is still not bound to the EIP (it has some random IPv4 address until Eureka performs the binding to the EIP). |
Of course. A starting instance will not start with a bound EIP. Don't worry
though. The EIP will bound before Eureka starts.
…On 18 Jun. 2017 6:38 pm, "shmulika" ***@***.***> wrote:
Sorry for not being clear enough - I AM using EIPs. But the very first
time the instance comes up, the EC2 is still not bound to the EIP (it has
some random IPv4 address until Eureka performs the binding to the EIP).
However, it is the first time that counts...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#942 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHFORm-JRxK87hUF0lpfEERFzE2En9Lnks5sFOH-gaJpZM4NbD63>
.
|
Please have a look at how it behaves on the first run (after once initially binding the EIP):
This might look OK, but actually everytime this repeats the registry is completely cleared. If I manually restart the Eureka instance (where EIP is already bounded by previous run), the log looks like this:
(Please don't put any order meaning to the dates, June 14th vs 15th, I've tested it many times over these are just the copy-pastes I've made) The message from EIPBinder looks very similar, by indeed the first one reveals that the instance fails to verify that it's public ip is the same as the desired EIP; but then when trying to re-bind the EIP discovers that it is already bound... |
Hi, |
I am seeking help in running Eureka server in AWS.
My config is currently very simple...
A springboot application annotated with @EnableEurekaServer running on an EC2 instance and configured with
binding-strategy: eip
. Unfortunately EIP binding is never attempted.When I run the app I get a message in the log file on start up saying isAws: false but there is no detail as to why it thinks this. The app then continues to start successfully but without my EIP attachment as expected.
I have successfully run Eureka in AWS at a previous role I had and I didn't have to configure anything AWS specific.
There is a SO question that relates to this here http://stackoverflow.com/questions/43084285/eureka-server-cant-detect-aws but no replies. I really don't know where to go from here as the log provides no extra detail and I can query the ec2 metadata fine.
The text was updated successfully, but these errors were encountered: