November 13, 20232 yr Really appreciate your reply binhex, thanks alot! Also to you ambipro, so not looking like I'm deranged possibly lol, thank you my friend. Binhex, as said please dont hesitate let me know if I can help with some testings for you or whatever, of course. You can easily also without testing add the '-d' switch to deluge-web imho, as not blocking without it in deluge2 and so is an oversight. The peerid spoof I just removed because you're not on dev branch anymore so redundant, but semantics of-course. The really strange approach of '-d &' to deluged, in addition to ' -d' on deluge-web(latter making sense though), is what actually fixes dumb-init issue. Shutdown.sh readded might be better dunno, but you know best obviously. The strange double-resume to deluge-console is a workaround for issue in around 1 out of every 5 times failing intended purpose otherwise(with just the single resume added I mean, which is definitely needed, just not enough always and hence found doubled works for these too). Just elaborating to save you some time if intended possibly rereading all my blabbings. Appreciate you as said/inferred. Edited November 13, 20232 yr by mhertz
November 13, 20232 yr Author 2 hours ago, mhertz said: The really strange approach of '-d &' to deluged, in addition to ' -d' on deluge-web(latter making sense though), is what actually fixes dumb-init issue. Shutdown.sh readded might be better dunno, but you know best obviously. OK been playing with this, so to review your findings and mine, the issue is two-fold:- 1. deluged and deluge-web fork (default action), and thus dumb-init sigterm never reaches deluged or deluge-web as they are not child processes of the script. 2. dumb-init does not wait for processes to exit after the process is sent sigterm. To fix 1. we simply prevent deluged and deluge-web from running daemonised (but we do background deluged), this then ensures the process is run as a child process of the script and thus gets sent sigterm - see https://github.com/binhex/arch-deluge/commit/8117d7e6286d41f2de6a3a3f35004367b3a432ef To fix 2. i have to create a script which traps sigterm and then waits for all child processes to exit - see https://github.com/binhex/scripts/blob/master/shell/arch/docker/waitproc.sh Once these two are in place then you can tick and untick plugins and this state is saved, i havent looked at torrent states so i will leave that up to you guys, but it should also fix this. To test please pull down the image with tag name 'wait-proc' please let me know if it works as i will need to merge into master/main if its good - note this is JUST for arch-deluge so far, so arch-delugevpn does NOT have this tag.
November 13, 20232 yr Alright can test this out right now. Just to reiterate, as I use 1.x libtorrent (which also has 1.2.19, https://pypi.org/project/libtorrent/#history) - and would love to see this and libtorrent updated in both tags when you merge and build the new images. I don't have an issue testing whatever libtorrent version you're using on this branch by the way Just reminding I'll setup a new container with that tag, and test what I've found the most reproducible steps are....just so you can replicate if desired, I'll be doing the following expecting it to work rather than fail. 1. New instance of Deluge with empty appdata /config dir 2. Attempt to enable ltConfig plugin (version doesn't seem to matter but we keep an updated version on our forums https://forum.deluge-torrent.org/viewtopic.php?p=236641#p236641) - Default plugins didn't seem to consistently fail to remain loaded for whatever under-the-hood reason. 3. Enable the plug-in in Deluge 4. Restart the container through the unraid UI Plugin should be disabled if the fix hasn't worked....otherwise it should remain (if memory serves). I'll post back when I've done this, if it fails or ungraceful shutdown in logs, will post deluged logs. For clarity, I'm using thin-client to do all of this.
November 13, 20232 yr 07:44:18 [DEBUG ][deluge.core.daemon :1622] Remove pid file: /config/deluged.pid 07:44:18 [INFO ][deluge.core.daemon :1622] Deluge daemon shutdown successfully 07:44:18 [INFO ][deluge.core.daemon_entry :1622] Exiting... deluged exited successfully. 07:44:18 [INFO ][deluge.ui.web.server :1622] Shutting down webserver 07:44:18 [DEBUG ][deluge.ui.web.server :1622] Saving configuration file For thoroughness here is deluge-web. 2023-11-13 07:49:28,099 DEBG fd 8 closed, stopped monitoring <POutputDispatcher at 22393937543568 for <Subprocess at 22393936472720 with name deluge-script in state RUNNING> (stdout)> 2023-11-13 07:49:28,099 DEBG fd 10 closed, stopped monitoring <POutputDispatcher at 22393936863952 for <Subprocess at 22393936472720 with name deluge-script in state RUNNING> (stderr)> 2023-11-13 07:49:28,099 INFO exited: deluge-script (exit status 0; expected) 2023-11-13 07:49:28,100 DEBG received SIGCHLD indicating a child quit 2023-11-13 07:49:46,117 WARN received SIGTERM indicating exit request and Docker logs from when container was stopped Plugins persisted as well. I did go back and test the old image under same conditions (empty config folder). These lines were missing from the logs when the container was stopped, but plugins intermittently did persist regardless. It may not be as consistent as I originally thought to reproduce that way, however it also may have something to do with there being no torrents present and deluged basically being idle throughout the test. Either way, the logs clearly show success in receiving SIGTERM, and waiting for the child processes to return status before container is stopped. I call this a success unless I'm missing something or it reacts differently with torrents loaded (I don't believe it would) Edited November 13, 20232 yr by ambipro typo
November 13, 20232 yr I just finished testing now and as ambipro, amazing work, thanks alot binhex, everything up to snuff now as said, state and plugins both, perfection! Ahh so that's why the backgrounding works, never understood that, thanks for elaborating. Last, just have to apologize and kicking myself mentallly because I can't explain it, but my fix today didn't work for whatever reason, and as you found - thanks for being kind about it, appreciated! I reinstalled image before trying today, and i'm guessing in about 100 tries before it worked with mine and failed vanilla, except now and one single time previously where I reinstalled docker image as thought made mistake somehow. Now it continually didn't work in like 20 tries, reinstalled and rebooted and quadrouple-checked everything lol, so feel like a moron, and really sorry, wish I could explain why happened such, just for myself's sanity, but obviously irrelevant and again, beatifull work and thank you so much! Edit: Now my fix works again, but see intermittently, so cannot understand how could be so "lucky" as worked so many times, and not without, but whatever, thanks alot again binhex. Edited November 13, 20232 yr by mhertz
November 15, 20232 yr No pressure, but I was just curious about when you were going to build and push the dumb-init fix and hopefully update libtorrent (dont forget 1.2.19 in libtorrentv1 branch :D) in the docker images? I assume that the fix worked out how you hoped? Just a curious
November 16, 20232 yr Author 21 hours ago, ambipro said: No pressure, but I was just curious about when you were going to build and push the dumb-init fix and hopefully update libtorrent (dont forget 1.2.19 in libtorrentv1 branch :D) in the docker images? I assume that the fix worked out how you hoped? Just a curious done, please pull down 'latest' tagged image.
November 16, 20232 yr I assume that this is libtorrent 2.0.9 though? I'd like to stick with 1.2.x (1.2.19 preferrably) Are there plans to offer both with this fix?
November 16, 20232 yr Author 2 minutes ago, ambipro said: I assume that this is libtorrent 2.0.9 though? I'd like to stick with 1.2.x (1.2.19 preferrably) Are there plans to offer both with this fix? both are available, use tag name 'libtorrentv1' if you want to use v1
November 16, 20232 yr Hello there, I don't want to disturb Your actual problem/testing here, but Id like to ask is there any possibility to start/stop specific number of torrents, at specific hours? I have cache ssd to hdd type of share configured, and Id want to stop all (earlier moved to HDD) data for a 6 hours, on every night, BUT I would like all torrents that are currently on the cache ssd drive to be active all the time. AND each torrent added (via autobrr, for example) was also downloaded and seeded (because it is on the cache ssd drive) is something like this possible on binhex deluge v2? If so, than how could I manage to do that? thank You
November 16, 20232 yr 24 minutes ago, rogales said: Hello there, I don't want to disturb Your actual problem/testing here, but Id like to ask is there any possibility to start/stop specific number of torrents, at specific hours? I have cache ssd to hdd type of share configured, and Id want to stop all (earlier moved to HDD) data for a 6 hours, on every night, BUT I would like all torrents that are currently on the cache ssd drive to be active all the time. AND each torrent added (via autobrr, for example) was also downloaded and seeded (because it is on the cache ssd drive) is something like this possible on binhex deluge v2? If so, than how could I manage to do that? thank You I don't want to hijack this thread....but I've written a script for unRAID, and written the guide for it, to do what I assume your end goal is. https://github.com/zakkarry/deluge-mover https://trash-guides.info/Downloaders/Deluge/Tips/Unraid-Mover/ for the detailed guide. I'm working on updating it to be current with the scripts configuration options I've added just today, but it should be fairly simple for you to set up as it sits. Edited November 16, 20232 yr by ambipro quote
November 16, 20232 yr 2 hours ago, binhex said: both are available, use tag name 'libtorrentv1' if you want to use v1 Seems to be working, even did a restart of the container from the dashboard (without quit and shutdown) and no issues. Thanks so much Edited November 16, 20232 yr by ambipro
November 16, 20232 yr 6 minutes ago, rogales said: @ambi just sent You a message. Where? I see nothing.
November 27, 20232 yr Hey Guys not sure if this is the right place to post or not, but I have been using the BinHex version of deluge for a few weeks/months now and its been working absolutely fine. Though over the last few days its stopped downloading any files, no matter from any trackers. I haven't changed any of the config so I'm not sure what's happened, there's no errors in the error log either. I have reinstalled the docker image and of course rebooted Unraid as well. Any help would be greatly appreciated.
November 27, 20232 yr 9 minutes ago, terrorc0j said: Hey Guys not sure if this is the right place to post or not, but I have been using the BinHex version of deluge for a few weeks/months now and its been working absolutely fine. Though over the last few days its stopped downloading any files, no matter from any trackers. I haven't changed any of the config so I'm not sure what's happened, there's no errors in the error log either. I have reinstalled the docker image and of course rebooted Unraid as well. Any help would be greatly appreciated. How Your settings look here?
November 27, 20232 yr 3 minutes ago, rogales said: How Your settings look here? Hi These are my settings
December 14, 20232 yr always download 0 % Hello everyone. I am setting up the new NAS with UNRAID. It is a "small" machine with low power consumption. I opted for a machine with a lot of cache (2x4T in raid1) 4Tb to allow the disks to stand-by as much as possible The machine is this one and I installed these dockers With some swearing I get all the dockers working but deluge seems to work perfectly but the download of any file remains at 0 (image 2) I check the paths ... all fine (image 3-4-5) Especially since the file ".torrent" is written in the correct folder ... so ... it's all correct isn't it!?! I set the docker log level to debug and there is absolutely nothing supervisord.logdeluge-web.logdeluged.log Guys I don't know what to do anymore. Thanks in advance
December 14, 20232 yr Author 7 hours ago, axafax said: Guys I don't know what to do anymore. so on the unraid host do you have a path /mnt/user/Archivio/torrent/scaricamento ? because that is what you have in effect defined in deluge web ui by specifying /data/scaricamento, same question for /mnt/user/Archivio/torrent/completi i see the screenshots above but its not 100% clear whether these paths do exist or not. A debug idea - temporarily set completed folder to /tmp (will cause the download to be written to the containers filesystem), if the download starts then the issue is path and/or permissions related.
December 14, 20232 yr In the meantime, thank you. I confirm that the folders exist (in this image you can also see the absolute path) I tried using the tmp folder. I tried both setting the /data variable and the absolute path. Always the same behaviour is it possible there are some bugs? should I try using an earlier version? Thanks again
April 27, 20242 yr On 11/12/2023 at 3:11 PM, ambipro said: Since I'm the provokation for @mhertz posting this reminder, and as I was going to reach out here myself, I'd like to point out what the request to address this revert/change provides for the user based on my experience using your container and conversations I've had with @mhertz A significant portion of the restarting of the container with the ungraceful shutdown can lead to settings being removed, particularly loaded plugins. These will thus not return upon restarting the container. The addition of -v on the info command makes it functional. Graceful shutdown prevents most errors that would otherwise occur with active/seeding torrents, and can also make sure your stats are sent to the tracker before Deluge is exited. Everything else mentioned in his previous posts/code he linked to... The main way to prevent most of these issues currently, that I have found and use, is to simply 'Quit & Shutdown' before restarting or stopping the container. I typically do this and wait about 20 seconds to be safe. This is not ideal, but is workable in most situations. Hoping some form of what has been suggested/mentioned gets added/fixed in both libtorrentv1 and v2 tags. Appreciate your containers and the effort put in, they've otherwise been phenomonal Edit: Also - off topic, but there is a newer version of libtorrent for v1 Apologies for dragging this up again, cleanly shutting down deluge seems to have been a problem since it's inception lol. I have managed to 'Quit & Shutdown Daemon' from the windows client as mentioned above (does option not exist in the web client?), which seems to have resolved most of the issues I had previously with stopping the docker container from unraid. The issue I'm having now is that the daemon restarts itself. So if I need to shutdown the container for whatever reason I have to 'Quit & Shutdown Daemon', wait long enough that it shuts down cleanly, but not too long or it will have started again. I assume there's something in the Binhex container that's recognizing that the process is no longer running and starting it up again? Can I stop this somehow?
April 27, 20242 yr 3 minutes ago, martinuv said: Apologies for dragging this up again, cleanly shutting down deluge seems to have been a problem since it's inception lol. I have managed to 'Quit & Shutdown Daemon' from the windows client as mentioned above (does option not exist in the web client?), which seems to have resolved most of the issues I had previously with stopping the docker container from unraid. The issue I'm having now is that the daemon restarts itself. So if I need to shutdown the container for whatever reason I have to 'Quit & Shutdown Daemon', wait long enough that it shuts down cleanly, but not too long or it will have started again. I assume there's something in the Binhex container that's recognizing that the process is no longer running and starting it up again? Can I stop this somehow? My experience is exactly the opposite, I have Deluge running for many weeks before restarting, and have no issues when restarting the container from the dashboard in unraid. I used to do what I had mentioned and use quit and shutdown, and it did not restart itself...I'm not sure what init changes were made that may have changed this behavior, but consider I believe it ran with -d it shouldn't restart the daemon, I had a crash a few days ago during some testing of some stuff, and the daemon didn't relaunch. deluge-web kept running but was not connected to any daemon, the two are not mutually exclusive. Edit: If you want to stop the daemon from the webui, go to connection manager, and select the daemon and hit stop daemon. Edited April 27, 20242 yr by ambipro answer question
May 24, 20242 yr Hello there, I would like to ask Your for a help. Lately, even more and more often I'm having a problem with tracker annoucing; Sometimes tracker status give an information of: Error: skipping tracker announce (unreachable) So I've started googling, about this problem. I'm using this topic docker, without VPN, my port is open. https://forum.deluge-torrent.org/viewtopic.php?t=56331 - found this solution, but adding my server IP gives an error about port. So here, port is opened, but as mentioned above, from time to time, I'm getting errored on tracker announce. and here, after putting my server IP address, something is wrong with port: If it's useful, here is my network config; Can someone help me with this problem? Any help would be much apperaciated. Thanks! Edited May 24, 20242 yr by rogales
May 24, 20242 yr The 192.x IP is not the IP to an interface the container has access to, normally you do not need to put an IP in this (particularly for docker containers) at all. This is generally only used for multi-homed (multiple interface) systems. Docker is not one of those systems. You are basically asking to use an interface address it does not have, and thus are not getting any connectivity.
July 5, 20242 yr Hello, thanks for all your hard work maintaining this Deluge image. I have been a happy user until recently, my container stopped successfully starting up on my Unraid 6.12.10 box. I've tried deleting and recreating the container from CA but I still get "bad parameter" on startup. In the detailed docker run log, I see: docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/usr/bin/dumb-init": permission denied: unknown. Is there something I am doing wrong here? Let me know what steps I should try or if I can provide any more info to help diagnose this. I've attached the log containing the full startup command. binhex-delugevpn.log Edited July 5, 20242 yr by mplewis
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.