Skip to content

Can't run the getting-started-todo-app #21856

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

Closed
1 task done
VuHoangTri opened this issue Jan 20, 2025 · 3 comments
Closed
1 task done

Can't run the getting-started-todo-app #21856

VuHoangTri opened this issue Jan 20, 2025 · 3 comments
Labels
area/get-started Relates to get started and onboarding docs lifecycle/stale status/triage Needs triage

Comments

@VuHoangTri
Copy link

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

The app return 502 when use docker cli in ubuntu wsl run this app.

Location

https://docs.docker.com/get-started/introduction/develop-with-containers/

Suggestion

No response

@VuHoangTri VuHoangTri added the status/triage Needs triage label Jan 20, 2025
@craig-osterhout craig-osterhout added the area/get-started Relates to get started and onboarding docs label Jan 22, 2025
@docker-robot
Copy link

docker-robot bot commented Apr 22, 2025

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@Wryhder
Copy link

Wryhder commented May 12, 2025

I also had this issue. Restarting the backend container (docker compose restart backend) fixed it.

For reference, here's the output of a couple of commands before restarting:

$ docker compose ps
NAME                                    IMAGE                              COMMAND                  SERVICE      CREATED      STATUS      PORTS
getting-started-todo-app-backend-1      getting-started-todo-app-backend   "docker-entrypoint.s…"   backend      3 days ago   Up 3 days
getting-started-todo-app-client-1       getting-started-todo-app-client    "docker-entrypoint.s…"   client       3 days ago   Up 3 days
getting-started-todo-app-mysql-1        mysql:8.0                          "docker-entrypoint.s…"   mysql        3 days ago   Up 3 days   3306/tcp, 33060/tcp
getting-started-todo-app-phpmyadmin-1   phpmyadmin                         "/docker-entrypoint.…"   phpmyadmin   3 days ago   Up 3 days   80/tcp
getting-started-todo-app-proxy-1        traefik:v2.11                      "/entrypoint.sh --pr…"   proxy        3 days ago   Up 3 days   0.0.0.0:80->80/tcp

$ docker compose logs backend
backend-1  | yarn run v1.22.22
backend-1  | warning package.json: No license field
backend-1  | $ nodemon src/index.js
backend-1  | [nodemon] 3.0.3
backend-1  | [nodemon] to restart at any time, enter `rs`
backend-1  | [nodemon] watching path(s): *.*
backend-1  | [nodemon] watching extensions: js,mjs,cjs,json
backend-1  | [nodemon] starting `node src/index.js`
backend-1  | Waiting for mysql:3306............
backend-1  | Timeout
backend-1  | Error: connect ECONNREFUSED [INTERNAL-IP]:3306
backend-1  |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
backend-1  |   errno: -111,
backend-1  |   code: 'ECONNREFUSED',
backend-1  |   syscall: 'connect',
backend-1  |   address: '[INTERNAL-IP]',
backend-1  |   port: 3306,
backend-1  |   fatal: true
backend-1  | }
backend-1  | [nodemon] app crashed - waiting for file changes before starting...

After restarting:

$ docker compose logs backend
backend-1  | yarn run v1.22.22
backend-1  | warning package.json: No license field
backend-1  | $ nodemon src/index.js
backend-1  | [nodemon] 3.0.3
backend-1  | [nodemon] to restart at any time, enter `rs`
backend-1  | [nodemon] watching path(s): *.*
backend-1  | [nodemon] watching extensions: js,mjs,cjs,json
backend-1  | [nodemon] starting `node src/index.js`
backend-1  | Waiting for mysql:3306............
backend-1  | Timeout
backend-1  | Error: connect ECONNREFUSED [INTERNAL-IP]:3306
backend-1  |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
backend-1  |   errno: -111,
backend-1  |   code: 'ECONNREFUSED',
backend-1  |   syscall: 'connect',
backend-1  |   address: [INTERNAL-IP],
backend-1  |   port: 3306,
backend-1  |   fatal: true
backend-1  | }
backend-1  | [nodemon] app crashed - waiting for file changes before starting...
backend-1  | yarn run v1.22.22
backend-1  | warning package.json: No license field
backend-1  | $ nodemon src/index.js
backend-1  | [nodemon] 3.0.3
backend-1  | [nodemon] to restart at any time, enter `rs`
backend-1  | [nodemon] watching path(s): *.*
backend-1  | [nodemon] watching extensions: js,mjs,cjs,json
backend-1  | [nodemon] starting `node src/index.js`
backend-1  | Waiting for mysql:3306.
backend-1  | Connected!
backend-1  | Connected to mysql db at host mysql
backend-1  | Listening on port 3000

