Hello! We are currently trying to run `docker run ...
# gooddata-cn
e
Hello! We are currently trying to run
docker run -i -t -p 3000:3000 -p 5432:5432 -e GDCN_LICENSE_KEY="${GDCN_LICENSE_KEY}" -v gd-volume:/data gooddata/gooddata-cn-ce:latestimage: gooddata/gooddata-cn-ce:3.0
on an M1 Mac and getting this stacktrace and we are unable to get gooddata spun up. Any insight would be much appreciated!
i
Hi Eugene, May I know if this is your initial attempt or if you are trying to update your image to the latest version, please? Also, could you kindly confirm that you have at least 5 GB of RAM and four CPU cores available?
e
We are currently running 2.5.1 so we updated our docker-compose.yaml to the following config
Copy code
gooddata:
    image: gooddata/gooddata-cn-ce:3.0

    environment:
      - LICENSE_AND_PRIVACY_POLICY_ACCEPTED=YES
      - GDCN_PUBLIC_URL=<http://localhost:19900>
      - GDCN_LICENSE_KEY=${GDCN_LICENSE_KEY}

    ports:
      - 19900:3000
      - 19954:5432
    healthcheck:
      test:
        [
          "CMD",
          "curl",
          "-f",
          "--header",
          '"Authorization: Bearer <XXXX>"',
          "<http://localhost:3000/api/v1/profile>",
        ]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 5m
      start_interval: 10s
    networks:
      - api
    depends_on:
      psql:
        condition: service_healthy
    volumes:
      - gd-volume:/data
Also confirming docker resources
Screenshot 2023-12-07 at 10.26.04 AM.png
r
Hi Eugene, the error suggests the container failed to create demo user during startup by calling POST on /api/v1/auth/users. Other messages indicate you're reusing existing volume with data, so I assume the user already exists but check of user existence failed few seconds before. Does this error happen every time? If yes, there's a simple workaround. If you do not need the "demo" user, you may simply disable it by setting env variable
GDCN_DISABLE_DEMO_USER=1
And one more hint - gooddata-cn-ce container has built-in health check that should be automatically consumed by docker-compose. So you don't need custom health check.
🙌 1
e
So I tried it with that config and it does work. but we do still use the demo user for local development. Was there another work around?
i
Hi@Robert Moucha, Any ideas how to keep a demo user and make this work as expected, please?
r
I can't locally reproduce your issue, sorry.
e
Are you on an ARM/Apple chip machine?
r
Not me personally but my colleagues tested it
e
gotcha. just so I'm understanding they were able to run the
$ docker run -i -t -p 3000:3000 -p 5432:5432 -e GDCN_LICENSE_KEY="<license_key>" -v gd-volume:/data gooddata/gooddata-cn-ce:latest
command with no additional config without issue
r
I'm checking the output you sent me. I think the issue is somehow related to port 19900 you're using. I will go deeper.
e
interesting - appreciate it
r
Are you really sure you pass the env
GDCN_PUBLIC_URL=<http://localhost:19900>
correctly? The bootstrap-org script that runs early on boot, should output like:
Copy code
s6-rc: info: service bootstrap-org: starting
+ : 19900
+ : localhost
+ H_JSON='Content-type: application/json'
+ H_GDC_JSON='Content-type: application/vnd.gooddata.api+json'
+ FAKE_HOST='X-Forwarded-Host: localhost:19900'
...more lines...
But your outpu says
Copy code
+ : 3000
...
+ FAKE_HOST='X-Forwarded-Host: localhost:3000'
Please check the real values in
Config.Env
array using
docker container inspect
command (or double check you passed the env variable correctly when starting container).
e
Copy code
"Config": {
            "Hostname": "607e362487e7",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "3000/tcp": {},
                "5432/tcp": {},
                "8079/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "GDCN_LICENSE_KEY=key/xxx",
                "LICENSE_AND_PRIVACY_POLICY_ACCEPTED=YES",
                "GDCN_PUBLIC_URL=<http://localhost:19900>",
                "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANG=C.UTF-8",
                "GPG_KEY=xxx",
                "PYTHON_VERSION=3.11.6",
                "PYTHON_PIP_VERSION=23.2.1",
                "PYTHON_SETUPTOOLS_VERSION=65.5.1",
                "PYTHON_GET_PIP_URL=<https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py>",
                "PYTHON_GET_PIP_SHA256=xxx",
                "DEMO=true",
                "S6_BEHAVIOUR_IF_STAGE2_FAILS=2",
                "S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0",
                "S6_STAGE2_HOOK=/opt/scripts/stage2-hook.sh",
                "ALLOW_REDIRECT_URL=<http://localhost:8443>",
                "GDCN_TOKEN_SECRET=admin123",
                "GDCN_ENABLE_CSV_EXPORT_API=1",
                "GDCN_ENABLE_ARROW=1",
                "GDCN_DISABLE_DEMO_USER=0",
                "GDC_FEATURES_VALUES_ENABLE_ANALYTICAL_DASHBOARD_PERMISSIONS=true",
                "GDC_FEATURES_VALUES_ENABLE_COMPOSITE_GRAIN=false",
                "GDC_FEATURES_VALUES_ENABLE_PDM_REMOVAL_DEPRECATION_PHASE=true",
                "JAVA_OPTS=-Xmx256m -Xms128m -XX:+UseStringDeduplication -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled -XX:+ExitOnOutOfMemoryError",
                "METADATA_API_JAVA_OPTS=-Xmx384m -Xms128m -XX:+UseStringDeduplication -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled -XX:+ExitOnOutOfMemoryError",
                "APP_LOGLEVEL=WARN",
                "PULSAR_LOGLEVEL=WARN"
            ],

...
            "Ports": {
                "3000/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "19900"
                    }
                ],
                "5432/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "19954"
                    }
                ],
                "8079/tcp": null
            },
@Manuel Cintron is my colleague that is also on this server. if you have any other suspicions please let us know and we'll investigate on our end as well
m
Following up on this I was able to reproduce the issue on my end. However setting
GDCN_DISABLE_DEMO_USER: 1
does indeed get image to eventually start. As far as I can tell when the demo user creation is enabled the
/opt/bootstrap/bootstrap.sh
script is failing when calling the
make_dex_user
function. The API is not returning a json with an
authenticationId
but rather returning this error message
{"title":"Forbidden","status":403,"detail":"License is not valid. Reason: License doesn't allow running CE image","traceId":"20783f834def6dee"}
. Trying to perform api calls from the host machine to
localhost:3000
using the bootstrap token also fail with the same error message. I would assume then that the issue is likely that our current GD CN key is not enabled to be used with CE. Heres the compose file I used to reproduce it. This was tested with new volumes every time to ensure no carryover state from previous runs
Copy code
version: '3.7'

services:
  gooddata-cn-ce:
    image: gooddata/gooddata-cn-ce:3.1.0
    environment:
      LICENSE_AND_PRIVACY_POLICY_ACCEPTED: "YES"
      GDCN_DISABLE_DEMO_USER: 1
      GDCN_LICENSE_KEY: "key/eyJ...RzQ=="
    volumes:
      - "gd-cn-data:/data:rw"
volumes:
  gd-cn-data:
r
Sorry for late response, I was out of office. As you correctly pointed out, the license key for GoodData CN does not work with Container Edition (CE). Please contact our Sales team for options how to get CE license key.