NginxProxyManager / nginx-proxy-manager

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

ModuleNotFoundError: No module named 'zope' #2440

Open sdw4agl opened 1 year ago

sdw4agl commented 1 year ago

When I use the SSL function with the latest version, the software reports an error:“ModuleNotFoundError: No module named 'zope'”。 When I use the same configuration and another version of github-pr-2411 to start the ssl function, there is no problem.

hanrw commented 1 year ago

Same issue

eshenxd commented 1 year ago

Same issue

ukiyoec commented 1 year ago

同样的问题,有解决的方案吗

hanrw commented 1 year ago

同样的问题,有解决的方案吗

using image github-pr-2411

SadBoen commented 1 year ago

Very Sad......why so many problem, cloudflare and dnspod both faild....

holoword commented 1 year ago

same problem, use latest docker image, cannot update ssl certificate.

yp05327 commented 1 year ago

It seems zope is not installed in docker image by default. I installed it, and it worked.

pip install zope
lidachao111222 commented 1 year ago

It seems zope is not installed in docker image by default. I installed it, and it worked.

pip install zope

It works! Thanks.

ourpurple commented 1 year ago

dnspod

pip install certbot-dns-dnspod

shaojs321 commented 1 year ago

网络问题,容器的pip没有走代理,使用全局代理或者在容器内部pip config set global.proxy http://xx.xx.xx.xx:port ,之后在容器内pip install zope 就可以了

lhb-cafe commented 1 year ago

I thought docker makes things portable.

troykelly commented 1 year ago

Version updates do not resolve this problem. It now seems the old fix (installing zope as below) no longer works

To fix previously, I ran the below:

pip install -r https://zopefoundation.github.io/Zope/releases/master/requirements-full.txt

But now, even after running the above...

[3/18/2023] [10:08:23 AM] [SSL      ] › ✖  error     Error: Command failed: certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --preferred-challenges "dns,http" --disable-hook-validation  
An unexpected error occurred:
ModuleNotFoundError: No module named 'zope'

    at ChildProcess.exithandler (node:child_process:402:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Socket.<anonymous> (node:internal/child_process:458:11)
    at Socket.emit (node:events:513:28)
    at Pipe.<anonymous> (node:net:301:12)
jc21 commented 1 year ago

What version of NPM are you using? The startup is meant to install the certbot pip packages based on the DNS providers used in your configuration. You should be able to observe this on container startup within the logs. The PR #2411 has been merged and released in 2.9.20, though I'd suggest using 2.9.21 docker image tag

flx-666 commented 1 year ago

Hello, I have the same issue with the latest release... It did work in the past installing zope in the container, but since the upgrade it always throw these messages at startup:

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting cont-init: info: running /etc/cont-init.d/01_perms.sh /package/admin/s6-overlay-3.1.4.1/etc/s6-rc/scripts/cont-init: 20: /package/admin/s6-overlay-3.1.4.1/etc/s6-rc/scripts/cont-init: /etc/cont-init.d/01_perms.sh: not found cont-init: info: /etc/cont-init.d/01_perms.sh exited 127 cont-init: info: running /etc/cont-init.d/01_s6-secret-init.sh /package/admin/s6-overlay-3.1.4.1/etc/s6-rc/scripts/cont-init: 20: /package/admin/s6-overlay-3.1.4.1/etc/s6-rc/scripts/cont-init: /etc/cont-init.d/01_s6-secret-init.sh: Permission denied cont-init: info: /etc/cont-init.d/01_s6-secret-init.sh exited 126 cont-init: warning: some scripts exited nonzero s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service prepare: starting ❯ Checking folder structure ... ❯ Enabling IPV6 in hosts: /etc/nginx/conf.d ❯ /etc/nginx/conf.d/production.conf ❯ /etc/nginx/conf.d/default.conf ❯ /etc/nginx/conf.d/include/ip_ranges.conf ❯ /etc/nginx/conf.d/include/block-exploits.conf ❯ /etc/nginx/conf.d/include/force-ssl.conf ❯ /etc/nginx/conf.d/include/ssl-ciphers.conf ❯ /etc/nginx/conf.d/include/assets.conf ❯ /etc/nginx/conf.d/include/proxy.conf ❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf ❯ /etc/nginx/conf.d/include/resolvers.conf ❯ Enabling IPV6 in hosts: /data/nginx ❯ /data/nginx/proxy_host/1.conf ❯ /data/nginx/proxy_host/5.conf ❯ /data/nginx/proxy_host/15.conf ❯ /data/nginx/proxy_host/6.conf ❯ /data/nginx/proxy_host/10.conf ❯ /data/nginx/proxy_host/16.conf ❯ /data/nginx/proxy_host/9.conf ❯ /data/nginx/proxy_host/4.conf ❯ /data/nginx/proxy_host/14.conf ❯ /data/nginx/proxy_host/8.conf ❯ /data/nginx/proxy_host/3.conf ❯ /data/nginx/proxy_host/2.conf ❯ /data/nginx/proxy_host/12.conf ❯ /data/nginx/proxy_host/11.conf ❯ /data/nginx/proxy_host/13.conf ❯ /data/nginx/default_host/site.conf



| \ | | | \/ | | | | |) | |\/| | | |\ | _/| | | | || _|| || |_|

s6-rc: info: service prepare successfully started s6-rc: info: service nginx: starting s6-rc: info: service frontend: starting s6-rc: info: service backend: starting s6-rc: info: service nginx successfully started s6-rc: info: service frontend successfully started s6-rc: info: service backend successfully started s6-rc: info: service legacy-services: starting ❯ Starting nginx ... ❯ Starting backend ... s6-rc: info: service legacy-services successfully started [3/20/2023] [7:09:57 AM] [Global ] › ℹ info Generating MySQL knex configuration from environment variables [3/20/2023] [7:09:57 AM] [Global ] › ⬤ debug Wrote db configuration to config file: ./config/production.json [3/20/2023] [7:09:58 AM] [Migrate ] › ℹ info Current database version: 20211108145214 [3/20/2023] [7:09:58 AM] [Setup ] › ℹ info Creating a new JWT key pair... [3/20/2023] [7:10:04 AM] [Setup ] › ℹ info Wrote JWT key pair to config file: /app/config/production.json [3/20/2023] [7:10:05 AM] [Setup ] › ℹ info Added Certbot plugins certbot-dns-infomaniak~=0.1.12 [3/20/2023] [7:10:05 AM] [Setup ] › ℹ info Logrotate Timer initialized [3/20/2023] [7:10:05 AM] [Setup ] › ℹ info Logrotate completed. [3/20/2023] [7:10:05 AM] [IP Ranges] › ℹ info Fetching IP Ranges from online services... [3/20/2023] [7:10:05 AM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json [3/20/2023] [7:10:05 AM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v4 [3/20/2023] [7:10:05 AM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v6 [3/20/2023] [7:10:06 AM] [SSL ] › ℹ info Let's Encrypt Renewal Timer initialized [3/20/2023] [7:10:06 AM] [SSL ] › ℹ info Renewing SSL certs close to expiry... [3/20/2023] [7:10:06 AM] [IP Ranges] › ℹ info IP Ranges Renewal Timer initialized [3/20/2023] [7:10:06 AM] [Global ] › ℹ info Backend PID 120 listening on port 3000 ... [3/20/2023] [7:10:06 AM] [SSL ] › ✖ error Error: Command failed: certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --preferred-challenges "dns,http" --disable-hook-validation
An unexpected error occurred: ModuleNotFoundError: No module named 'zope'

at ChildProcess.exithandler (node:child_process:402:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

[3/20/2023] [7:10:08 AM] [Express ] › ⚠ warning invalid signature

I am using infomaniak as provider... Any suggestion?

flx-666 commented 1 year ago

By the way, I applied what is proposed in https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2709 and I have been able to renew...

troykelly commented 1 year ago

What version of NPM are you using?

Always using jc21/nginx-proxy-manager:latest - Zope has been broken for quite some time. No version upgrades have resolved the issue. I'm a little stumped as to why this isn't an issue for more people?

Current version of NPM completely fails to start

lb-pi002-app-1  | s6-rc: info: service s6rc-oneshot-runner: starting
lb-pi002-app-1  | s6-rc: info: service s6rc-oneshot-runner successfully started
lb-pi002-app-1  | s6-rc: info: service fix-attrs: starting
lb-pi002-app-1  | s6-rc: info: service fix-attrs successfully started
lb-pi002-app-1  | s6-rc: info: service legacy-cont-init: starting
lb-pi002-app-1  | s6-rc: info: service legacy-cont-init successfully started
lb-pi002-app-1  | s6-rc: info: service prepare: starting
lb-pi002-app-1  | ❯ Configuring npmuser ...
lb-pi002-app-1  | id: 'npmuser': no such user
lb-pi002-app-1  | ❯ Checking paths ...
lb-pi002-app-1  | ❯ Setting ownership ...
lb-pi002-app-1  | s6-rc: fatal: timed out
lb-pi002-app-1  | s6-sudoc: fatal: unable to get exit status from server: Operation timed out
lb-pi002-app-1  | /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
iHaveAstream commented 1 year ago

I'm also using "latest" and my instance got updated by watchtower around two hours ago. With the previous release, there was no error in the nginx-npm log but now I can see the following:

[3/27/2023] [9:44:16 AM] [SSL      ] › ✖  error     Error: Command failed: certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --preferred-challenges "dns,http" --disable-hook-validation  
Renewal configuration file /etc/letsencrypt/renewal/npm-1.conf (cert: npm-1) produced an unexpected error: 'Namespace' object has no attribute 'dns_desec_propagation_seconds'. Skipping.
0 renew failure(s), 1 parse failure(s)

    at ChildProcess.exithandler (node:child_process:402:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

And it's no longer possible for me to log in into the web UI because it tells me that my actual user (which is valid) is no "relevant" user. grafik

Pls. advise how to solve it. Thanks.

iHaveAstream commented 1 year ago

I've now downgraded to v2.9.22 and it works again without any issue (also logs are fine).

zzero25 commented 1 year ago

雀食 默认的pip源被xx了,基本跑不动 国内的童鞋可以试试清华或阿里的镜像: pip install zope -i https://pypi.tuna.tsinghua.edu.cn/simple or pip install zope -i http://mirrors.aliyun.com/pypi/simple/

CoverUp137 commented 1 year ago

docker使用命令

docker exec 容器名 pip install zope

可解决该问题

foxdodo commented 11 months ago

至今为止默认docker镜像都没集成zope,用DNSPOD申请SSL一定会出现这个问题,能不能在readme或者Q&A里面说明一下呢

FlynnXie commented 11 months ago

docker使用命令

docker exec 容器名 pip install zope

可解决该问题

这个方法有用

zhouliang commented 11 months ago

DNSPOD

DNSPOD是中国专属,作者不使用DNSPOD,所以无法重现该问题。

DuvelCorp commented 9 months ago

So many issues with NPM. Just landed here, I am only evaluating it (long time Apache old school admin) and here's my experience within the first 30 minutes

You go in SSL certificate which is one of the 7 standalone sections. Its not like a niche experimental thing hidden somewhere, no, its one of the major feature of npm. Then you begin by adding your (existing) domain and do a "Test server reachability". ERROR. Communication with the API failed, is NPM running correctly? Then you come to github and find like 100 users reporting the problem for >1 year and stating "it has never worked", and you also read that 'but adding a SSL cert is fine so dont worry about the test"

OK, so you try to add your SSL certificate (I am on Infomaniak), and find this error.

An unexpected error occurred:
ModuleNotFoundError: No module named 'zope'

And you reach this issue open for exactly one year, and read things like "oh yes, its not installed, you should install it... pip install zope" Man, you know what the main aspect of containerization is ??? How is that possible that a component needed by a major feature isn't directly bundled in the image???

Then you read things like "are you using the latest version ?" Come on. Yes it is :latest tag.

NPM_BUILD_VERSION : 2.10.4
NPM_BUILD_DATE : 2023-11-22 01:06:49 UTC

You also read " Zope has been broken for quite some time.", and "'I was on latest version and its broken I had to downgrade...."

At this point I can only conclude that all this isn't serious at all and that I should just drop NPM. On a Selfhosted lab with no important stuff and only one user playing, maybe. But on a real prod environment serving stuff to many users, it looks suicidal. It was probably not pleasant to read, but I am sorry, it is my experience. And I am posting it to help you realize how this looks like: broken and not serious.

snarl-wang commented 8 months ago

Open the console of the docker, then follow the highlighted command in the picture. 1 2

Durianyang commented 7 months ago

It seems zope is not installed in docker image by default. I installed it, and it worked.

pip install zope

Very good, this method solved the problem

ayunhe commented 6 months ago

docker使用命令

docker exec 容器名 pip install zope

可解决该问题

nice

yp05327 commented 6 months ago

There's already a PR to fix it since 1 year ago: https://github.com/tengattack/certbot-dns-dnspod/pull/12 But it seems that the owner of certbot-dns-dnspod doesn't maintain it anymore. I don't think NPM has responsibility to fix it, but we need a solution when these plugins (not only dnspod) are outdated.

tengattack commented 5 months ago

There's already a PR to fix it since 1 year ago: tengattack/certbot-dns-dnspod#12 But it seems that the owner of certbot-dns-dnspod doesn't maintain it anymore. I don't think NPM has responsibility to fix it, but we need a solution when these plugins (not only dnspod) are outdated.

I think it still not too late to said that: fixed now :)

RemyDG0 commented 4 months ago

I am trying to use the infomaniak dns challenge and there is the same issue, on that issue on their GitHub page they indicate the issue has been resolve on their side and they suppose NGINX does not use the latest version...

https://github.com/Infomaniak/certbot-dns-infomaniak/issues/34

I use NGINX as TrueNas package, version 1.0.29, based on docker image version 2.11.1.

For me the issue is not resolved

yp05327 commented 4 months ago

maybe they need to update global/certbot-dns-plugins.json

https://github.com/NginxProxyManager/nginx-proxy-manager/blob/02aefa50cd0a81fca6baf0b93b66ee4665282b35/global/certbot-dns-plugins.json#L242-L249

also bump the version of certbot-dns-dnspod

RemyDG0 commented 3 months ago

For me it has been solved in the latest update

yp05327 commented 3 months ago

For me it has been solved in the latest update

Maybe we can close this issue now 😄

thotha commented 3 months ago

for me as well!! please don't close but better fix this issue.