Laharah / deluge-FileBotTool

A plugin to integrate simple FileBot functionality into Deluge
GNU General Public License v3.0
114 stars 10 forks source link

Filebot Not Found #22

Closed ryancom16 closed 7 years ago

ryancom16 commented 7 years ago

I'll start this off by saying that I have tried mostly everything.

Deluge-Daemon Setup

Deluge
Client: 1.3.13
Server: 1.3.13-6 installed from the synology package manager
Synology DSM 6.0.2-8451 Update 9
Python 2.7
FileBotTool-1.1.4-py2.7.egg installed both client and server
FileBot 4.7.7 (r4678) / OpenJDK Runtime Environment 1.8.0_101 / Linux 3.10.77 (amd64)

Deluge Error Log [ERROR ] 01:04:53 common:52 [FilebotTool] Filebot cannot be found!

I am able to ssh in and run filebot -version just fine sudo -u deluge /usr/local/bin/filebot -version runs fine as well.

All sym links in usr/bin/ usr/local/bin exist

I even compiled from git directly on the server and used the created egg but it didn't run so I had to revert.

Issue with deluge plugins: No config option show in the daemon

any help would be appreciated

Laharah commented 7 years ago

Most of the time when this comes up, it's either a permissions issue or an incorrect plugin version. Are you certain that the symlinks in usr/bin and usr/local/bin are accessable by the deluge user particularly usr/bin? because even if filebot isn't in the path, it checks those locations explicitly. And are you sure that deluge is being launched by the deluge user? Check and make sure with a ps aux | grep deluged while it's running

Can you right click a torrent in the client and bring up the filebottool rename dialog, or does the plugin never load at all? If you can at least bring up the dialog that's a start. Also, make sure you're connected to the server deluge daemon and you aren't seeing errors from your local deluge.

another thing you might try; I can't imagine that this won't work correctly, but can you run this successfully on your server?: sudo -u deluge echo 'import subprocess; subprocess.Popen(["/usr/bin/filebot", "-version"])' | python

that filebot not found error message comes up when there is some sort of OSError during a filebot call and that might show it in more detail, but I doubt it will get triggered.

I've also never personally tried to run the plugin on a synology, so I'm not sure what specific sandboxing or other differences it may have from a normal linux distro. I do know that at least one person has gotten it running successfully on synology without too much trouble, so it's definitely possible.

ryancom16 commented 7 years ago

Hello,

Thank you for helping me with this.

Are you certain that the symlinks in usr/bin and usr/local/bin are accessable by the deluge user particularly usr/bin?

usr/bin has read and execute permisions 755 usr/bin/filebot - 777

And are you sure that deluge is being launched by the deluge user? Check and make sure with a ps aux | grep deluged while it's running

admin 4304 0.0 0.0 23116 972 pts/6 S+ 12:25 0:00 grep --color=au to deluged deluge 23687 0.8 0.0 377440 13232 ? Sl 01:04 5:50 /usr/local/delu ge/env/bin/python /usr/local/deluge/env/bin/deluged --config /usr/local/deluge/v ar/ --logfile /usr/local/deluge/var/deluged.log --loglevel info --pidfile /usr/l ocal/deluge/var/deluged.pid

Can you right click a torrent in the client and bring up the filebottool rename dialog, or does the plugin never load at all? If you can at least bring up the dialog that's a start. Also, make sure you're connected to the server deluge daemon and you aren't seeing errors from your local deluge.

Yes, context menu filebot shows and so does the rename dialog. I am connected to the server deluge. Classic mode is disabled. I think that there may be problems with the synology package distribution. Should the plugins have a server side configuration option in preferences? I can tell it is definitely wonky. I am thinking of using the docker implementation.

another thing you might try; I can't imagine that this won't work correctly, but can you run this successfully on your server?: sudo -u deluge echo 'import subprocess; subprocess.Popen(["/usr/bin/filebot", "-version"])' | python

worked fine

I do know that at least one person has gotten it running successfully on synology without too much trouble, so it's definitely possible.

I think I saw that one. Something about adding it to the path variable. usr/bin and usr/local/bin are already in the path variable. How would you add filebot any other way?

I am starting to think that the synology package may have issues...

Laharah commented 7 years ago

it's certainly possible. It looks like deluge is using a local copy of python rather than the system python. could you try re-running the python test using that python?:

sudo -u deluge echo 'import subprocess; subprocess.Popen(["/usr/bin/filebot", "-version"])' | /usr/local/deluge/env/bin/python

just to see if it works. It may prevent it from running outright, but it may let it through and we might see some more info about the OSError, though I'm not sure how that could be causing problems since deluge's permissions should be the only ones that matter.

ryancom16 commented 7 years ago

It works!!

8 days of troubleshooting

How... I don't know. Since my last post I Reinstalled DSM 6 ReSetup my entire NAS Installed the syno package deluge and all dependencies - Didn't work Reinstall reinstall reinstall Installed Docker version of deluge, root priveledges, the works - Didn't work

read somewhere the the $PATH was different for different ~/.profile So, I tried running filebot -version from they synology task scheduler - Java: Command not found hmmmm Read up, Added a symlink to Java in usr/bin filebot -version now works. deluge docker still didn't work. I am fed up at this point stop the docker, install the same synology package added filebot to my thin client and server side deluge Client side Deluge: Right click - Filebot Tool... Eureka!

In summary, Synology users: Install Unofficial Java Installer from Here ~It is in the Filebot Package source so it is an easy installation Do not install the official "Java 8" installer from synoCommunity. Filebot will not run correctly

Install Node JS v4 *might not be necessary Use both synoCommunity and Filebot official syno packages Make sure symlinks for Filebot and java are in usr/bin Do a test with task scheduler, add a task as root, running every minute, Script is "filebot -version" In the main scheduler window, Click Settings and enable output. Select a location and it will start printing logs there. You should get your customary

FileBot 4.7.7 (r4678) / OpenJDK Runtime Environment 1.8.0_101 / Linux 3.10.77 (amd64)

If this doesn't work, neither will the filebot plugin

To be honest, I am not sure exactly what made it work. Thank you for all your help!!

Laharah commented 7 years ago

Hey! I'm glad you got it working. That sounds like a major trial. If I can get my hands on a synology box I'll see if I can't pin down what was going wrong and make it easier to get running. I'll also link this in the troubleshooting wiki.

ryancom16 commented 7 years ago

Thank you, I am using it now and I am glad I saw it through. Totally worth it.

On Tue, Feb 7, 2017 at 12:45 AM, Jared Anderson notifications@github.com wrote:

Closed #22 https://github.com/Laharah/deluge-FileBotTool/issues/22.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Laharah/deluge-FileBotTool/issues/22#event-951752143, or mute the thread https://github.com/notifications/unsubscribe-auth/AF8gjG9BF9Q9vmY8-VFvMXDbqTgXci08ks5raD0pgaJpZM4Lydhs .