Archives not extracting (Arch linux, headless)

Support for Ubuntu and other Desktop Linux distributions
Post Reply
merdeonme
Posts: 4
Joined: 21 Nov 2018, 06:55

Archives not extracting (Arch linux, headless)

Post by merdeonme »

I've been running a headless Arch Linux server for a few years now and using Filebot to extract, rename, and move downloaded files using the following script that is run by the Execute deluge plugin:

Code: Select all

#!/bin/bash
TORRENT_ID=$1
TORRENT_NAME=$2
TORRENT_PATH=$3

filebot -script fn:amc --output "/mnt/downloads/deluge/complete/" --log-file amc.log --action copy --conflict override -non-strict --def extractFolder=/mnt/downloads/deluge/extracts "ut_dir=$TORRENT_PATH/$TORRENT_NAME" "ut_kind=multi" "ut_title=$TORRENT_NAME" music=y subtitles=en,es "seriesFormat=/mnt/videos/shows/{n}/{'S'+s}/{n} - {s00e00} - {t}" "movieFormat=/mnt/videos/movies/{n} {y}/{fn}" "musicFormat=/mnt/files/shared/music/{artist}/{album}/{fn}" clean=y
It had been a while since I was able to update filebot through the Arch repositories, but last week I was finally able to update. I noticed today that filebot hadn't been doing its thing and saw that when I ran the above command by hand I got an error about the license. So I bought a 1 year license and applied it to get that error to go away. Unfortunately it still wasn't working. A bit more poking around and I established that it wasn't extracting the files. Running the filebot -extract command yields the following:

Code: Select all

filebot -extract /mnt/downloads/deluge/complete/Last.Week.Tonight.With.John.Oliver.S05E30.720p.HDTV.X264-UAV/last.week.tonight.530.720p-uav.rar
Read archive [last.week.tonight.530.720p-uav.rar] and extract to [/mnt/downloads/deluge/complete/Last.Week.Tonight.With.John.Oliver.S05E30.720p.HDTV.X264-UAV/last.week.tonight.530.720p-uav]
and generates no extracted file.

Running filebot -script fn:sysinfo yields:

Code: Select all

filebot -script fn:sysinfo
FileBot 4.8.4 (r5884)
JNA Native: 5.2.2
MediaInfo: 18.08.1
Apache Commons VFS: [zip, rar]
Chromaprint: 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-10-05 (r536)
Groovy: 2.5.1
JRE: OpenJDK Runtime Environment 1.8.0_192
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 28 MB Used Memory
OS: Linux (amd64)
HW: Linux NASty 4.19.2-arch1-1-ARCH #1 SMP PREEMPT Tue Nov 13 21:16:19 UTC 2018 x86_64 GNU/Linux
DATA: /home/jlg/.config/filebot
Package: AUR
License: FileBot License P6231867 (Valid-Until: 2019-11-21)
Done ヾ(@⌒ー⌒@)ノ
I noticed another recent thread with a similar problem. They recommended using the following command:

Code: Select all

export FILEBOT_OPTS="-Dnet.filebot.Archive.extractor=SevenZipExecutable"
This did not change any of the above output even though I can extract the archive using "7z e". Does anyone have any ideas on what I'm missing? I have java-p7zip-binding installed, which I think i need, but I'm not sure how to tell if it is used or detected.
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Archives not extracting (Arch linux, headless)

Post by rednoah »

Please follow this thread for troubleshooting advice:
viewtopic.php?f=4&t=9513

If the 7z command-line tool works, then so must FileBot (with -Dnet.filebot.Archive.extractor=SevenZipExecutable set). If it doesn't, then either 7z doesn't actually work, or FileBot doesn't actually use 7z, in your particular test case.

Set -Dnet.filebot.logging.debug=ALL to check what 7z command FileBot is running, and what 7z says in return:
viewtopic.php?f=4&t=9513#p40120
:idea: Please read the FAQ and How to Request Help.
merdeonme
Posts: 4
Joined: 21 Nov 2018, 06:55

Re: Archives not extracting (Arch linux, headless)

Post by merdeonme »

Maybe I'm not applying these control flags correctly because I can definitely extract the archive with

Code: Select all

7z e <Archive_Path\File_Name>.


If I'm in a terminal I apply the flag to my environment by running

Code: Select all

export FILEBOT_OPTS="-Dnet.filebot.Archive.extractor=SevenZipExecutable"
and if I want to apply both the 7z executable flag and the debug flag I would use the following?

