Hi,
I'm trying to get the crowdsec middleware plugin to work on my Traefik 2.11.2 installation.
Already when defining the plugin in my static configuration and restarting Traefik as such:
unable to download plugin github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin: error : 500, Failed to get plugin github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin@v1.3.0
This is even without using the actual plugin in any dynamic configuration. When I try that, the dynamic configuration fails and goes red in the dashboard:
invalid middleware "crowdsec-media@file" configuration: invalid middleware type or middleware does not exist
I understood from previous posts that the plugin download system can getcongested sometimes? Is this the case? I have tried multiple times, but no luck.
The used docker-compose looks as follows:
I wonder whether that is the problem. I have actually tried both cases.
The thing is, the least I need to run the Traefik container in host mode, as I need to map multiple physical addresses to Traefik to be able to use TCP Routes (behind which I host a number of external webapps that use Windows authentication, external to Docker, that is).
I have had the crowdsec container in it's own docker container, but that resulted in the exact same error.
In any case, my suspicion is that the error shown has more to do with downloading the plugin from Github than my actual docker configuration.
Let me see if I can spin this up on another host. The crappy thing is, that I have configured it all on an Ubuntu host, which turns out to run snap (!) docker...
-EDIT 1 (there will be more )-
Set it up on another physical host using non-snap docker and that fails as well, exact same error as described.
Now I do see that you are using a slightly different network config than I am. I'll see whether I can emulate that and then test.
-EDIT 2- @bluepuma77, many thanks for your help, but even when emulating the configuration that you are proposing, I am still getting the error 500 when trying to download the plugin. For the life of me I cannot imagine why...
time="2024-05-16T21:42:19+02:00" level=debug msg="loading of plugin: bouncer: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin@1.3.0"
time="2024-05-16T21:42:20+02:00" level=error msg="Plugins are disabled because an error has occurred." error="unable to set up plugins environment: unable to download plugin github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin: error: 500: {\"error\":\"Failed to get plugin github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin@1.3.0\"}\n"
Well, I'll look into that. Means that I'll have to deploy a whole new vm running Debian. That'll be for the week-end. It sure is finicky.
Are there Traefik staff or mods around to shed some light in this error 500?
@ldez, any common issues that I might look into? Can you give a n example of the exact url that is being tried to call? I have Pi-Hole running, might that be an issue?
-EDIT-
Just to be sure, disabled Pi-hole, but no dice...
'course... could have thought about that myself... grmbl...
I'll check.. @bluepuma77, works in the Traefik container, no problem.
What is the call used to retrieve the plugin via the traefik plugin directory? Because I believe the call is being directed there and I suspect an error over there. I have been browsing the traefik code to see whether I can find the URL being used, but wasn't able to find it.
-EDIT-
Also tried
wget https://plugins.traefik.io/... etc.
And this works in the traefik container. Tried to wget to several possible folders I would suspect the plugin to be downloaded to, and calls complete fine. I can cat the files being created and there is content. So, no reason why the Traefik application should fail. @ldez , any ideas?
I'm thinking about a hidden character, a typo inside your configuration, or a file encoding issue: something that impacts the name or the version of the plugin used to perform the call.
@ldez , @bluepuma77 , that was it! Both a lot of thanks for your time and help. I was about to give up
I am a notoriously bad typist and my colleague would laugh his ass off...
Solved for now!