@VuHoangTri
Copy link
Author

I also had this issue. Restarting the backend container (docker compose restart backend) fixed it.

For reference, here's the output of a couple of commands before restarting:

$ docker compose ps
NAME                                    IMAGE                              COMMAND                  SERVICE      CREATED      STATUS      PORTS
getting-started-todo-app-backend-1      getting-started-todo-app-backend   "docker-entrypoint.s…"   backend      3 days ago   Up 3 days
getting-started-todo-app-client-1       getting-started-todo-app-client    "docker-entrypoint.s…"   client       3 days ago   Up 3 days
getting-started-todo-app-mysql-1        mysql:8.0                          "docker-entrypoint.s…"   mysql        3 days ago   Up 3 days   3306/tcp, 33060/tcp
getting-started-todo-app-phpmyadmin-1   phpmyadmin                         "/docker-entrypoint.…"   phpmyadmin   3 days ago   Up 3 days   80/tcp
getting-started-todo-app-proxy-1        traefik:v2.11                      "/entrypoint.sh --pr…"   proxy        3 days ago   Up 3 days   0.0.0.0:80->80/tcp

$ docker compose logs backend
backend-1  | yarn run v1.22.22
backend-1  | warning package.json: No license field
backend-1  | $ nodemon src/index.js
backend-1  | [nodemon] 3.0.3
backend-1  | [nodemon] to restart at any time, enter `rs`
backend-1  | [nodemon] watching path(s): *.*
backend-1  | [nodemon] watching extensions: js,mjs,cjs,json
backend-1  | [nodemon] starting `node src/index.js`
backend-1  | Waiting for mysql:3306............
backend-1  | Timeout
backend-1  | Error: connect ECONNREFUSED [INTERNAL-IP]:3306
backend-1  |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
backend-1  |   errno: -111,
backend-1  |   code: 'ECONNREFUSED',
backend-1  |   syscall: 'connect',
backend-1  |   address: '[INTERNAL-IP]',
backend-1  |   port: 3306,
backend-1  |   fatal: true
backend-1  | }
backend-1  | [nodemon] app crashed - waiting for file changes before starting...

After restarting:

$ docker compose logs backend
backend-1  | yarn run v1.22.22
backend-1  | warning package.json: No license field
backend-1  | $ nodemon src/index.js
backend-1  | [nodemon] 3.0.3
backend-1  | [nodemon] to restart at any time, enter `rs`
backend-1  | [nodemon] watching path(s): *.*
backend-1  | [nodemon] watching extensions: js,mjs,cjs,json
backend-1  | [nodemon] starting `node src/index.js`
backend-1  | Waiting for mysql:3306............
backend-1  | Timeout
backend-1  | Error: connect ECONNREFUSED [INTERNAL-IP]:3306
backend-1  |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
backend-1  |   errno: -111,
backend-1  |   code: 'ECONNREFUSED',
backend-1  |   syscall: 'connect',
backend-1  |   address: [INTERNAL-IP],
backend-1  |   port: 3306,
backend-1  |   fatal: true
backend-1  | }
backend-1  | [nodemon] app crashed - waiting for file changes before starting...
backend-1  | yarn run v1.22.22
backend-1  | warning package.json: No license field
backend-1  | $ nodemon src/index.js
backend-1  | [nodemon] 3.0.3
backend-1  | [nodemon] to restart at any time, enter `rs`
backend-1  | [nodemon] watching path(s): *.*
backend-1  | [nodemon] watching extensions: js,mjs,cjs,json
backend-1  | [nodemon] starting `node src/index.js`
backend-1  | Waiting for mysql:3306.
backend-1  | Connected!
backend-1  | Connected to mysql db at host mysql
backend-1  | Listening on port 3000

That's good observation. Thank you, I will try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/get-started Relates to get started and onboarding docs lifecycle/stale status/triage Needs triage
Projects
None yet
Development

No branches or pull requests

3 participants