Page 1 of 1

[SOLVED] Bug with running as cronjob

Posted: 10 Aug 2014, 13:53
by f3bruary
Hi rednoah,

I'm trying to get my script running through cron. I made a script and it works perfectly when I call it via the command line. But when I use cron or the Synology's task scheduler it won't fetch anything.

It does run, I can see that in top/ps. It just won't fetch anything for some reason. I started playing around with logging and cron and managed to get the following error.

Code: Select all

Failure (°_°)
FileNotFoundException: https://raw.githubusercontent.com/filebot/scripts/master/suball.groovy
java.io.FileNotFoundException: https://raw.githubusercontent.com/filebot/scripts/master/suball.groovy
        at net.sourceforge.filebot.web.WebRequest.fetch(WebRequest.java:140)
        at net.sourceforge.filebot.web.WebRequest.fetchIfModified(WebRequest.java:118)
        at net.sourceforge.filebot.web.CachedResource.fetchData(CachedResource.java:32)
        at net.sourceforge.filebot.web.CachedResource.fetchData(CachedResource.java:11)
        at net.sourceforge.filebot.web.AbstractCachedResource.fetch(AbstractCachedResource.java:133)
        at net.sourceforge.filebot.web.AbstractCachedResource.get(AbstractCachedResource.java:78)
        at net.sourceforge.filebot.cli.ArgumentProcessor$DefaultScriptProvider.fetchScript(ArgumentProcessor.java:236)
        at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:84)
        at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:123)
        at net.sourceforge.filebot.Main.main(Main.java:192)
Failure (°_°)
As you can see it's trying to find the suball script in the master branch instead of the devel branch. I'm NOT getting this error when I run the script via command line just via cron.

Any idea on how to get this working ?

Re: Bug with running as cronjob

Posted: 10 Aug 2014, 14:31
by rednoah
FileBot 4.0/4.1 is no longer supported and scripting does not work anymore for those revisions. Just upgrade to 4.2 or higher.

Re: Bug with running as cronjob

Posted: 10 Aug 2014, 15:07
by f3bruary
Updated through the ipk file. Running 4.2 (r2326). The error occurred again, then I noticed I also had filebot installed through the synocommunity repo's which was outdated. I removed that one so now I only have the latest version.

Another error was received.

Code: Select all

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x4b5f0744, pid=17003, tid=1082659952
#
# JRE version: Java(TM) SE Embedded Runtime Environment (8.0-b132) (build 1.8.0-b132)
# Java VM: Java HotSpot(TM) Embedded Client VM (25.0-b70 mixed mode linux-arm )
# Problematic frame:
# C  [jna3978417464801502291.tmp+0x12744]  ffi_prep_cif_machdep+0x16c
#
# Core dump written. Default location: /volume1/video/series/core or core.17003
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x40906400):  JavaThread "main" [_thread_in_native, id=17004, stack(0x40832000,0x40882000)]

siginfo:si_signo=SIGILL: si_errno=0, si_code=1 (ILL_ILLOPC), si_addr=0x4b5f0744

Registers:
  r0  = 0x4b5f4828
  r1  = 0x00000003
  r2  = 0x00000003
  r3  = 0x0000000a
  r4  = 0x4087d3c4
  r5  = 0x00000002
  r6  = 0x4087cb80
  r7  = 0x00000008
  r8  = 0x4c559744
  r9  = 0x00000002
  r10 = 0x00000002
  fp  = 0x4087cb0c
  r12 = 0x4b5fd2bc
  sp  = 0x4087cae8
  lr  = 0x4b5ed520
  pc  = 0x4b5f0744
  cpsr = 0x80000010

Top of Stack: (sp=0x4087cae8)
0x4087cae8:   00000002 4090652c 00000002 4087cb80
0x4087caf8:   00000008 4c559744 00000002 00000002
0x4087cb08:   4087cb24 4b5ed520 00000002 4b5f4828
0x4087cb18:   4087cb40 40774230 4087d424 4b5e3a1c
0x4087cb28:   4087cb40 00000000 4087cb70 4087cb78
0x4087cb38:   4ab07728 0000000d 4b5f4804 4b5f4804
0x4087cb48:   000000c0 00000000 00000000 4b6a5e2c
0x4087cb58:   4b5dec14 40009ffc 00000002 4087d4a0 

Instructions: (pc=0x4b5f0744)
0x4b5f0724:   1a000001 eaffffc9 e2822001 e1a03251
0x4b5f0734:   e3130001 1afffffb e1c421bc eaffffc3
0x4b5f0744:   e6bf2073 e3a01001 e1a02211 e312000d
0x4b5f0754:   0a000005 e5843014 e5943000 e3530002 

Register to memory mapping:

  r0  = 0x4b5f4828
0x4b5f4828: ffi_type_sint32+0 in /opt/share/filebot/data/temp/jna-3506402/jna3978417464801502291.tmp at 0x4b5de000

  r1  = 0x00000003
0x00000003 is an unknown value

  r2  = 0x00000003
0x00000003 is an unknown value

  r3  = 0x0000000a
0x0000000a is an unknown value

  r4  = 0x4087d3c4
0x4087d3c4 is pointing into the stack for thread: 0x40906400

  r5  = 0x00000002
0x00000002 is an unknown value

  r6  = 0x4087cb80
0x4087cb80 is pointing into the stack for thread: 0x40906400

  r7  = 0x00000008
0x00000008 is an unknown value

  r8  = 0x4c559744
0x4c559744 is an unknown value

  r9  = 0x00000002
0x00000002 is an unknown value

  r10 = 0x00000002
0x00000002 is an unknown value

  fp  = 0x4087cb0c
0x4087cb0c is pointing into the stack for thread: 0x40906400

  r12 = 0x4b5fd2bc
0x4b5fd2bc: <offset 0x1f2bc> in /opt/share/filebot/data/temp/jna-3506402/jna3978417464801502291.tmp at 0x4b5de000

  sp  = 0x4087cae8
0x4087cae8 is pointing into the stack for thread: 0x40906400

  lr  = 0x4b5ed520
0x4b5ed520: ffi_prep_cif+0x2c in /opt/share/filebot/data/temp/jna-3506402/jna3978417464801502291.tmp at 0x4b5de000

  pc  = 0x4b5f0744
0x4b5f0744: ffi_prep_cif_machdep+0x16c in /opt/share/filebot/data/temp/jna-3506402/jna3978417464801502291.tmp at 0x4b5de000



Stack: [0x40832000,0x40882000],  sp=0x4087cae8,  free space=298k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [jna3978417464801502291.tmp+0x12744]  ffi_prep_cif_machdep+0x16c
This is what happened when running from command line manually.
Command is: ' filebot -script fn:suball --lang en --output srt /volume1/video/series --def maxAgeDays=7'

Re: Bug with running as cronjob

Posted: 10 Aug 2014, 16:19
by rednoah
Your system is incompatible with the native libraries that are included in the .ipk package. So just remove all the *.so files and try again. Or use the portable, or use my synology package.

Re: Bug with running as cronjob

Posted: 10 Aug 2014, 17:07
by f3bruary
Removing the .so files didn't help. It would run via command line but not via cron. Not at all actually, no error either. So I removed filebot completely. Added the repo (didn't know you created one btw) and tried it install but it wouldn't. Only error I got was 'error' :p.

I checked /var/log/messages and it said it couldn't download and/or extract the spk file. So I downloaded it myself and installed it. It's now installed and working and it seems running it through cron works too !

Thanks a lot.

Re: [SOLVED] Bug with running as cronjob

Posted: 24 Jan 2016, 13:05
by f3bruary
Sorry to bring this old thread up again but I'm having the same issue again. I am, however, using the syno package. I think it's still related to mediainfo cause I had to install the syn package 'mediainfo' to make Sonarr work again.

It's not in any filebot directories though, like in /volume1/@appstore/filebot or /usr/local/filebot. It's only in /volume1/@appstore/mediainfo/ in ""/Plex and ""/NzbDrone (sonarr).

How can I use filebot without having to uninstall the mediainfo package which would break Sonarr... ?

Re: [SOLVED] Bug with running as cronjob

Posted: 24 Jan 2016, 13:19
by rednoah
You could modify filebot.sh and remove the mediainfo from the library path.

Re: [SOLVED] Bug with running as cronjob

Posted: 24 Jan 2016, 13:35
by f3bruary
thanks, it seems to work although I get the following randomly:

Code: Select all

Jan 24, 2016 2:33:58 PM net.filebot.subtitle.SubtitleMetrics$5 lambda$getVideoProperties$40
WARNING: net.filebot.mediainfo.MediaInfoException: Unable to load arm native library libmediainfo.so: Could not initialize class net.filebot.mediainfo.MediaInfoLibrary
It is fetching stuff though.