当前位置: 首页 > 知识库问答 >
问题:

kubernetes上的spring云数据流服务器在仪表板加载时出错

刘嘉木
2023-03-14

正在尝试在kubernetes上运行Spring云数据流服务器。当我尝试打开仪表板url时(https://scdfserverurl/dashboard/#/apps)在浏览器中部分加载,并在日志中显示以下错误。其他组件skipper运行正常,可以访问url。

错误堆栈跟踪

库伯内特斯酒店

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>"

波姆。数据流服务器的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>

共有1个答案

濮阳品
2023-03-14

这是由于https-http重定向导致的,数据流服务器无法到达skipper/deployer restendpoint。下面的链接有详细信息链接

 类似资料:
  • 在spring cloud dataflow中,根据我的理解,每个流都是一个微服务,但数据流服务器不是。我说的对吗?

  • 我通过Kubespray成功部署了Kubernetes,一切似乎都很好。我可以通过kubectl访问集群,列出节点、POD、服务、秘密等。还可以应用新的资源,仪表板endpoint可以让我进入仪表板登录页面。 我使用不同服务帐户的令牌登录(默认、kubernetes仪表板、kubernetes admin等)。。。每次登录时,我都会看到与kubespray dashboard中描述的相同的弹出窗口

  • 我有一个Kubernetes集群,各种资源运行良好。我试图让仪表板工作,但在启动仪表板并输入服务帐户令牌时出现以下错误。 persistentvolumeclaims被禁止:用户“system:serviceaccount:kube system:kubernetes dashboard”无法在命名空间“default”中的API组“”中列出资源“persistentvolumeclaims” 它

  • 加载仪表板 如何打开一个保存的仪表板: 点击侧边导航栏中的 Dashboard 。 选中一个仪表板并点击 Open 。如果您有很多仪表板,您可以敲入 Filter 字符串来过滤仪表板列表。 要导入、导出和删除仪表板,请点击 Manage Dashboards 链接打开 Management/Kibana/Saved Objects/Dashboards 。

  • 我已经部署了SpringCloudDataFlow(SCDF)版本2.4。Kubernetes v1上的0。17.4使用minikube v1。8.2基于此参考。文档| Spring云数据流 我想在SCDF上启用基本身份验证。17.2基本认证但是我找不到Kubernetes或Spring更改SCDF pod安全性的相关文档。 我应该使用data flow config server shell更改

  • 我正在尝试使用skipper服务器管理spring云数据流。 我按照这里的指示: https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#getting-started-deploying-spring-cloud-dataflow 应用程序注册和流定义/部署进行得非常顺利,但是在我取消部署部署