cloudbeaver 无法创建连接:只读文件系统

cloudbeaver 无法创建连接:只读文件系统

我已经将带有清单的cloudbeaver部署到kubernetes


kind: Deployment
apiVersion: apps/v1
metadata:
  name: cloudbeaver
  namespace: cloudbeaver
spec:
  replicas: 1
  strategy:
      type: Recreate
  selector:
    matchLabels:
      app: cloudbeaver
  template:
    metadata:
      labels:
        app: cloudbeaver
    spec:
      containers:
        - name: cloudbeaver
          image: dbeaver/cloudbeaver:24.0.1
          imagePullPolicy: Always
          resources:
            requests:
              cpu: 200m
              memory: 256Mi
            limits:
              cpu: 500m
              memory: 256Mi
          ports:
            - name: web-access
              containerPort: 8978
          env:
            - name: CB_SERVER_NAME
              valueFrom:
                configMapKeyRef:
                  name: cloudbeaver-config
                  key: cb_server_name
            - name: CB_SERVER_URL
              valueFrom:
                configMapKeyRef:
                  name: cloudbeaver-config
                  key: cb_server_url
            - name: CB_ADMIN_NAME
              valueFrom:
                secretKeyRef:
                  name: cloudbeaver-secret
                  key: cb_admin_name
            - name: CB_ADMIN_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: cloudbeaver-secret
                  key: cb_admin_password
          livenessProbe:
            httpGet:
              path: /
              port: 8978
              scheme: HTTP
            initialDelaySeconds: 300
            timeoutSeconds: 10
            periodSeconds: 300
            successThreshold: 1
            failureThreshold: 5
          volumeMounts:
            - name: cloudbeaver-storage
              mountPath: /opt/cloudbeaver/workspace
            - name: cloudbeaver-config
              mountPath: /opt/cloudbeaver/conf/product.conf
              subPath: product.conf
            # - name: cloudbeaver-config
            #   mountPath: /opt/cloudbeaver/workspace/user-projects/admin.dbeaver/.dbeaver/data-sources.json
            #   subPath: user-data-sources.json
            - name: cloudbeaver-config
              mountPath: /opt/cloudbeaver/workspace/GlobalConfiguration/.dbeaver/data-sources.json
              subPath: global-data-sources.json
              readOnly: false
            - name: cloudbeaver-config
              mountPath: /opt/cloudbeaver/conf/cloudbeaver.conf
              subPath: cloudbeaver.conf
      volumes:
        - name: cloudbeaver-storage
          persistentVolumeClaim:
            claimName: cloudbeaver-pvc
        - name: cloudbeaver-config
          configMap:
            name: cloudbeaver-config

但是当我尝试通过 UI 添加 MySQL 连接时,出现以下错误

Failed to create connection:
/opt/cloudbeaver/workspace/GlobalConfiguration/.dbeaver/data-sources.json: Read-only file system
org.jkiss.dbeaver.DBException: /opt/cloudbeaver/workspace/GlobalConfiguration/.dbeaver/data-sources.json: Read-only file system
    at org.jkiss.dbeaver.registry.DataSourceRegistry.checkForErrors(DataSourceRegistry.java:1017)
    at io.cloudbeaver.model.rm.local.LocalResourceController.lambda$14(LocalResourceController.java:424)
    at io.cloudbeaver.model.rm.local.LocalResourceController.doFileWriteOperation(LocalResourceController.java:1002)
    at io.cloudbeaver.model.rm.local.LocalResourceController.updateProjectDataSources(LocalResourceController.java:409)
    at io.cloudbeaver.model.rm.local.LocalResourceController.createProjectDataSources(LocalResourceController.java:398)
    at org.jkiss.dbeaver.registry.rm.DataSourceRegistryRM.persistDataSourceCreate(DataSourceRegistryRM.java:62)
    at org.jkiss.dbeaver.registry.DataSourceRegistry.addDataSource(DataSourceRegistry.java:556)
    at io.cloudbeaver.WebDataSourceRegistryProxy.addDataSource(WebDataSourceRegistryProxy.java:133)
    at io.cloudbeaver.service.core.impl.WebServiceCore.createConnection(WebServiceCore.java:447)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)

答案1

根据您遇到的错误,这可能是身份验证问题。在本教程中”如何在 CloudBeaver 中创建数据库连接”,本教程首先测试了Cloudbeaver与数据库的连接。

相关内容