Попытка запустить сервер потоков данных Spring Cloud в kubernetes. Когда я пытаюсь открыть URL-адрес панели мониторинга (https://scdfserverurl/dashboard/#/apps) в браузере, он частично загружается и выдает ошибку в журналах, показанную ниже. Остальные компоненты запускаются. точный и способный доступ к URL.
Трассировка стека ошибок
2019-10-29 23: 12: 20.855 + 0000 [http-nio-9393-exec-9] ОШИБКА oscdscRestControllerAdvice - Выявлено исключение при обработке запроса org.springframework.web.client.RestClientException: не удалось извлечь ответ: не найден подходящий HttpMessageConverter для типа ответа [org.springframework.hateoas.Resources] и типа контента [at text / ht]org.springframework.web.client.HttpMessageConverterExtractor.extractData (HttpMessageConverterExtractor.java:121) в org.springframework.web.client.RestTemplate $ ResponseEntityResponseExtractata.traResponseEntityResponseExtractor.extractData (RestTemplate.java:978)в org.springframework.web.client.RestTemplate.doExecute (RestTemplate.java:737) в org.springframework.web.client.RestTemplate.execute (RestTemplate.java:710) в org.springframework.weex.emplient(RestTemplate.java:628) в org.springframework.hateoas.client.Traverson $ TraversalBuilder.toObject (Traverson.java:344) в org.springframework.cloud.skipper.client.DefaultSkipperClient.listDepavaers5) по умолчанию (по умолчанию)org.springframework.cloud.dataflow.server.stream.SkipperStreamDeployer.platformList (SkipperStreamDeployer.java:610) в org.springframework.cloud.dataflow.server.service.impl.DefaultStreamService.platformList. org по умолчанию (org) по умолчанию (or). springframework.cloud. CglibAopProxy $ CglibMethodInvocation.invokeJoinpoint (CglibAopProxy.java:749) в организации.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:163) в org.springframework.transaction. .java: 98) по адресу org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:186) по адресу org.springframework.aop.framework.CglibAopProxy $ DynamicAdvisedInforfrara.rag. cloud.dataflow.server.service.impl.DefaultStreamService $$ EnhancerBySpringCGLIB $$ a40fcfc9.platformList () в org.springframework.cloud.dataflow.server.controller.StreamDeploymentController.pljlImp_Im_LF.invoke0 (собственный метод) в sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) в sun.reflect.DelegatingMethodAccasseImpl.invoke (DelegatingMethodAccessorImpl.java:43) по адресу java.lang.reflect.Method.invoke (Method.java:498) по адресу org.springframework.web.method.support.InvocableHandlerMethod.doInandjhog: 18.springframework.web.method. .servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod (RequestMappingHandlerAdapter.java:895)в org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal (RequestMappingHandlerAdapter.java:800) в org.springframework.web.servlet.mvc.method.AbstractHandlerMethog.springframework.web.servlet.DispatcherServlet. .java: 1005) в org.springframework.web.servlet.FrameworkServlet.doGet (FrameworkServlet.java:897) в javax.servlet.http.HttpServlet.service (HttpServlet.java:634) в org.springbrame.web. FrameworkServlet.service (FrameworkServlet.java:882) в javax.servlet.http.HttpServlet.service (HttpServlet.java:741) в org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilavag2.in) atj.apache.hain).catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166) по адресу org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:53) по адресу org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChaap.g): org.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166) в org.springframework.web.filter.ForwardedHeaderFilter.doFilterInternal (ForwardedHeaderFilter.java:15est): 107) в org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193) в org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166) в org.s. web.trace.servlet. Java: 193) в org.apache.catalina.core. .doFilter (OncePerRequestFilter.java:107) в org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193) в org.apache.catalina.core.ApplicationFilterChain.doFilterChain.doFilter.haf. springframework.web.filter. Java: 193) в org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166) в org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal (HiddenHttpMetjrag).web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:107) в org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193) в org.apache.catilhaFF166: 106) в org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:107)в org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193) в org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166) в orfFilterFrater(CharacterEncodingFilter.java:200) в org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:107) в org.apache.catalina.core.ApplicationFilterChain.internalDoFilg. catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166) в org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:200) в org.apache. 96) в org.apache.catalina.authenticator.AuthenticatorBase.invoke (AuthenticatorBase.java:490) в org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:139) в org.apache.catEror.invoke (ErrorReportValve.java:92) в org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:74) в org.apache.catalina.valves.RemoteIpValve.invoke (RemoteIpValve.java:67ap) в org. .connector.CoyoteAdapter.service (CoyoteAdapter.java:343) в org.apache.coyote.http11.Http11Processor.service (Http11Processor.java:408) в org.apache.coyote.AbstractProcessorLight.proight (AbstractProcessL). org.apache.coyote.AbstractProtocol $ ConnectionHandler.process (AbstractProtocol.java:834) в org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun (NioEndpoint.java:1415) в org.apache.tomcat.util. net.SocketProcessorBase.run (SocketProcessorBase.java:49) в java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) в java.util.concurrent.ThreadPoolExecutor $ Worker.run.jun).apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run (TaskThread.java:61) в java.lang.Thread.run (Thread.java:748)
Кубернетес сonfig YML
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: scdf-server-network-policy
spec:
podSelector:
matchLabels:
app: scdf-server
ingress:
- from:
- namespaceSelector:
matchLabels:
gkp_namespace: ingress-nginx
egress:
- {}
policyTypes:
- Ingress
- Egress
---
apiVersion: v1
kind: Secret
metadata:
name: poc-pull-secret
data:
.dockerconfigjson: ewogICJhdXRocyI6IHsKI
type: kubernetes.io/dockerconfigjson
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: scdf-server
labels:
app: scdf-server
spec:
replicas: 1
selector:
matchLabels:
app: scdf-server
template:
metadata:
labels:
app: scdf-server
annotations:
kubernetes.io/psp: nonroot
spec:
containers:
- name: scdf-server
image: <quay_url>/scdf-server:0.0.9-scdf
imagePullPolicy: Always
ports:
- containerPort: 9393
protocol: TCP
resources:
limits:
cpu: "4"
memory: 2Gi
requests:
cpu: 25m
memory: 1Gi
securityContext:
runAsUser: 99
env:
- name: SPRING_CLOUD_SKIPPER_CLIENT_SERVER_URI
value: "<skipper_server_url>/api"
- name: SPRING_CLOUD_DATAFLOW_FEATURES_SKIPPER_ENABLED
value: "true"
imagePullSecrets:
- name: poc-pull-secret
serviceAccount: spark
serviceAccountName: spark
---
apiVersion: v1
kind: Service
metadata:
name: scdf-server
labels:
app: scdf-server
spec:
ports:
- port: 80
targetPort: 9393
protocol: TCP
name: http
selector:
app: scdf-server
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: scdf-server
annotations:
ingress.kubernetes.io/ssl-passthrough: "true"
ingress.kubernetes.io/secure-backends: "true"
kubernetes.io/ingress.allow.http: false
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
rules:
- host: "<app_url>"
http:
paths:
- path: /
backend:
serviceName: scdf-server
servicePort: 80
tls:
- hosts:
- "<app_url>"
POM.XML для сервера потоков данных
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pocgroup</groupId>
<artifactId>scdf-server</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Spring Cloud Data Flow :: Server</name>
<packaging>jar</packaging>
<description>Spring Cloud Dataflow Server</description>
<!-- Spring Boot Dependency -->
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dataflow-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/>
</parent>
<properties>
<java.version>1.8</java.version>
<revision>0.0.0-SNAPSHOT</revision>
<jacoco.skip.instrument>true</jacoco.skip.instrument>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<version>0.8.2</version>
<classifier>runtime</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-dataflow-server</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<classifier>runtime</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sybase.jconnect</groupId>
<artifactId>jconn4</artifactId>
<version>7.07-27307</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
</systemPropertyVariables>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.21.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.2</version>
<executions>
<execution>
<id>default-instrument</id>
<goals>
<goal>instrument</goal>
</goals>
<configuration>
<skip>${jacoco.skip.instrument}</skip>
</configuration>
</execution>
<execution>
<id>default-restore-instrumented-classes</id>
<goals>
<goal>restore-instrumented-classes</goal>
</goals>
<configuration>
<skip>${jacoco.skip.instrument}</skip>
</configuration>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<skip>${jacoco.skip.instrument}</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>add-it-test-source</id>
<phase>process-resources</phase>
<goals>
<goal>add-test-source</goal>
<goal>add-test-resource</goal>
</goals>
<configuration>
<sources>
<source>src/it/java</source>
</sources>
<resources>
<resource>
<directory>src/it/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>checkstyle-validation</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>integration-test</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>run-integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>