Router defined multiple times

I can imagine that there are a lot of these issues but this one is really strange or Iam completey missing something simple.

I really did check every similiar topic here and on github but this I could not resemble.

I have two container running (I have more than two but this issue will concentrate on those two):

PaperMerge and ContainerNursery. Traefik is of the opinion that both container have router labels.

Traefik Log:

level=error msg="Router defined <mark>multiple</mark> times with different configurations in [ContainerNursery-dce6272062a828f5052edf2744df260e5b4983cd0928b6a660d7bf369506bf84 papermerge-b38c9135bc6102714cf8fddc18d350e2ac33e90fd498863daceb989567bb9c64]" routerName=papermerge providerName=docker

But there is really no traefik label in the papermerge container:

# docker inspect papermerge
[
    {
        "Id": "b38c9135bc6102714cf8fddc18d350e2ac33e90fd498863daceb989567bb9c64",
		... omitted ...
            "Labels": {
                "build_version": "Linuxserver.io version:- v2.0.1-ls22 Build-date:- 2021-10-15T06:10:55+02:00",
                "maintainer": "alex-phillips",
                "net.unraid.docker.icon": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/papermerge-icon.png",
                "net.unraid.docker.managed": "dockerman",
                "net.unraid.docker.webui": "http://[IP]:[PORT:8000]",
                "org.opencontainers.image.authors": "linuxserver.io",
                "org.opencontainers.image.created": "2021-10-15T06:10:55+02:00",
                "org.opencontainers.image.description": "[Papermerge](https://www.papermerge.com/) is an open source document management system (DMS) primarily designed for archiving and retrieving your digital documents. Instead of having piles of paper
 documents all over your desk, office or drawers - you can quickly scan them and configure your scanner to directly upload to Papermerge DMS.  ",
                "org.opencontainers.image.documentation": "https://docs.linuxserver.io/images/docker-papermerge",
                "org.opencontainers.image.licenses": "GPL-3.0-only",
                "org.opencontainers.image.ref.name": "821cbaf11cfa4508253380a3e680fc4d5b93b18f",
                "org.opencontainers.image.revision": "821cbaf11cfa4508253380a3e680fc4d5b93b18f",
                "org.opencontainers.image.source": "https://github.com/linuxserver/docker-papermerge",
                "org.opencontainers.image.title": "Papermerge",
                "org.opencontainers.image.url": "https://github.com/linuxserver/docker-papermerge/packages",
                "org.opencontainers.image.vendor": "linuxserver.io",
                "org.opencontainers.image.version": "v2.0.1-ls22"
            }

# docker inspect ContainerNursery
[
    {
        "Id": "dce6272062a828f5052edf2744df260e5b4983cd0928b6a660d7bf369506bf84",
		... omitted ...
            "Labels": {
                "net.unraid.docker.icon": "https://raw.githubusercontent.com/ItsEcholot/ContainerNursery/main/logo512.png",
                "net.unraid.docker.managed": "dockerman",
                "traefik.http.routers.dozzle.entrypoints": "https",
                "traefik.http.routers.dozzle.middlewares": "authelia@docker",
                "traefik.http.routers.dozzle.rule": "Host(`dozzle.*`)",
                "traefik.http.routers.dozzle.tls": "true",
                "traefik.http.routers.krusader.entrypoints": "https",
                "traefik.http.routers.krusader.rule": " Host(`krusader.*`)",
                "traefik.http.routers.krusader.tls": "true",
                "traefik.http.routers.papermerge.entrypoints": "https",
                "traefik.http.routers.papermerge.middlewares": "authelia@docker",
                "traefik.http.routers.papermerge.rule": "Host(`pm.*`)",
                "traefik.http.routers.papermerge.tls": "true",
                "traefik.http.routers.snippet.entrypoints": "https",
                "traefik.http.routers.snippet.rule": " Host(`snippet.*`)",
                "traefik.http.routers.snippet.tls": "true"
            }
        }
]

Hello @ckocyigit and thanks for your interest in Traefik,

Have you enabled the exposeByDefault option? (Docker - Traefik)

If that's the case, Traefik will create a router by default for the papermerge container, and by default its name will be the name of the container (in this case it's maybe papermerge, see Docker - Traefik).

As you are also creating a router named papermerge through the labels on the ContainerNursery, then you will have two routers with the same name and that's why the conflict error is raised.

To fix the issue, you can disable the router creation on the papermerge container by adding the traefik.enable=false to the papermerge container as explained in the documentation.

Hope this helps!

Hello @kevinpollet,

exposeByDefault was not set in the static Traefik.yml and I guess default would be false but labeling the papermerge container with traefik.enable=false did do the trick. My nextcloud router name and the nextcloud container name also match so it should have been happening here too right?, I don't know exactly what I've learned from this :smiley: but many thanks it worked for the time being.

Thanks again for the time, I really appreciate it :smiley:

1 Like

exposeByDefault was not set in the static Traefik.yml and I guess default would be false but labeling the papermerge container with traefik.enable=false did do the trick

As described in the documentation the default value for exposeByDefault is true (see Traefik Docker Documentation - Traefik).

My nextcloud router name and the nextcloud container name also match so it should have been happening here too right?

If the router configuration labels are not set on the nexcloud container, a conflict error should have been raised.

If everything is working as expected, could you mark the topic as solved?

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