# Consul-catalog migration to 2.x not working

**URL:** <https://community.traefik.io/t/consul-catalog-migration-to-2-x-not-working/6010>\
**Category:** Traefik v2\
**Tags:** docker, consul-catalog\
**Created:** [May 12, 2020, 1:14pm UTC](https://community.traefik.io/t/consul-catalog-migration-to-2-x-not-working/6010 "2020-05-12T13:14:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdubmartins](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/kdubmartins/32/2034_2.png) [@kdubmartins](https://community.traefik.io/u/kdubmartins)\
**Post date:** [May 12, 2020, 1:14pm UTC](https://community.traefik.io/t/consul-catalog-migration-to-2-x-not-working/6010/1 "2020-05-12T13:14:20Z")

</div>

Hi there!

I'm trying to migrate a traefik job on Nomad from 1.7 to 2.2. Here's my current setup:

Traefik receives traffic from the load balancer and checks if the request is addressed to `mydomain.com`. These are the params it receives upon launch:

```auto
args = [
          "traefik",
          "--ping",
          "--api",
          "--consulcatalog=true",
          "--consulcatalog.endpoint=${attr.unique.network.ip-address}:8500",
          "--consulcatalog.domain=mydomain.com",
          "--consulcatalog.constraints=tag==tooling",
          "--consulcatalog.prefix=traefik-frontend-tooling"
        ]

```

Then, I just have a tag on my service that makes it work.

```auto
   service {
        tags = [
          "traefik-frontend-tooling.tags=tooling"

```

Now, when I tried migrating it to 2.2, this is what my traefik job looked like:

```auto
args = [
          "traefik",
          , "--ping"
          , "--api.insecure=true"
          , "--providers.consulcatalog=true"
          , "--providers.consulcatalog.endpoint.address=http://${attr.unique.network.ip-address}:8500"
          , "--providers.consulcatalog.constraints=Tag(`traefik2-frontend-tooling.tags=tooling`)"
          , "--providers.consulcatalog.prefix=traefik2-frontend-tooling"
          , "--entryPoints.web.address=:80"
        ]

```

and now my service contains the tag and the router rule:

```auto

  service {
        tags = [
          "traefik2-frontend-tooling.tags=tooling"
          , "traefik.http.routers.myservice.rule=Host(`myservice.mydomain.com`)"          
        ]

```

When I launched the new jobs I could see in the UI that my service registered in the HTTP Services as I expected, but calls to `atlantis.mydomain.com` were returning 404.

I'm feeling that I'm close to the right config and also that my problem may lie in the use of `--consulcatalog.domain=mydomain.com` in version 1.7. I can't find any equivalents to that in the 2.x documentation.

Anyways, hope this was clear enough and hope to hear from the community soon!  
Cheers

---

<div class="post-metadata">

**Author:** ![kdubmartins](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/kdubmartins/32/2034_2.png) [@kdubmartins](https://community.traefik.io/u/kdubmartins)\
**Post date:** [May 14, 2020, 2:30pm UTC](https://community.traefik.io/t/consul-catalog-migration-to-2-x-not-working/6010/3 "2020-05-14T14:30:11Z")

</div>

FIXED!

This is the config that worked, without needing to change anything on the backend services.

> ```
> args = [
> "traefik",
> "--api.insecure",
> "--providers.consulcatalog.endpoint.address=${attr.unique.network.ip-address}:8500",
> "--providers.consulcatalog.constraints=Tag(`mytagname.tags=value`)",
> "--providers.consulcatalog.defaultrule=Host(`{{ normalize .Name }}.mydomain.com`)"
> ]
> 
> ```

---

<div class="post-metadata">

**Author:** ![taro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/taro/32/2441_2.png) [@taro](https://community.traefik.io/u/taro)\
**Post date:** [August 12, 2020, 9:39pm UTC](https://community.traefik.io/t/consul-catalog-migration-to-2-x-not-working/6010/4 "2020-08-12T21:39:24Z")

</div>

I have an issue too but my issue is just using localhost and pathprefix after port forwarding is not working and my annotations are not working. I am not using nomad. Is the defaultrule host a requirement? "--providers.consulcatalog.defaultrule=Host(`{{ normalize .Name }}.mydomain.com`)"

Also can it be any domain when you set hostname?
