Spring GET-запрос завершается неудачно с ConfigMaps на K8S - PullRequest
0 голосов
/ 23 июня 2019

Мои ConfigMaps выглядят так Метры последней строки :

   apiVersion: v1
    kind: ConfigMap
    metadata:
      name: {{ template "kv-k8s-charts.fullname" . }}-webgateway-service
      kukus:
        app: {{ template "kv-k8s-charts.name" . }}-webgateway-service
        chart: {{ .Chart.Name }}-{{ .Chart.Version }}
        release: {{ .Release.Name }}
    data:
      application.properties: |-
        queue.name: {{ .Values.globalConfig.queue.name }}
        queue.endpoint: {{ .Values.globalConfig.queue.endpoint }}
        db.url: {{ .Values.globalConfig.mysql.url | quote }}
        server.something-manager.host: http://some-app-kv-k8s-charts-am-service:9090
        server.something-manager.links.something-list-path: http://some-app-kv-k8s-charts-am-service:9090/v1/somethings
        server.something-manager.links.something-path: http://some-app-kv-k8s-charts-am-service:9090/v1/something
        server.something-manager.links.use-case-path: http://some-app-kv-k8s-charts-am-service:9090/v1/use-case
        server.something-manager.links.extract-path: http://some-app-kv-k8s-charts-am-service:9090/v1/extract
        server.something-manager.links.task-info-path: http://some-app-kv-k8s-charts-am-service:9090/v1/get-task
        server.something-manager.links.train-path: http://some-app-kv-k8s-charts-am-service:9090/v1/train
        server.something-manager.links.update-uploaded-file-path: http://some-app-kv-k8s-charts-am-service:9090/v1/update-uploaded-file
        server.anything-manager.host: http://ip-172-30-2-191.ec2.internal
        server.anything-manager.set-path: http://ip-172-30-2-191.ec2.internal/api/sets/$set-id/upload-file
        server.anything-manager.get-path: http://ip-172-30-2-191.ec2.internal/api/sets/by-name/$name
        server.kuku-service.host: http://some-app-kv-k8s-charts-kuku-service:8080
        server.kuku-service.base-link: http://some-app-kv-k8s-charts-kuku-service:8080/v1
        server.kuku-service.links.upload-path: http://some-app-kv-k8s-charts-kuku-service:8080/v1/upload
        server.kuku-service.links.get-by-something-path: http://some-app-kv-k8s-charts-kuku-service:8080/v1/kukus?assetId=%d&useCaseId=%d&fileId=%d

Мой контроллер Spring Boot 2 выглядит так:

 @GetMapping(path = "/kukus")
    public Mono<List> getLabels(@RequestParam Long assetId, @RequestParam Long useCaseId,
                                @RequestParam Long fileId) {
        log.info("About to get labels with fileId={} for asset={} for usecase={}", fileId, assetId, useCaseId);
        return labelServiceClient.getLabels(assetId, useCaseId, fileId);
    }

Когда я бегуэто из Kubernetes из моего базового развертывания я получаю ошибку.Похоже, что configMaps не может обрабатывать "%d" в URL.Можете ли вы помочь?

2019-06-23 15:36:09.356 ERROR 1 --- [ctor-http-nio-2] a.w.r.e.AbstractErrorWebExceptionHandler : [bff88973] 500 Server Error for HTTP GET "/v1/labels?assetId=530&useCaseId=369&fileId=497"

java.lang.IllegalArgumentException: Name for argument type [java.lang.Long] not available, and parameter name information not found in class file either.
    at org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver.updateNamedValueInfo(AbstractNamedValueArgumentResolver.java:148) ~[org.springframework.spring-webflux-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver.getNamedValueInfo(AbstractNamedValueArgumentResolver.java:123) ~[org.springframework.spring-webflux-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver.resolveArgument(AbstractNamedValueArgumentResolver.java:92) ~[org.springframework.spring-webflux-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.web.reactive.result.method.annotation.AbstractNamedValueSyncArgumentResolver.resolveArgument(AbstractNamedValueSyncArgumentResolver.java:64) ~[org.springframework.spring-webflux-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.web.reactive.result.method.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:123) ~[org.springframework.spring-webflux-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.web.reactive.result.method.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:190) ~[org.springframework.spring-webflux-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.web.reactive.result.method.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:133) ~[org.springframework.spring-webflux-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter.lambda$handle$1(RequestMappingHandlerAdapter.java:200) ~[org.springframework.spring-webflux-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:153) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoOnErrorResume.subscribe(MonoOnErrorResume.java:44) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:150) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:76) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.innerNext(FluxConcatMap.java:275) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxConcatMap$ConcatMapInner.onNext(FluxConcatMap.java:849) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2066) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:162) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:1874) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:1748) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:90) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.Mono.subscribe(Mono.java:3710) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:442) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onSubscribe(FluxConcatMap.java:212) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.FluxConcatMap.subscribe(FluxConcatMap.java:121) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoNext.subscribe(MonoNext.java:40) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoSwitchIfEmpty.subscribe(MonoSwitchIfEmpty.java:44) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoFlatMap.subscribe(MonoFlatMap.java:60) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoFlatMap.subscribe(MonoFlatMap.java:60) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoOnErrorResume.subscribe(MonoOnErrorResume.java:44) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoOnErrorResume.subscribe(MonoOnErrorResume.java:44) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoPeekTerminal.subscribe(MonoPeekTerminal.java:61) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoOnErrorResume.subscribe(MonoOnErrorResume.java:44) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.Mono.subscribe(Mono.java:3710) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:172) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:70) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.core.publisher.MonoPeekTerminal.subscribe(MonoPeekTerminal.java:61) ~[io.projectreactor.reactor-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
    at reactor.netty.http.server.HttpServerHandle.onStateChange(HttpServerHandle.java:64) ~[io.projectreactor.netty.reactor-netty-0.8.8.RELEASE.jar:0.8.8.RELEASE]
    at reactor.netty.tcp.TcpServerBind$ChildObserver.onStateChange(TcpServerBind.java:226) ~[io.projectreactor.netty.reactor-netty-0.8.8.RELEASE.jar:0.8.8.RELEASE]
    at reactor.netty.http.server.HttpServerOperations.onInboundNext(HttpServerOperations.java:442) ~[io.projectreactor.netty.reactor-netty-0.8.8.RELEASE.jar:0.8.8.RELEASE]
    at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:91) ~[io.projectreactor.netty.reactor-netty-0.8.8.RELEASE.jar:0.8.8.RELEASE]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at reactor.netty.http.server.HttpTrafficHandler.channelRead(HttpTrafficHandler.java:161) ~[io.projectreactor.netty.reactor-netty-0.8.8.RELEASE.jar:0.8.8.RELEASE]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) ~[io.netty.netty-codec-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297) ~[io.netty.netty-codec-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:682) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:617) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:534) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) ~[io.netty.netty-transport-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906) ~[io.netty.netty-common-4.1.36.Final.jar:4.1.36.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[io.netty.netty-common-4.1.36.Final.jar:4.1.36.Final]
    at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...