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

[Bug] Fix the OC image service issue READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE #2373

Closed
3 tasks done
tschaffter opened this issue Nov 18, 2023 · 1 comment · Fixed by #2374
Closed
3 tasks done
Assignees
Labels
backend Backend development bug Something isn't working

Comments

@tschaffter
Copy link
Member

tschaffter commented Nov 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What product(s) are you seeing the problem on?

OpenChallenges

Current behavior

The web app returns sometimes a 404 error when trying to fetch an image URL from the image service:

Object { headers: {…}, status: 503, statusText: "Service Unavailable", url: "http://localhost:8082/api/v1/images?objectKey=team%2Fjake_albrecht.jpg&height=500px&aspectRatio=1_1", ok: false, name: "HttpErrorResponse", message: "Http failure response for http://localhost:8082/api/v1/images?objectKey=team%2Fjake_albrecht.jpg&height=500px&aspectRatio=1_1: 503 Service Unavailable", error: {…} }

The API gateway logs show:

2023-11-18 03:02:37 WARN  [parallel-3] o.s.c.l.core.RoundRobinLoadBalancer - No servers available for service: openchallenges-image-service
2023-11-18 03:02:37 WARN  [parallel-5] o.s.c.l.core.RoundRobinLoadBalancer - No servers available for service: openchallenges-image-service
2023-11-18 03:02:37 WARN  [parallel-7] o.s.c.l.core.RoundRobinLoadBalancer - No servers available for service: openchallenges-image-service
2023-11-18 03:02:37 WARN  [parallel-1] o.s.c.l.core.RoundRobinLoadBalancer - No servers available for service: openchallenges-image-service
2023-11-18 03:02:37 WARN  [parallel-3] o.s.c.l.core.RoundRobinLoadBalancer - No servers available for service: openchallenges-image-service
2023-11-18 03:02:37 WARN  [parallel-5] o.s.c.l.core.RoundRobinLoadBalancer - No servers available for service: openchallenges-image-service

The image service logs show (docker):

2023-11-18 03:04:42.823  INFO [openchallenges-image-service,,] 1 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2023-11-18 03:04:42.823  INFO [openchallenges-image-service,,] 1 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2023-11-18 03:04:42.823  INFO [openchallenges-image-service,,] 1 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2023-11-18 03:04:42.823  INFO [openchallenges-image-service,,] 1 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Application is null : false
2023-11-18 03:04:42.823  INFO [openchallenges-image-service,,] 1 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2023-11-18 03:04:42.823  INFO [openchallenges-image-service,,] 1 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2023-11-18 03:04:42.823  INFO [openchallenges-image-service,,] 1 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2023-11-18 03:04:42.832  INFO [openchallenges-image-service,,] 1 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_OPENCHALLENGES-IMAGE-SERVICE/9978d32a0ee7:openchallenges-image-service:8086 - was unable to refresh its cache! This periodic background refresh will be retried in 30 seconds. status = READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE stacktrace = java.lang.NoSuchFieldError: READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE
        at com.fasterxml.jackson.databind.deser.std.EnumDeserializer.createContextual(EnumDeserializer.java:211)
        at com.fasterxml.jackson.databind.DeserializationContext.handlePrimaryContextualization(DeserializationContext.java:836)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:550)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:294)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
        at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
        at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:621)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:188)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:28)
        at com.fasterxml.jackson.databind.DeserializationContext.handlePrimaryContextualization(DeserializationContext.java:836)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:550)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:294)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
        at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
        at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:621)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:188)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:28)
        at com.fasterxml.jackson.databind.DeserializationContext.handlePrimaryContextualization(DeserializationContext.java:836)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:550)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:294)
        at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
        at com.fasterxml.jackson.databind.deser.DeserializerCache.hasValueDeserializerFor(DeserializerCache.java:191)
        at com.fasterxml.jackson.databind.DeserializationContext.hasValueDeserializerFor(DeserializationContext.java:599)
        at com.fasterxml.jackson.databind.ObjectMapper.canDeserialize(ObjectMapper.java:3610)
        at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.canRead(AbstractJackson2HttpMessageConverter.java:252)
        at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.canRead(AbstractJackson2HttpMessageConverter.java:238)
        at org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.canReadResponse(RestTemplate.java:909)
        at org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.lambda$doWithRequest$0(RestTemplate.java:894)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
        at org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.doWithRequest(RestTemplate.java:898)
        at org.springframework.web.client.RestTemplate$HttpEntityRequestCallback.doWithRequest(RestTemplate.java:960)
        at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:780)
        at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:717)
        at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:608)
        at org.springframework.cloud.netflix.eureka.http.RestTemplateEurekaHttpClient.getApplicationsInternal(RestTemplateEurekaHttpClient.java:145)
        at org.springframework.cloud.netflix.eureka.http.RestTemplateEurekaHttpClient.getApplications(RestTemplateEurekaHttpClient.java:135)
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137)
        at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:121)
        at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:80)
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134)
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137)
        at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134)
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137)
        at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134)
        at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:1101)
        at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:1014)
        at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1531)
        at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1498)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

Expected behavior

  • The image service should be able to register properly to the API gateway
  • The web app should be able to query data from the image service

Anything else?

No response

Commit ID

2e66bb3

Are you developing inside the dev container?

  • I am using the dev container

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tschaffter tschaffter added bug Something isn't working backend Backend development labels Nov 18, 2023
@tschaffter tschaffter self-assigned this Nov 18, 2023
@tschaffter
Copy link
Member Author

Update

  • I can reproduce the issue when running the dev server of the image service
  • I experience this issue last week, see this comment

@tschaffter tschaffter changed the title [Bug] Troubleshoot why the image service becomes offline [Bug] Fix the OC image service issue READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend development bug Something isn't working
Projects
None yet
1 participant