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

20th
Jul 2016
XMaggie
@XMaggie
Jul 20 2016 01:05
when eureka client register to mutiple eureka server instance using this config:
    serviceUrl:
      defaultZone: ${EUREKA_PEER_URL1}/eureka/,${EUREKA_PEER_URL2}/eureka/,${EUREKA_PEER_URL3}/eureka/
which server is acitve? the first one or randomly choose one of them
Dreampie
@Dreampie
Jul 20 2016 01:59
@dsyer
spring-cloud/spring-cloud-netflix#1194
need help,please
Dreampie
@Dreampie
Jul 20 2016 06:52
@spencergibb can you help me?
Marcos Barbero
@marcosbarbero
Jul 20 2016 06:53
I think it's not an issue but an expected behavior based on this rfc https://tools.ietf.org/html/rfc3986#section-2.4
ccit-spence
@ccit-spence
Jul 20 2016 07:05
@Dreampie Are you on here?
Dreampie
@Dreampie
Jul 20 2016 07:05
yes,im here
ccit-spence
@ccit-spence
Jul 20 2016 07:07
What I was asking, is has the number of applications changed?
Dreampie
@Dreampie
Jul 20 2016 07:09
I restart this service(two instance)
6B8AF637-8E56-4A95-AF18-6E60B9152BCC.png
SCHEDULER-SERVICE-PROVIDER n/a (2) (2) UP (2) - 68c6a90f07f1:scheduler-service-provider:5218 , 2c20b94891c3:scheduler-service-provider:5218
ccit-spence
@ccit-spence
Jul 20 2016 07:10
that is normal I think for the message to appear then. May take a bit to clear
I by no means am a Spring Cloud expert. Have been using it for a while now
Dreampie
@Dreampie
Jul 20 2016 07:11
yes,Sometimes this disappear,but sometimes four SCHEDULER-SERVICE-PROVIDER instance appear,and two instance was down
ccit-spence
@ccit-spence
Jul 20 2016 07:13
when 4 appear my guess is that they have new instance IDs and the old stale IDs still appear
Dreampie
@Dreampie
Jul 20 2016 07:16
yes,but old id not remove always until I restart eureka
THE INSTANCES ARE NOT BEING EXPIRED JUST TO BE SAFE
ccit-spence
@ccit-spence
Jul 20 2016 07:18
I have actually seen that when testing new instances. Unfortunatly I don’t recall how we fixed it or if we found a fix. Maybe someone else has the answer
Dreampie
@Dreampie
Jul 20 2016 07:20
ok,thank you, and do you know this: spring-cloud/spring-cloud-netflix#1194
if send % got 400 code
ccit-spence
@ccit-spence
Jul 20 2016 07:21
I have never tried it, with a % not sure it should work.
Dreampie
@Dreampie
Jul 20 2016 07:24
    propdepsPluginVersion = "0.0.7"
    springloadedVersion = "1.2.6.RELEASE"

    springDependencyManagementVersion = "0.5.4.RELEASE"
    springBootGradlePluginVersion = "1.3.5.RELEASE"
    springCloudStarterParentVersion = "Brixton.RELEASE"

    hibernateRedisVersion = "1.0-SNAPSHOT"
    querydslPluginVersion = "1.0.3"
error Caused by: feign.FeignException: status 400 reading
thanks for your help
Marcos Barbero
@marcosbarbero
Jul 20 2016 07:36
@Dreampie have you seen my message above? I think it's not an issue based on this rfc it may be an expected behavior https://tools.ietf.org/html/rfc3986#section-2.4
Dreampie
@Dreampie
Jul 20 2016 07:40
yes,I see, that mean,I must prevent users from passing this character?
Dave Syer
@dsyer
Jul 20 2016 07:40
No. It just works.
Feign encodes the parameters for you
Dreampie
@Dreampie
Jul 20 2016 07:42
yes,but requesttemplate decode it before send request
Dave Syer
@dsyer
Jul 20 2016 07:44
I'm not sure what you mean. It works for me anyway.
Dreampie
@Dreampie
Jul 20 2016 07:44
wait a moment
Dave Syer
@dsyer
Jul 20 2016 07:44
Maybe you can prepare a simple test case?
Dave Syer
@dsyer
Jul 20 2016 07:48
I can't read that. Can you just make a test case and put it in a project in Github, please?
I post image at github,write demo need takes too much time
Dreampie
@Dreampie
Jul 20 2016 07:54
now,can you read it?
Dave Syer
@dsyer
Jul 20 2016 07:55
Sorry, but we can't debug your code for you from screenshots.
@XMaggie I believe Eureka client will use the first service URL that works. Is that what you mean by "active"?
Dreampie
@Dreampie
Jul 20 2016 07:57
ribbonrequest is right,when it.toRequest() this method decode it ,I think
Dreampie
@Dreampie
Jul 20 2016 08:04
@dsyer I post new picture, not encode values?
Dave Syer
@dsyer
Jul 20 2016 08:06
I can't do this with screenshots. If you can't find the time to publish some actual code, you'll have to work it out on your own. Sorry.
Dreampie
@Dreampie
Jul 20 2016 08:18
👀
XMaggie
@XMaggie
Jul 20 2016 08:21
@dsyer yes, that's what i mean. thank you!
David Magalhães
@speeddragon
Jul 20 2016 13:36
To use custom objects with a feign client I need to implement decoder and encoders ? I’ve tried to find examples, but without luck so far :\
Dave Syer
@dsyer
Jul 20 2016 15:11
It depends what you mean by "custom objects"
David Magalhães
@speeddragon
Jul 20 2016 15:12
A POJO for example, a simple object that contain 3 variable like String or other simple object inside.
Dave Syer
@dsyer
Jul 20 2016 15:13
You can send/receive such an object as a request/response body
What did you want to do with it?
David Magalhães
@speeddragon
Jul 20 2016 15:14
I was trying to do it by GET.
Dave Syer
@dsyer
Jul 20 2016 15:14
Do what?
David Magalhães
@speeddragon
Jul 20 2016 15:16
The parameter of an endpoint of the feign client receive a POJO object. The service that is using that feign client endpoint doesn’t send right the object (I’m using GET). I think I may have to write the code that how it should be serialize to the URL and how it deserialize back so the feign client can read it, right ?
Dave Syer
@dsyer
Jul 20 2016 15:17
GET doesn't have a request body
David Magalhães
@speeddragon
Jul 20 2016 15:17
Example: List<Car> getMyCars(CarFilter carFilter);
Dave Syer
@dsyer
Jul 20 2016 15:17
Yes, you need a converter for that
David Magalhães
@speeddragon
Jul 20 2016 15:17
Where CarFilter have String plateFilter; String manufacturerFilter; inside
Ok, I will try to find an example of converters.
Dave Syer
@dsyer
Jul 20 2016 15:21
I don't think it's going to be very nice
All you can do is get the CarFilter converted to a String
You still need to deserialize the String in the server
The server is unlikely to be the right place to do that
If you have control over the server it would probably be nicer to turn the request into a POST and give it a body
If you don't have control of the server, it's unlikely to accept a filter as a single String value
nurgasemetey
@nurgasemetey
Jul 20 2016 15:29
@dsyer , can I open issue in Sprin Cloud Dataflow about eureka discovery for custom apps from Spring Cloud Stream App Starters Stream?
Dave Syer
@dsyer
Jul 20 2016 15:30
I guess that makes sense
I wasn't really clear what you did
But if you put some detailed steps to reproduce in the issue it will at least make a place to discuss it properly
nurgasemetey
@nurgasemetey
Jul 20 2016 15:31
@dsyer ok
Matt Benson
@mbenson
Jul 20 2016 21:04
wouldn't it be reasonable to expect that spring.profiles.include settings from PropertySourceLocator PropertySources should be updated in the [Configurable]Environment?
I imagine I can make this happen with a custom ApplicationContextInitializer that runs after PropertySourceBootstrapConfiguration, and clones a good bit of code from elsewhere in Spring core/boot, but... c'mon, guys ;)