NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
20.82k stars 2.41k forks source link

cloudflare dns failes due to missing (yet installed) cloudflare pip package/module #3824

Open zaourzag opened 1 week ago

zaourzag commented 1 week ago

Checklist

Describe the bug since today, the cloudflare dns provider fails to work. certbot is unable to find the CloudFlare module causing it to fail. relevant error code:

Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-mk3d3cri/log or re-run Certbot with -v for more details.
The 'certbot_dns_cloudflare._internal.dns_cloudflare' plugin errored while loading: No module named 'CloudFlare'. You may need to remove or update this plugin. The Certbot log will contain the full error details and this should be reported to the plugin developer.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-7a7w849t/log or re-run Certbot with -v for more details.
ERROR: Could not find a version that satisfies the requirement acme== (from versions: 0.0.0.dev20151006, 0.0.0.dev20151008, 0.0.0.dev20151017, 0.0.0.dev20151020, 0.0.0.dev20151021, 0.0.0.dev20151024, 0.0.0.dev20151030, 0.0.0.dev20151104, 0.0.0.dev20151107, 0.0.0.dev20151108, 0.0.0.dev20151114, 0.0.0.dev20151123, 0.0.0.dev20151201, 0.1.0, 0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.11.1, 0.12.0, 0.13.0, 0.14.0, 0.14.1, 0.14.2, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.18.1, 0.18.2, 0.19.0, 0.20.0, 0.21.0, 0.21.1, 0.22.0, 0.22.1, 0.22.2, 0.23.0, 0.24.0, 0.25.0, 0.25.1, 0.26.0, 0.26.1, 0.27.0, 0.27.1, 0.28.0, 0.29.0, 0.29.1, 0.30.0, 0.30.1, 0.30.2, 0.31.0, 0.32.0, 0.33.0, 0.33.1, 0.34.0, 0.34.1, 0.34.2, 0.35.0, 0.35.1, 0.36.0, 0.37.0, 0.37.1, 0.37.2, 0.38.0, 0.39.0, 0.40.0, 0.40.1, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 1.14.0, 1.15.0, 1.16.0, 1.17.0, 1.18.0, 1.19.0, 1.20.0, 1.21.0, 1.22.0, 1.23.0, 1.24.0, 1.25.0, 1.26.0, 1.27.0, 1.28.0, 1.29.0, 1.30.0, 1.31.0, 1.32.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0, 2.9.0, 2.10.0, 2.11.0)
ERROR: No matching distribution found for acme==

[notice] A new release of pip is available: 24.0 -> 24.1
[notice] To update, run: pip install --upgrade pip

    at /app/lib/utils.js:16:13
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

before this i had been using the dns provider with no issues Nginx Proxy Manager Version v2.11.2

To Reproduce Steps to reproduce the behavior: generate a new ssl certificate using the cloudflare dns provider

Expected behavior a certificate gets generated

Screenshots image

Operating System ubuntu 22.04

LandonPatmore commented 1 week ago

Same here. Seems rolling back to 2.11.1 doesn't seem to fix it either.

zaourzag commented 1 week ago

neither does deleting the local image and restarting it. I have made certs using cloudflare on this yesterday

LandonPatmore commented 1 week ago

I wonder if wiping the local storage may fix it? I didn't try that yet.

LandonPatmore commented 1 week ago

That didn't work either on 2.11.1.

LandonPatmore commented 1 week ago

Got a slightly different error:

The 'certbot_dns_cloudflare._internal.dns_cloudflare' plugin errored while loading: No module named 'CloudFlare'. You may need to remove or update this plugin. The Certbot log will contain the full error details and this should be reported to the plugin developer.

with no mention of acme==.

ajunior84 commented 1 week ago

Same here. I'm trying with 2.11.x, 2.10.x and 2.9.x and it doesn't work either.

LandonPatmore commented 1 week ago

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

  1. docker exec -it <name of container> /bin/bash
  2. Run certbot and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)
  3. pip uninstall certbot-dns-cloudflare
  4. Run certbot and see it does not error out
  5. pip install certbot-dns-cloudflare
  6. Run certbot and see it does not error out
  7. Try creating a SSL cert and it should work
zaourzag commented 1 week ago

ill give that a try!

ajunior84 commented 1 week ago

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

  1. docker exec -it <name of container> /bin/bash
  2. Run certbot and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)
  3. pip uninstall certbot-dns-cloudflare
  4. Run certbot and see it does not error out
  5. pip install certbot-dns-cloudflare
  6. Run certbot and see it does not error out
  7. Try creating a SSL cert and it should work

It works!

zaourzag commented 1 week ago

okay, now im going insane, i think. i did not have to do any of that, just went back to my old database.sqlite file and it worked just like that. i hate days like these. becuase you dont know what happened and what fixed it

IoSonoPiero commented 1 week ago

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

1. `docker exec -it <name of container> /bin/bash`

2. Run `certbot` and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)

3. `pip uninstall certbot-dns-cloudflare`

4. Run `certbot` and see it does not error out

5. `pip install certbot-dns-cloudflare`

6. Run `certbot` and see it does not error out

7. Try creating a SSL cert and it should work

You saved me! It worked! Thanks!

twilight7345 commented 1 week ago

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

1. `docker exec -it <name of container> /bin/bash`

2. Run `certbot` and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)

3. `pip uninstall certbot-dns-cloudflare`

4. Run `certbot` and see it does not error out

5. `pip install certbot-dns-cloudflare`

6. Run `certbot` and see it does not error out

7. Try creating a SSL cert and it should work

Thank you so much, this was driving me nuts!

challgren commented 1 week ago

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

  1. docker exec -it <name of container> /bin/bash
  2. Run certbot and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)
  3. pip uninstall certbot-dns-cloudflare
  4. Run certbot and see it does not error out
  5. pip install certbot-dns-cloudflare
  6. Run certbot and see it does not error out
  7. Try creating a SSL cert and it should work

Thank you for this fix, helped with my first installation

danthonywalker commented 1 week ago

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

1. `docker exec -it <name of container> /bin/bash`

2. Run `certbot` and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)

3. `pip uninstall certbot-dns-cloudflare`

4. Run `certbot` and see it does not error out

5. `pip install certbot-dns-cloudflare`

6. Run `certbot` and see it does not error out

7. Try creating a SSL cert and it should work

Works like a charm! Thank you for this. I hope an update comes out soon to resolve it.

Aerglonus commented 1 week ago

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

  1. docker exec -it <name of container> /bin/bash
  2. Run certbot and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)
  3. pip uninstall certbot-dns-cloudflare
  4. Run certbot and see it does not error out
  5. pip install certbot-dns-cloudflare
  6. Run certbot and see it does not error out
  7. Try creating a SSL cert and it should work

For future people, if for some reason this doesn't work try doing

pip uninstall certbot-dns-cloudflare pip install --upgrade pip and the reinstall the plugin but specify the version pip install --force-reinstall "certbot-dns-cloudflare==2.11.0" and restart the container.

For some reason even if you reinstall the plugin after upgrading pip it will always pull the version that it was installed.

C0RS4 commented 1 week ago

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

  1. docker exec -it <name of container> /bin/bash
  2. Run certbot and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)
  3. pip uninstall certbot-dns-cloudflare
  4. Run certbot and see it does not error out
  5. pip install certbot-dns-cloudflare
  6. Run certbot and see it does not error out
  7. Try creating a SSL cert and it should work

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

  1. docker exec -it <name of container> /bin/bash
  2. Run certbot and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)
  3. pip uninstall certbot-dns-cloudflare
  4. Run certbot and see it does not error out
  5. pip install certbot-dns-cloudflare
  6. Run certbot and see it does not error out
  7. Try creating a SSL cert and it should work

thank u so much! this really helps

thefeli73 commented 1 week ago

The issue is the cloudflare-python package, version 3.x.x is incompatible with 2.x.x, which is pinned in certbot upstream, but not here in NPM it seems. Perhaps certbot needs to be bumped in NPM. This has been adressed in #3764, hopefully dev gets merged soon...

A more technically correct fix is only pinning the cloudflare package in the container using pip install --upgrade cloudflare==2.19.*

i.e.

  1. docker exec -it <name of container> /bin/bash
  2. pip install --upgrade cloudflare==2.19.*
  3. Try creating a SSL cert and it should work
F1zzyD commented 1 week ago

The issue is the cloudflare-python package, version 3.x.x is incompatible with 2.x.x, ~which is pinned in certbot upstream, but not here in NPM it seems. Perhaps certbot needs to be bumped in NPM.~ This has been adressed in #3764, hopefully dev gets merged soon...

A more technically correct fix is only pinning the cloudflare package in the container using pip install --upgrade cloudflare==2.19.*

i.e.

1. `docker exec -it <name of container> /bin/bash`

2. `pip install --upgrade cloudflare==2.19.*`

3. Try creating a SSL cert and it should work

This does NOT work on NPM on v 2.11.1 and running the pip install.

nixielectra commented 1 week ago

5. pip install certbot-dns-cloudflare

Tried on 2.11.2 and works like a charm! thank you so much!

AKSoapy29 commented 6 days ago

Got it to work! Using 2.11.1 (may work on latest, but I rolled back to 2.11.1 and it works).

Follow these steps:

  1. docker exec -it <name of container> /bin/bash
  2. Run certbot and see it errors out saying that cloudflare-dns plugin is causing an issue (this is to confirm you have the issue I was seeing that was fixed by this method)
  3. pip uninstall certbot-dns-cloudflare
  4. Run certbot and see it does not error out
  5. pip install certbot-dns-cloudflare
  6. Run certbot and see it does not error out
  7. Try creating a SSL cert and it should work

Confirmed, this works on v2.11.2.