Community Edition 4.0.4

Hi Community,

When trying to run v4.0.4 from the official Docker Hub images it looks like they come with enterprise features activated and when I try to use “license.enterprise=false” I run into:


org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [license.enterprise] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

at org.elasticsearch.bootstrap.StartupExceptionProxy.<init>(StartupExceptionProxy.java:31) ~[crate-app.jar:4.0.4]

at io.crate.bootstrap.CrateDB.init(CrateDB.java:162) ~[crate-app.jar:4.0.4]

at io.crate.bootstrap.CrateDB.execute(CrateDB.java:138) ~[crate-app.jar:4.0.4]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:82) ~[crate-app.jar:4.0.4]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-7.0.0.jar:4.0.4]

at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.0.0.jar:4.0.4]

at io.crate.bootstrap.CrateDB.main(CrateDB.java:91) ~[crate-app.jar:4.0.4]

at io.crate.bootstrap.CrateDB.main(CrateDB.java:84) ~[crate-app.jar:4.0.4]

Caused by: java.lang.IllegalArgumentException: unknown setting [license.enterprise] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:399) ~[crate-app.jar:4.0.4]

at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:349) ~[crate-app.jar:4.0.4]

at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:320) ~[crate-app.jar:4.0.4]

at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:291) ~[crate-app.jar:4.0.4]

at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:97) ~[crate-app.jar:4.0.4]

at org.elasticsearch.node.Node.<init>(Node.java:306) ~[crate-app.jar:4.0.4]

at io.crate.node.CrateNode.<init>(CrateNode.java:61) ~[crate-app.jar:4.0.4]

at org.elasticsearch.bootstrap.BootstrapProxy$1.<init>(BootstrapProxy.java:184) ~[crate-app.jar:4.0.4]

at org.elasticsearch.bootstrap.BootstrapProxy.setup(BootstrapProxy.java:184) ~[crate-app.jar:4.0.4]

at org.elasticsearch.bootstrap.BootstrapProxy.init(BootstrapProxy.java:252) ~[crate-app.jar:4.0.4]

at io.crate.bootstrap.CrateDB.init(CrateDB.java:158) ~[crate-app.jar:4.0.4]

So it looks like I need to community edition to proceed from here?

My Statefulset looks like:

apiVersion: "apps/v1"
metadata:
  # This is the name used as a prefix for all pods in the set.
  name: crate
spec:
  serviceName: "crate-set"
  # Our cluster has three nodes.
  replicas: 3
  selector:
    matchLabels:
      # The pods in this cluster have the `app:crate` app label.
      app: crate
  template:
    metadata:
      labels:
        app: crate
    spec:
      # InitContainers run before the main containers of a pod are
      # started, and they must terminate before the primary containers
      # are initialized. Here, we use one to set the correct memory
      # map limit.
      initContainers:
      - name: init-sysctl
        image: busybox
        imagePullPolicy: IfNotPresent
        command: ["sysctl", "-w", "vm.max_map_count=262144"]
        securityContext:
          privileged: true
      # This final section is the core of the StatefulSet configuration.
      # It defines the container to run in each pod.
      containers:
      - name: crate
        # Use the CrateDB 3.0.5 Docker image.
        image: crate:4.0.4
        # Pass in configuration to CrateDB via command-line options.
        # Notice that we are configuring CrateDB unicast host discovery
        # using the SRV records provided by Kubernetes.
        command:
          - /docker-entrypoint.sh
          - -Ccluster.initial_master_nodes=crate-0,crate-1,crate-2
          - -Ccluster.name=${CLUSTER_NAME}
          - -Cdiscovery.seed_providers=srv
          - -Cdiscovery.srv.query=_crate-prom._tcp.crate-internal-service.${NAMESPACE}.svc.cluster.local
          - -Clicense.enterprise=false
          - -Cnetwork.host="0.0.0.0"
          - -Cnode.name="$POD_NAME"
          - -Cgateway.expected_nodes=${EXPECTED_NODES}
          - -Cgateway.recover_after_nodes=${EXPECTED_NODES}
          - -Chttp.cors.allow-origin="*"
          - -Chttp.cors.enabled=false
          - -Cpath.data=/data
          - -Cprocessors="$MIN_VCPU_COUNT"
        volumeMounts:
              # Mount the `/data` directory as a volume named `data`.
            - mountPath: /data
              name: data
        resources:
          requests:
            cpu: 1
          limits:
            # How much memory each pod gets.
            memory: 512Mi
        ports:
          # Port 4300 for inter-node communication.
        - containerPort: 4300
          name: crate-internal
          # Port 4200 for HTTP clients.
        - containerPort: 4200
          name: crate-web
          # Port 5432 for PostgreSQL wire protocol clients.
        - containerPort: 5432
          name: postgres
        # Environment variables passed through to the container.
        env:
          # This is variable is detected by CrateDB.
        - name: CRATE_HEAP_SIZE
          value: "256m"
          # The rest of these variables are used in the command-line
          # options.
        - name: EXPECTED_NODES
          value: "3"
        - name: CLUSTER_NAME
          value: "crate-prom"
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: MIN_VCPU_COUNT
          valueFrom:
            resourceFieldRef:
              resource: requests.cpu
              divisor: 1
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
  volumeClaimTemplates:
    # Use persistent storage.
    - metadata:
        name: data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi

Do you know where I can find the community edition for crateDB or do I have to build it myself ( https://crate.io/docs/crate/reference/en/latest/editions.html#community-edition )?

Best,
Fabian Baier

Hi Fabian,
you can certainly build the community edition yourself by using the last link you posted directly from Github. If you raise an issue at https://github.com/crate/crate the developers will certainly look into it.

Best,
Dom

If you’re only using 3 Nodes you could also remove the setting -Clicense.enterprise=false from your configuration and use the enterprise version.

CrateDB 4.0+ by default comes with a trial license that is restricted to up to 3 nodes.