# Unable to connect to my app

**URL:** <https://community.traefik.io/t/unable-to-connect-to-my-app/19014>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [June 20, 2023, 10:37am UTC](https://community.traefik.io/t/unable-to-connect-to-my-app/19014 "2023-06-20T10:37:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![slewinus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/slewinus/32/7145_2.png) [@slewinus](https://community.traefik.io/u/slewinus)\
**Post date:** [June 20, 2023, 10:37am UTC](https://community.traefik.io/t/unable-to-connect-to-my-app/19014/1 "2023-06-20T10:37:12Z")

</div>

Hello,

I'm new to docker and traefik. I'm trying to run node red via docker compose. I've added the labels and don't see any errors in the logs but when I try to connect via internet, the page displays :

This site can’t be reached

```auto
`nodered. ******.fr refused to connect.`

`Try:`

* `Checking the connection`
* `Checking the proxy and the firewall`

`ERR_CONNECTION_REFUSED`

```

and I don't understand why. Here is my compose docker for traefik and the one for my nodered :

nodered.yml :

```auto
`version: '3.8'`

`services:`

`node-red:`

`image: nodered/node-red:latest-12-minimal`

`container_name: nodered`

`user: root`

`labels:`

`- "traefik.enable=true"`

`- "traefik.http.routers.node.rule=Host(\`nodered.local`)"`

`- "traefik.http.routers.node.entrypoints=websecure"`

`- "traefik.http.routers.node.tls.certresolver=le"`

`networks:`

`- network-nodered`

`- web`

`volumes:`

`- ./nodered_data:/data`

`restart: unless-stopped`

`networks:`

`network-nodered:`

`web:`

`external:`

`name: web`

```

traefik. yml :

```auto
`version: '3'`

`services:`

`reverse-proxy:`

`image: traefik:v2.9`

`container_name: traefik`

`ports:`

`- "80:80"`

`- "443:443"`

`- "8080:8080"`

`volumes:`

`- /var/run/docker.sock:/var/run/docker.sock`

`- $PWD/traefik.toml:/etc/traefik/traefik.toml`

`- ./acme.json:/acme.json`

`restart: always`

`networks:`

`- web`

`networks:`

`web:`

`external: true`

```

(my firewall ports are open)

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [June 20, 2023, 12:33pm UTC](https://community.traefik.io/t/unable-to-connect-to-my-app/19014/2 "2023-06-20T12:33:37Z")

</div>

You normally can not use a local domain like `nodered.local` with LetsEncrypt, as that domain can not be validated.

Share you Traefik static and dynamic config, and `docker-compose.yml` if used. Use 3 backticks in front and after code, or select the code and use the `</>` button.

Check a [simple Traefik example](https://github.com/bluepuma77/traefik-best-practice/tree/main/docker-traefik-dashboard-letsencrypt).

---

<div class="post-metadata">

**Author:** ![slewinus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/slewinus/32/7145_2.png) [@slewinus](https://community.traefik.io/u/slewinus)\
**Post date:** [June 20, 2023, 7:32pm UTC](https://community.traefik.io/t/unable-to-connect-to-my-app/19014/3 "2023-06-20T19:32:20Z")

</div>

Hello,

Node red.local was for testing, it's normally noter.\*\*\*.fr.

Here is my traefik. toml :

```auto
[api]
  dashboard = true
  insecure = true

[entryPoints]
  [entryPoints.web]
    address = ":80"
    [entryPoints.web.http]
      [entryPoints.web.http.redirections]
        [entryPoints.web.http.redirections.entryPoint]
          to = "websecure"
          scheme = "https"
          permanent = true

  [entryPoints.websecure]
    address = ":443"
      [entryPoints.websecure.http.tls]
        certResolver = "default"

[providers]
  [providers.docker]
    watch = true
    exposedByDefault = false
    network = "web"

[certificatesResolvers]
  [certificatesResolvers.le]
    [certificatesResolvers.le.acme]
      email = "contact@superman.com"
      storage = "acme.json"
      caServer = "https://acme-v01.api.letsencrypt.org/directory"
    [certificatesResolvers.le.acme.tlsChallenge]

```

and my docker-compose.yml :

```auto

version: '3'

services:
  reverse-proxy:
    image: traefik:v2.9
    container_name: traefik
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - $PWD/traefik.toml:/etc/traefik/traefik.toml
      - ./acme.json:/acme.json
    restart: always
    networks:
      - web

networks:
  web:
    external: true

```

i also find this error :

`traefik | time="2023-06-20T19:25:00Z" level=error msg="Unable to obtain ACME certificate for domains \"nodered.****.fr\": unable to generate a certificate for the domains [nodered.****.fr]: error: one or more domains had a problem:\n[nodered.*****.fr] acme: error: 400 :: urn:ietf:params:acme:error:connection :: 82.***.***.125: Error getting validation data\n" routerName=node@docker rule="Host(`nodered.\*\*\*\*\*.fr`)" providerName=le.acme ACME CA="https://acme-v02.api.letsencrypt.org/directory"`

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [June 21, 2023, 4:49am UTC](https://community.traefik.io/t/unable-to-connect-to-my-app/19014/4 "2023-06-21T04:49:23Z")

</div>

Seems your sub-domain can be resolved to IP, but it can’t be connected to.

The IP could be wrong or a firewall is in the way.

---

<div class="post-metadata">

**Author:** ![slewinus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/slewinus/32/7145_2.png) [@slewinus](https://community.traefik.io/u/slewinus)\
**Post date:** [June 21, 2023, 7:55am UTC](https://community.traefik.io/t/unable-to-connect-to-my-app/19014/5 "2023-06-21T07:55:25Z")

</div>

Hello again,

I found the error, I had the wrong ip address when creating my subdomain...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [June 24, 2023, 7:55am UTC](https://community.traefik.io/t/unable-to-connect-to-my-app/19014/6 "2023-06-24T07:55:35Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