Code: Select all

export FILEBOT_OPTS="-Dnet.filebot.Archive.extractor=SevenZipExecutable -Dnet.filebot.logging.debug=ALL"
When I do these things though, there is no change to the sysinfo output. Should it show something about p7zip as I've seen on other's sysinfo outputs? If i run printenv I see the FILEBOT_OPTS entries set. The only thing I see in sysinfo relating to zip/rar is the apache commons entry regardless of whether the environment flag is set.

Setting -Dnet.filebot.logging.debug=ALL does not seem to change the output of running filebot -extract
merdeonme
Posts: 4
Joined: 21 Nov 2018, 06:55

Re: Archives not extracting (Arch linux, headless)

Post by merdeonme »

Sorry, I misread the debug flag setting. I now realize that it should be:

Code: Select all

export JAVA_OPTS="-Dnet.filebot.logging.debug=ALL"
Doing this does not seem to provide any additional useful information when running the filebot -extract command:

Code: Select all

filebot -extract /mnt/downloads/deluge/complete/Last.Week.Tonight.With.John.Oliver.S05E30.720p.HDTV.X264-UAV/last.week.tonight.530.720p-uav.rar
Using persistent disk cache /home/jlg/.config/filebot/cache/0
Read archive [last.week.tonight.530.720p-uav.rar] and extract to [/mnt/downloads/deluge/complete/Last.Week.Tonight.With.John.Oliver.S05E30.720p.HDTV.X264-UAV/last.week.tonight.530.720p-uav]
My printenv contains:

Code: Select all

JAVA_OPTS=-Dnet.filebot.logging.debug=ALL
FILEBOT_OPTS=-Dnet.filebot.Archive.extractor=SevenZipExecutable
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Archives not extracting (Arch linux, headless)

Post by rednoah »

JAVA_OPTS and FILEBOT_OPTS can be used interchangeably. Either will work.

:idea: You can call filebot -script fn:sysinfo and filebot -script fn:sysenv to verify that FileBot is working with the options you want.

If full debug logging is enabled, then Using persistent disk cache will be the first line to appear in the console output:

Code: Select all

$ export FILEBOT_OPTS="-Dnet.filebot.Archive.extractor=SevenZipExecutable -Dnet.filebot.logging.debug=ALL"
$ filebot -extract .
Using persistent disk cache ...
Read archive ...
...


EDIT:

Note that I'm talking about the official 4.8.2 portable package for any Linux OS. If you're using Arch, you may be using the AUR package which is not made or maintained by me, so their launcher may or may not propagate the environment variables mentioned above. Best to have a look at the filebot.sh script and compare with the one from the portable package, to check what's going on, or not going on.
:idea: Please read the FAQ and How to Request Help.
merdeonme
Posts: 4
Joined: 21 Nov 2018, 06:55

Re: Archives not extracting (Arch linux, headless)

Post by merdeonme »

Thanks for the quick replies.

I am indeed using the AUR package, and your edit pointed me in the right direction.

If anyone else is using the AUR filebot package for Arch (or an arch variant) I was able to resolve the extracting issue by editing the file:

Code: Select all

/usr/bin/filebot
to look like:

Code: Select all

#!/bin/bash

# force JVM language and encoding settings
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"

APP_ROOT=/usr/share/java/filebot

# add APP_ROOT to LD_LIBRARY_PATH
if [ ! -z "$LD_LIBRARY_PATH" ]; then
        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APP_ROOT"
else
        export LD_LIBRARY_PATH="$APP_ROOT"
fi

# choose extractor
#EXTRACTOR="ApacheVFS"                  # use Apache Commons VFS2 with junrar plugin
 EXTRACTOR="SevenZipExecutable" # use the 7z executable
# EXTRACTOR="SevenZipNativeBindings"    # use the lib7-Zip-JBinding.so native library

# start filebot
/usr/lib/jvm/java-8-openjdk/bin/java -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.us$
The only change from the default install is that I commented line 17 and uncommented line 18 to get filebot to use the p7zip executable instead of ApacheVFS. I have not tested with lib7-Zip-JBinding.so, but I imagine that may work as well.

Thanks for the help!
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Archives not extracting (Arch linux, headless)

Post by rednoah »

I'll see if I can work with the AUR maintainers so we can make their package more in line with the official release, and options that are supposed to work.
:idea: Please read the FAQ and How to Request Help.
Post Reply