Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-14863

Settings INSTALL4J_ADD_VM_PARAMS in docker swarm + compose v3 causes Error: Could not find or load main class "-Xms1200m error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Bug
    • Affects Version/s: 3.6.0
    • Fix Version/s: None
    • Component/s: Docker-Nexus
    • Labels:
      None
    • Environment:

      Description

      Hello,

      I'm testing the official nexus image: sonatype/nexus3 in docker swarm mode

      And setting the INSTALL4J_ADD_VM_PARAMS variable causes the container to fail on startup with the following message:

      nexus.1.84g7qkug7daa@001.example.com    | Error: Could not find or load main class "-Xms1200m
      nexus.1.84g7qkug7daa@001.example.com    | Error: Could not find or load main class "-Xms1200m
      nexus.1.84g7qkug7daa@001.example.com    | Error: Could not find or load main class "-Xms1200m

      ...

      Steps to reproduce.

      $ cat nexus3.yml
      version: "3"
      services:
        nexus:
          image: sonatype/nexus3
          volumes:
            - "nexus-data:/nexus-data"
          ports:
            - "8081:8081"
          environment:
            - INSTALL4J_ADD_VM_PARAMS="-Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
      volumes:
        nexus-data: {}
      
      $ sudo docker stack deploy -c nexus3.yml nexus3
      $ sudo docker service logs -f nexus3
      nexus.1.84g7qkug7daa@001.example.com    | Error: Could not find or load main class "-Xms1200

      The above image works fine if no INSTALL4J_ADD_VM_PARAMS variable is defined.

      Is docker swarm unsupported?

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            javier-lopez Javier López
            Last Updated By:
            Peter Lynch Peter Lynch
            Team:
            Integrations
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title