Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore] Unable to run app using Codespaces Instructions #449

Open
1 of 2 tasks
DanWahlin opened this issue Mar 7, 2024 · 6 comments
Open
1 of 2 tasks

[Chore] Unable to run app using Codespaces Instructions #449

DanWahlin opened this issue Mar 7, 2024 · 6 comments
Assignees
Labels
scope: cms scope: setup Taks relative to project setup

Comments

@DanWahlin
Copy link
Collaborator

Are you accessing the project from the GitHub Codespaces?

  • No, I am running the project on my local machine (I will fill in the OS section below)
  • Yes, I am using GitHub Codespaces.

Describe the bug

Not all of the servers start. I'm seeing this in the logs after running npm install && npm start in the codespace:

[services] postgres_setup-1  | PostgreSQL Database restored successfully
[services] postgres_setup-1 exited with code 0
[services] blog-1            | TypeError: fetch failed
[services] blog-1            |     at Object.fetch (node:internal/deps/undici/undici:11731:11)
[services] blog-1            |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[services] blog-1            |   cause: Error: getaddrinfo ENOTFOUND blog-cms
[services] blog-1            |       at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
[services] blog-1            |       at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
[services] blog-1            |     errno: -3008,
[services] blog-1            |     code: 'ENOTFOUND',
[services] blog-1            |     syscall: 'getaddrinfo',
[services] blog-1            |     hostname: 'blog-cms'
[services] blog-1            |   }
[services] blog-1            | }
[services] blog-1            | [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
[services] blog-1            |   digest: '2178396693'
[services] blog-1            | }
[services] blog-1            | TypeError: fetch failed
[services] blog-1            |     at Object.fetch (node:internal/deps/undici/undici:11731:11)
[services] blog-1            |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[services] blog-1            |   cause: Error: getaddrinfo ENOTFOUND blog-cms
[services] blog-1            |       at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
[services] blog-1            |       at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
[services] blog-1            |     errno: -3008,
[services] blog-1            |     code: 'ENOTFOUND',
[services] blog-1            |     syscall: 'getaddrinfo',
[services] blog-1            |     hostname: 'blog-cms'
[services] blog-1            |   }
[services] blog-1            | }
[services] blog-1            | [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
[services] blog-1            |   digest: '2178396693'
[services] blog-1            | }
[services] blog-1            | TypeError: fetch failed
[services] blog-1            |     at Object.fetch (node:internal/deps/undici/undici:11731:11)
[services] blog-1            |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[services] blog-1            |   cause: Error: getaddrinfo ENOTFOUND blog-cms
[services] blog-1            |       at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
[services] blog-1            |       at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
[services] blog-1            |     errno: -3008,
[services] blog-1            |     code: 'ENOTFOUND',
[services] blog-1            |     syscall: 'getaddrinfo',
[services] blog-1            |     hostname: 'blog-cms'
[services] blog-1            |   }
[services] blog-1            | }
[services] blog-1            | [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
[services] blog-1            |   digest: '2178396693'
[services] blog-1            | }

To Reproduce
Steps to reproduce the behavior:

  1. Go to Codespace
  2. Type in command npm install && npm start
  3. View log errors

Expected behavior
Expected all services to start

OS (please complete the following information):

  • OS: MacOS
  • OS Version: Sonoma
  • npm version: 9.5.0 (codespaces version)
  • Node.js version: 18.15.0 (codespaces version)
  • output of azd version: 1.6.1 (commit eba2c978b5443fdb002c95add4011d9e63c2e76f) - (codespaces version)
@manekinekko manekinekko added scope: setup Taks relative to project setup and removed status: needs triage labels Mar 8, 2024
@juliamuiruri4
Copy link
Collaborator

Facing same issue, though this just affects the blog cms service

@ZedFarNl
Copy link

encounter the same issue in codespace

@DanWahlin
Copy link
Collaborator Author

Thanks for the information @ZedFarNl and sorry you’re hitting an issue here. Are you seeing the exact same error message as above or something different? If you can share the specific error that would be helpful.

//cc @manekinekko and @anfibiacreativa

@anfibiacreativa
Copy link
Member

Thank you for reporting! We will be prioritizing this issue.

@manekinekko
Copy link
Collaborator

I've traced this issue and found the problem. It seems to be related to strapi/strapi#12493 that prevents the CMS from starting, which explain why we are getting a 503. Since the Blog depends on the CMS, it's also impacted, hence the Error: getaddrinfo ENOTFOUND blog-cms error.

In the meantime, in order to unblock everyone, I've disabled this configuration in the Docker compose file untill the Strapi issue is fixed.

image
image
image

Note: the broken images in Blog are an expected result for now, because the db restore script contains image links that were hosted on Azure when the original db dump has been made. This can be improved in a separate PR if someone wants to take a shot and clean the db script.

@manekinekko
Copy link
Collaborator

Updates: I kept looking at this issue, and it seems that the CMS server fails to start randomly, I assuming this is because of some race condition issues when starting all containers at once. To fix this for now, please restart the CMS container and the server should start:

docker compose restart blog-cms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: cms scope: setup Taks relative to project setup
Projects
None yet
Development

No branches or pull requests

5 participants