-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First time boot takes incredibly long due to chown -R "$PUID:$PGID" /opt/certbot #3154
Comments
I can confirm this. Sometimes it pretty annyoing |
Any workaround at least? 3-4 minutes downtime just to restart npm is a lot, and very annoying when changing configs and have to restart to see the results. |
I guess you could map a volume to the root fs that persists the /opt folder |
Thanks, it worked! |
How? can you please explain? I am not getting pass to the settings ownership and it simply timesout in my case. I am mounting the data and letsencrypt folder on an nfs share. |
I too am hitting this issue on my TrueNAS system. How I resolve this for now. Step 1: Create a PVC mount called /opt/certbot2 (ie. an external mount is managed by TrueNAS - this is not the same as a named mount managed by docker, from docker's perspective it's still a host mount, but it's as good as you get with truenas). It should now be very quick to chown, because the storage is external, not copy on write. |
How did you do that? I'm having the same problem running on my server, when I run it on my machine it doesn't take long. 😢 |
I would guess,
run the container and wait for it to start,
use docker copy and copy the /opt from the container to a folder on your
harddisk
once this is done, stop the container
add a volume that maps the copy on your local disk to the /opt inside the
container
start the container again
Am Mo., 19. Feb. 2024 um 18:45 Uhr schrieb Lapo ***@***.***>:
… I guess you could map a volume to the root fs that persists the /opt folder
Thanks, it worked!
@panos-stavrianos <https://github.com/panos-stavrianos>
How did you do that? I'm having the same problem running on my server,
when I run it on my machine it doesn't take long.
—
Reply to this email directly, view it on GitHub
<#3154 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY6MDHQYN3XKWID27OJX3LYUOFSHAVCNFSM6AAAAAA34FODYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSHE2DIMBUGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thank you!! it worked :) |
I'm having the same problem with 2.11.1 via the TrueNAS catalog chart version 1.0.27 I never seem to get past the chown before TrueNAS decides that the container is unhealthy and attempts to restart it, causing an endless loop
I haven't tried the proposed workaround EDIT I was just in the console when the container was restarted and it echoed the following message to the console: |
Affected by this issue as well on TrueNAS SCALE 23.10.2. Same issue on the community train and installing the docker image directly as well. Takes about 10 minutes for mine to fully load. |
So I copied the files to my HDD pool in my |
This actually really helped me out. First added the following volumes:
- ./data/opt:/opt/certbot-cp # command will generate the /certbot folder in /data/opt
command: 'cp -avr /opt/certbot /opt/certbot-cp' waited for the app to output the command response (a ton of lines starting with '/opt/certbot volumes:
- ./data/opt/certbot:/opt/certbot # added /certbot to host path, removed -cp from container path
# removed command setting and restarted. npm loaded pretty much immediately, and I was able to access the admin panel. I'm still learning docker so I may not be doing it the best way, but it worked for me. |
Yep, same thing I did, just using docker compose. |
This cant be an solution, only an workaround. Its VERY anoying...at every update of the container or helm forces an downtime for over an hour... |
Not a solution, just a workaround for now. |
Ok, sorry if my comment was a bit salty...lets be productive: |
Did anybody ever figure out an answer to the original question of why this is required? Could we simply...remove the offending line?.... |
Same issue here unfortunately |
Same here, Truenas 24.10-Beta.1. 10 to 15 minutes downtime, on an SSD array. I can imagine how frustrating it must be on a pure HDD array. |
I think instead of using a hacky workaround, perhaps the underlying issue with whatever causes certbot to complain about can be resolved? Like, if it's to make it not complain about not running as root... isn't there something with the python stuff that lets user packages to be used? Maybe I'm just dumb but I'm baffled why this is a thing... |
Workaround add an Additional Environment Variable on Truenas 24.10-Beta.1: |
That's indeed the current (sometime buggy) workaround, but that won't resolve the issue itself. The issue was caused by going from a python user package to a system package (see commit linked in the issue), which, if I understand it well, can only be run as root unless you chown it back, which take ages. |
It's only 20 minutes startup time with HDD in a truenas array. WIth the fix, the startup time is 5 seconds. |
This happens on straight docker as well on zfs. |
Checklist
jc21/nginx-proxy-manager:latest
docker image?Describe the bug
When I start the container for the first time it's taking an incredibly long due to it setting ownership:
I did a bit of investigation and found out it's due to this command:
This code was added in this commit:
05307aa
I ran this command myself inside the container and it took about 5 minutes to complete:
To me it feels a bit strange to have to execute this command on the /opt folder which isn't even mapped to my host system. So why not do this during the creation of the container rather then during boot?
Nginx Proxy Manager Version
2.10.4
To Reproduce
See above
Expected behavior
Boot quickly
Screenshots
N/A
Operating System
Docker inside a container on a Synology NAS
Additional context
The text was updated successfully, but these errors were encountered: