Consul-catalog migration to 2.x not working

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 These are the params it receives upon launch:

args = [

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

   service {
        tags = [

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

args = [
          , "--ping"
          , "--api.insecure=true"
          , "--providers.consulcatalog=true"
          , "--providers.consulcatalog.endpoint.address=http://${}: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:

  service {
        tags = [
          , "traefik.http.routers.myservice.rule=Host(``)"          

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 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 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!


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

    args = [
      "--providers.consulcatalog.defaultrule=Host(`{{ normalize .Name }}`)"
1 Like

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 }}"

Also can it be any domain when you set hostname?