-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cannot register to eureka server with random port and AOT #4235
Comments
Hello, @vladgon, thanks for reporting the issue. The premise for native images is the "closed world assumption", which for our purposes means that the application context and bean field values should not change at runtime, which is how the random port was being handled. Do you use the random port in your production applications? |
I would assume that the application deployed in the cloud environment should be assigned a random port number on start up then register itself wi the eureka server, providing the actual port number and then Eureka should redirect the request to the one of the many registered instances.
Thanks,
--Vladimir
… On Jan 22, 2024, at 10:22 AM, Olga Maciaszek-Sharma ***@***.***> wrote:
Hello, @vladgon <https://github.com/vladgon>, thanks for reporting the issue. The premise for native images is the "closed world assumption", which for our purposes means that the application context and bean field values should not change at runtime, which is how the random port was being handled. Do you use the random port in your production applications?
—
Reply to this email directly, view it on GitHub <#4235 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA7BYM4DEZZR7UHBC3PRXFLYPZ74FAVCNFSM6AAAAABBAN5KM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUGIZTGMJZHE>.
You are receiving this because you were mentioned.
|
We'll definitely be considering various implementation solutions. Please let us know if you use the random port feature in production or just for testing. |
We use random port in production but registering manually, would like to use spring data instead. --VladimirOn Jan 22, 2024, at 11:49 AM, Olga Maciaszek-Sharma ***@***.***> wrote:
We'll definitely be considering various implementation solutions. Please let us know if you use the random port feature in production or just for testing.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
It is working fine when not compiling with AOT and the flag spring.cloud.refresh.enabled is true--VladimirOn Jan 22, 2024, at 12:01 PM, Vladimir Goncharov ***@***.***> wrote:We use random port in production but registering manually, would like to use spring data instead. --VladimirOn Jan 22, 2024, at 11:49 AM, Olga Maciaszek-Sharma ***@***.***> wrote:
We'll definitely be considering various implementation solutions. Please let us know if you use the random port feature in production or just for testing.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hello @vladgon, after discussing within the team, we've decided that given the AOT's/ native closed-world assumptions, it makes sense for us to expect the port to be known in those scenarios, so this is not something we will be handling. Therefore, if you'd like to use AOT/native,we suggest you go away from using random port with your Eureka clients in production. |
Thanks for investigating, would be helpful if team can update the documentation to make this explicitly stated, as of now it is misleading.
Thanks again for your help,
--Vladimir
… On Sep 30, 2024, at 9:58 AM, Olga Maciaszek-Sharma ***@***.***> wrote:
Hello @vladgon <https://github.com/vladgon>, after discussing within the team, we've decided that given the AOT's/ native closed-world assumptions, it makes sense for us to expect the port to be known in those scenarios, so this is not something we will be handling. Therefore, if you'd like to use AOT/native,we suggest you go away from using random port with your Eureka clients in production.
—
Reply to this email directly, view it on GitHub <#4235 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA7BYM2AJXFMA6V3ENVGB4LZZFKGRAVCNFSM6AAAAABPDL3R6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTGI3TIMBQGU>.
You are receiving this because you were mentioned.
|
Will add an update. Thanks. |
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0
According to
Application works fine when spring.cloud.refresh.enabled is true, but fails to register (registers with the port 0 ) when refresh is disabled
Server application.yaml
Client application.yaml
The text was updated successfully, but these errors were encountered: