nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

ModuleNotFoundError: No module named 'zope'

Open sdw4agl opened this issue 2 years ago • 8 comments

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.

sdw4agl avatar Nov 29 '22 17:11 sdw4agl

Same issue

hanrw avatar Dec 03 '22 05:12 hanrw

Same issue

eshenxd avatar Dec 03 '22 13:12 eshenxd

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

ukiyoec avatar Dec 09 '22 04:12 ukiyoec

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

using image github-pr-2411

hanrw avatar Dec 10 '22 00:12 hanrw

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

SadBoen avatar Dec 12 '22 15:12 SadBoen

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

holoword avatar Dec 17 '22 03:12 holoword

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

pip install zope

yp05327 avatar Dec 28 '22 11:12 yp05327

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

pip install zope

It works! Thanks.

lidachao111222 avatar Dec 29 '22 05:12 lidachao111222

dnspod

pip install certbot-dns-dnspod

ourpurple avatar Jan 03 '23 13:01 ourpurple

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

shaojs321 avatar Jan 12 '23 09:01 shaojs321

I thought docker makes things portable.

lhb-cafe avatar Mar 16 '23 06:03 lhb-cafe

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)

troykelly avatar Mar 18 '23 09:03 troykelly

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

jc21 avatar Mar 18 '23 12:03 jc21

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 avatar Mar 20 '23 07:03 flx-666

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

flx-666 avatar Mar 22 '23 15:03 flx-666

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.

troykelly avatar Mar 27 '23 05:03 troykelly

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 avatar Mar 27 '23 07:03 iHaveAstream

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

iHaveAstream avatar Mar 28 '23 07:03 iHaveAstream

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

zzero25 avatar Jul 14 '23 15:07 zzero25

docker使用命令

docker exec 容器名 pip install zope

可解决该问题

CoverUp137 avatar Aug 13 '23 23:08 CoverUp137

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

foxdodo avatar Oct 08 '23 05:10 foxdodo

docker使用命令

docker exec 容器名 pip install zope

可解决该问题

这个方法有用

FlynnXie avatar Oct 08 '23 13:10 FlynnXie

DNSPOD

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

zhouliang avatar Oct 09 '23 05:10 zhouliang

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.

DuvelCorp avatar Nov 26 '23 06:11 DuvelCorp

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

snarl-wang avatar Jan 12 '24 16:01 snarl-wang

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

Durianyang avatar Jan 23 '24 14:01 Durianyang

docker使用命令

docker exec 容器名 pip install zope

可解决该问题

nice

ayunhe avatar Mar 02 '24 16:03 ayunhe

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.

yp05327 avatar Mar 11 '24 09:03 yp05327

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 :)

tengattack avatar Mar 24 '24 19:03 tengattack

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

RemyDG0 avatar Apr 24 '24 10:04 RemyDG0