helm3-charts icon indicating copy to clipboard operation
helm3-charts copied to clipboard

runsv nexus: fatal: unable to open supervise/lock: file does not exist

Open Zheer09 opened this issue 2 years ago • 1 comments

Hello i was trying to create the an nexus repository manager with helm release with an official or others images but still got error here is my values and helm release file

---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
  name: nexus
  namespace: nexus
  annotations:
    fluxcd.io/automated: "true"
spec:
  releaseName: nexus
  chart:
    repository: https://sonatype.github.io/helm3-charts/
    name: nexus-repository-manager
    version: 45.0.0
  values:

    deploymentStrategy: Recreate

    image:
      # Sonatype Official Public Image
      # repository: sonatype/nexus3
      # tag: 3.44.0
      repository: quay.io/travelaudience/docker-nexus
      tag: 3.42.0-01
      pullPolicy: IfNotPresent
    imagePullSecrets:
      - name: regcred

    nexus:
      env:
        - name: INSTALL4J_ADD_VM_PARAMS
          value: |-
            -Xms4G -Xmx4G 
            -XX:MaxDirectMemorySize=2G 
            -XX:+UnlockExperimentalVMOptions 
            -XX:+UseCGroupMemoryLimitForHeap 
            -XX:ActiveProcessorCount=4"
        - name: NEXUS_SECURITY_RANDOMPASSWORD
          value: "false"
      resources:
        requests:
          cpu: 4
          memory: 4800Mi
        limits:
          cpu: 4
          memory: 9Gi
      securityContext:
        runAsUser: 200
        runAsGroup: 200
        fsGroup: 200
      podAnnotations: {}
      livenessProbe:
        initialDelaySeconds: 30
        periodSeconds: 30
        failureThreshold: 6
        timeoutSeconds: 10
        path: /
      readinessProbe:
        initialDelaySeconds: 30
        periodSeconds: 30
        failureThreshold: 6
        timeoutSeconds: 10
        path: /
      nexusPort: 8081

    config:
      enabled: true
      mountPath: /general_config
      data:
        run: |
          #!/bin/bash
          mkdir -p /opt/sonatype/nexus/system/com/larscheidschmitzhermes
          wget -O /tmp/nexus3-github-oauth-plugin.zip https://github.com/larscheid-schmitzhermes/nexus3-github-oauth-plugin/releases/download/2.0.2/nexus3-github-oauth-plugin.zip
          unzip /tmp/nexus3-github-oauth-plugin.zip -d /opt/sonatype/nexus/system/com/larscheidschmitzhermes
          rm /tmp/nexus3-github-oauth-plugin.zip
          echo "mvn\:com.larscheidschmitzhermes/nexus3-github-oauth-plugin/2.0.2 = 200" >> /opt/sonatype/nexus/etc/karaf/startup.properties
          echo "github.org=example" > /opt/sonatype/nexus/etc/githuboauth.properties
          if [ "$NEXUS_DATA_CHOWN" == "true" ]; then
            chown -R nexus:nexus /opt/sonatype
            chown -R nexus:nexus /nexus-data
          fi
          su-exec nexus /opt/sonatype/nexus/bin/nexus run
    deployment:
      additionalVolumeMounts:
        - mountPath: /etc/service/nexus/run
          name: nexus-service
          subPath: run
      additionalVolumes:
        - name: nexus-service
          configMap:
            name: sonatype-nexus-conf
            items:
              - key: run
                path: run
                mode: 365

    persistence:
      enabled: true
      storageClass: ceph-replicated
      storageSize: 100Gi
      
    nexusProxyRoute:
      enabled: false

    service:
      enabled: true
      name: sonatype-sonatype-nexus
      portName: http-nexus
      type: ClusterIP

And this is what i got


[email protected]:~/nexus$ kubectl logs nexus-nexus-repository-manager-65b5745db-kjlgw -n nexus
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist
runsv nexus: fatal: unable to open supervise/lock: file does not exist

With the official image which is repository: sonatype/nexus3 tag: 3.45.0 i am getting this


[email protected]:~/nexus$ kubectl logs nexus-nexus-repository-manager-689bb65bb9-lgxmz -n nexus
mkdir: cannot create directory '\n-XX:MaxDirectMemorySize=2G \n-XX:+UnlockExperimentalVMOptions \n-XX:+UseCGroupMemoryLimitForHeap \n..': Permission denied
mkdir: cannot create directory '\n-XX:MaxDirectMemorySize=2G \n-XX:+UnlockExperimentalVMOptions \n-XX:+UseCGroupMemoryLimitForHeap \n..': Permission denied
Improperly specified VM option 'ActiveProcessorCount=4"'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Zheer09 avatar Jan 03 '23 08:01 Zheer09

were you able to find a solution for this? I am presently experiencing exactly the same issue.

austinobioma avatar Mar 29 '24 20:03 austinobioma