dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
802 stars 460 forks source link

dotCMS-dev latest nightly exits without error #28983

Closed sfreudenthaler closed 2 days ago

sfreudenthaler commented 4 days ago

Parent Issue

No response

Problem Statement

Using the documentation , and the latest nightly build, the containers fails and exit without error.

Steps to Reproduce

Follow the instructions on the readme, and the [latest nightly build).

TL;DR: with docker installed and running locally...

docker run --rm \
--pull always \
-p 8082:8082 \
-p 8443:8443 \
-v $PWD/data:/data \
-e DOTCMS_SOURCE_ENVIRONMENT=https://demo.dotcms.com \
-e DOTCMS_USERNAME_PASSWORD="admin@dotcms.com:admin" \
 dotcms/dotcms-dev:nightly

In depending on when this gets picked up we can target the specific nightly that was failing when @prestonso reported.

docker run --rm \
--pull always \
-p 8082:8082 \
-p 8443:8443 \
-v $PWD/data:/data \
-e DOTCMS_SOURCE_ENVIRONMENT=https://demo.dotcms.com/ \
-e DOTCMS_USERNAME_PASSWORD="admin@dotcms.com:admin" \
 dotcms/dotcms-dev:nightly_2181d4a

Acceptance Criteria

  1. documentation referenced in the readme should work. dotCMS should start, run, and accept connections on https://local.dotcms.site:8443/dotAdmin should work with the dotCMS login page.
  2. Should test for this in the nightly build steps

dotCMS Version

nightly build in Docker dotcms/dotcms-dev:nightly_2181d4a

Proposed Objective

Reliability

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

Source: Note in Slack

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

sfreudenthaler commented 4 days ago

confirmed

  1. reproduction of the issue
  2. issue also there in the debug steps (makes sense given it's the same command/image)
  3. that the latest 24.04 lts image from six days ago does not have the same issue

Failing on nightly builds starts with nightly_f036143 published June 18, 2024 at 01:03

sfreudenthaler commented 4 days ago

observation shows it dying soon after port 8082 is exposed.

prestonso commented 4 days ago

Thanks for taking this on!

sfreudenthaler commented 4 days ago

Looks like the culprit is #28868

@spbolton's given me a very helpful summary and solution in the #guild-dev-pipeline slack channel

sfreudenthaler commented 4 days ago

Thanks for taking this on!

@prestonso can confirm that the docs won't need to change. We'll fix it in the underling code 😄

spbolton commented 4 days ago

@prestonso @sfreudenthaler Note: As a workaround for the failing images adding "dotcms" to the docker run command should make it work. e.g.

--pull always \
-p 8082:8082 \
-p 8443:8443 \
-v $PWD/data:/data \
-e DOTCMS_SOURCE_ENVIRONMENT=https://demo.dotcms.com/ \
-e DOTCMS_USERNAME_PASSWORD="admin@dotcms.com:admin" \
 dotcms/dotcms-dev:nightly_2181d4a dotcms
sfreudenthaler commented 4 days ago

@prestonso @sfreudenthaler Note: As a workaround for the failing images adding "dotcms" to the docker run command should make it work. e.g.

--pull always \
-p 8082:8082 \
-p 8443:8443 \
-v $PWD/data:/data \
-e DOTCMS_SOURCE_ENVIRONMENT=https://demo.dotcms.com/ \
-e DOTCMS_USERNAME_PASSWORD="admin@dotcms.com:admin" \
 dotcms/dotcms-dev:nightly_2181d4a dotcms

Work around doesn't do the trick. I'll focus on the fix. In the meantime you could use the image from 8 days ago (dotcms/dotcms-dev:nightly_a66d047)

sfreudenthaler commented 1 day ago

ok so fix works as expected, but there's been a regression somewhere else with the command. Specifically, with pulling from https://demo.dotcms.com. It 404s

docker run --rm \
--pull always \
-p 8082:8082 \
-p 8443:8443 \
-v $PWD/data:/data \
-e DOTCMS_SOURCE_ENVIRONMENT=https://demo.dotcms.com/ \
-e DOTCMS_USERNAME_PASSWORD="admin@dotcms.com:admin" \
 dotcms/dotcms-dev:latest
latest: Pulling from dotcms/dotcms-dev
Digest: sha256:da1fcbb288cb62b3711211603b5c3eeb109e2930b0efbcfbee9f55f833e1a196
Status: Image is up to date for dotcms/dotcms-dev:latest
Pulling Environment from https://demo.dotcms.com/
- Using Authorization: Basic
- Downloading ASSETS
--2024-06-27 12:53:19--  https://demo.dotcms.com//api/v1/maintenance/_downloadAssets?oldAssets=false
Resolving demo.dotcms.com (demo.dotcms.com)... 3.143.180.232, 3.130.12.141
Connecting to demo.dotcms.com (demo.dotcms.com)|3.143.180.232|:443... connected.
HTTP request sent, awaiting response... 404
2024-06-27 12:53:19 ERROR 404: (no description).

FYI @prestonso, looks like it might be a different issue since it's also failing on older nightlys now. The workaround at the moment is to omit the envvar overrides on the docker run command. This one works

docker run --rm \
--pull always \
-p 8082:8082 \
-p 8443:8443 \
-v $PWD/data:/data \
 dotcms/dotcms-dev:latest
sfreudenthaler commented 1 day ago

ok so fix works as expected, but there's been a regression somewhere else with the command. Specifically, with pulling from https://demo.dotcms.com. It 404s

docker run --rm \
--pull always \
-p 8082:8082 \
-p 8443:8443 \
-v $PWD/data:/data \
-e DOTCMS_SOURCE_ENVIRONMENT=https://demo.dotcms.com/ \
-e DOTCMS_USERNAME_PASSWORD="admin@dotcms.com:admin" \
 dotcms/dotcms-dev:latest
latest: Pulling from dotcms/dotcms-dev
Digest: sha256:da1fcbb288cb62b3711211603b5c3eeb109e2930b0efbcfbee9f55f833e1a196
Status: Image is up to date for dotcms/dotcms-dev:latest
Pulling Environment from https://demo.dotcms.com/
- Using Authorization: Basic
- Downloading ASSETS
--2024-06-27 12:53:19--  https://demo.dotcms.com//api/v1/maintenance/_downloadAssets?oldAssets=false
Resolving demo.dotcms.com (demo.dotcms.com)... 3.143.180.232, 3.130.12.141
Connecting to demo.dotcms.com (demo.dotcms.com)|3.143.180.232|:443... connected.
HTTP request sent, awaiting response... 404
2024-06-27 12:53:19 ERROR 404: (no description).

FYI @prestonso, looks like it might be a different issue since it's also failing on older nightlys now. The workaround at the moment is to omit the envvar overrides on the docker run command. This one works

docker run --rm \
--pull always \
-p 8082:8082 \
-p 8443:8443 \
-v $PWD/data:/data \
 dotcms/dotcms-dev:latest

confirmed the docs are right in https://github.com/dotCMS/core/tree/master/docker/dev-env. The command to run in the description of the ticket had an extra / in the DOTCMS_SOURCE_ENVIRONMENT value.

Change is good and confirmed working