Steeltoe
Steeltoe copied to clipboard
Port information is not transferred as part of body request
Describe the bug
When a eureka registration is occurring the port number is not being set in the payload however the
Steps to reproduce
Steps to reproduce the behavior:
- Define your port information in configuration
Data.Add("eureka:instance:Port", "90");
Data.Add("eureka:instance:NonSecurePortEnabled", true.ToString());
Data.Add("eureka:instance:SecurePortEnabled", false.ToString());
- Have an application perform a registration with eureka
- Observe payload coming in
- Notice port numbers are not set
- Observe all other urls are using the port ie info & health address
Expected behavior
The port number number when configured is provided as part of the payload
Environment (please complete the following information):
- Steeltoe Version 3.2.6
- OS: Windows,
- .NET Version Net 8
I'm unable to reproduce this with the provided details. Can you try with the FortuneTeller sample at https://github.com/SteeltoeOSS/Samples/blob/main/Discovery/src/FortuneTeller.sln?
Sure will look at that sample tomorrow my time & report back.
so i have noticed a couple of things while debugging. The IsUnsecurePortEnabled flag is not being respected for some reason and always showing as false even when config is different. I have tried using the property: IsUnsecurePortEnabled and what the docs stated but it hasn't helped. I have pushed my reproduct6ion up to my eureka branch of the samples
The configuration key is named NonSecurePortEnabled, not IsUnsecurePortEnabled (see https://docs.steeltoe.io/api/v3/discovery/netflix-eureka.html).
found the root cause. I was using newtonsoft for my deserialisation rather than system.text.json hence it didn't respect the JsonPropertyName attributes. Hence closing