Skip to content
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

armeria: showcase Eureka integration #104

Merged
merged 2 commits into from
Jan 14, 2024
Merged

Conversation

codefromthecrypt
Copy link
Member

@codefromthecrypt codefromthecrypt commented Jan 14, 2024

Note: If you don't set zipkin's EUREKA_HOSTNAME=zipkin then clients will crash hard like this. It may be something to fix in armeria, or maybe we should require explicit setting.

$ build-bin/docker/docker_build openzipkin/brave-example:armeria-test
--snip--
$  docker-compose -f docker-compose.yml -f docker-compose-eureka.yml up
--snip--
backend   | 08:01:00.115 [armeria-common-worker-epoll-2-2] [] [/] WARN  c.l.a.c.eureka.EurekaEndpointGroup - Unexpected exception while parsing a response from: http://eureka:8761/eureka/v2. (content: {"application":{"name":"ZIPKIN","instance":[{"instanceId":"08d1cd941327:zipkin:9411","hostName":"08d1cd941327","app":"ZIPKIN","ipAddr":"172.21.0.3","status":"UP","overriddenStatus":"UNKNOWN","port":{"$":9411,"@enabled":"true"},"securePort":{"$":0,"@enabled":"false"},"countryId":1,"dataCenterInfo":{"@class":"com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo","name":"MyOwn"},"leaseInfo":{"renewalIntervalInSecs":30,"durationInSecs":90,"registrationTimestamp":1705219255654,"lastRenewalTimestamp":1705219255654,"evictionTimestamp":0,"serviceUpTimestamp":1705219255086},"metadata":{"@class":"java.util.Collections$EmptyMap"},"healthCheckUrl":"http://172.21.0.3:9411/health","vipAddress":"08d1cd941327:9411","isCoordinatingDiscoveryServer":"false","lastUpdatedTimestamp":"1705219255654","lastDirtyTimestamp":"1705219254880","actionType":"ADDED"}]}}, responseConverter: com.linecorp.armeria.client.eureka.EurekaEndpointGroup$ApplicationConverter@7d7d125f, requestHeaders: [:method=GET, :path=/apps/zipkin, accept=application/json; charset=utf-8])
backend   | java.lang.IllegalArgumentException: Not a valid domain name: '08d1cd941327'
backend   | 	at com.linecorp.armeria.internal.shaded.guava.base.Preconditions.checkArgument(Preconditions.java:218)
backend   | 	at com.linecorp.armeria.internal.shaded.guava.net.InternetDomainName.<init>(InternetDomainName.java:162)
backend   | 	at com.linecorp.armeria.internal.shaded.guava.net.InternetDomainName.from(InternetDomainName.java:252)
backend   | 	at com.linecorp.armeria.client.Endpoint.normalizeHost(Endpoint.java:222)
backend   | 	at com.linecorp.armeria.client.Endpoint.create(Endpoint.java:207)
backend   | 	at com.linecorp.armeria.client.Endpoint.of(Endpoint.java:133)
backend   | 	at com.linecorp.armeria.client.eureka.EurekaEndpointGroup.endpoint(EurekaEndpointGroup.java:412)
backend   | 	at com.linecorp.armeria.client.eureka.EurekaEndpointGroup.lambda$endpoints$8(EurekaEndpointGroup.java:362)

@codefromthecrypt
Copy link
Member Author

@codefromthecrypt
Copy link
Member Author

maybe we can't detect the correct hostname in docker and should always set it..

@codefromthecrypt
Copy link
Member Author

I'm not sure if armeria could discover the correct hostname to use for eureka discovery or not. For now, I'll just change the examples to specify it explicitly.

@codefromthecrypt codefromthecrypt changed the title wip: integration test eureka with armeria armeria: showcase Eureka integration Jan 14, 2024
@codefromthecrypt
Copy link
Member Author

ok done on a released version

Signed-off-by: Adrian Cole <[email protected]>
@codefromthecrypt codefromthecrypt merged commit 9bdcd4c into master Jan 14, 2024
9 checks passed
@codefromthecrypt codefromthecrypt deleted the armeria-eureka branch January 14, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants