FileBot Node 0.2.0 for DSM 6

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
User avatar
rednoah
The Source
Posts: 19156
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot Node 0.2.0 for DSM 6

Post by rednoah »

The new Synology DSM Spreadsheets application requires Node.js 4 so there's a good chance that they'll make it work eventually because their own apps require it as well.
:idea: Please read the FAQ and How to Request Help.
leejk
Posts: 30
Joined: 03 Oct 2015, 04:18

Re: FileBot Node 0.2.0 for DSM 6

Post by leejk »

Hello,

I can't get filbert node to work here either on DSM 6. As another poster stated about uninstalling everything, java, node.js, etc., I tried that and got a little further. Filebot-node will now not throw the error user axinorm posted previously here, but a new one:

Code: Select all

[email protected]:/usr/local/filebot-node$ ./start
ENVIRONMENT { FILEBOT_TASK_CMD: '/usr/local/filebot-node/task',
  FILEBOT_NODE_HTTPS_KEY: '/usr/syno/etc/certificate/system/default/privkey.pem',
  SHELL: '/bin/sh',
  TERM: 'xterm-256color',
  FILEBOT_CMD_UID: '1024',
  SSH_CLIENT: '192.168.0.103 50642 22',
  OLDPWD: '/usr/local/filebot-node',
  SSH_TTY: '/dev/pts/1',
  LC_ALL: 'en_US.utf8',
  JAVA_OPTS: '-Xmx706m',
  USER: 'admin',
  FILEBOT_CMD_CWD: '/volume1',
  PAGER: 'more',
  FILEBOT_NODE_HTTPS_PORT: '5453',
  PATH: '/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/var/packages/Java8/target/j2sdk-image/bin:/var/packages/Java8/target/j2sdk-image/jre/bin',
  MAIL: '/var/mail/admin',
  FILEBOT_CMD_GID: '101',
  PWD: '/usr/local/filebot-node',
  JAVA_HOME: '/var/packages/Java8/target/j2sdk-image/jre',
  LANG: 'en_US.utf8',
  FILEBOT_NODE_HOST: '0.0.0.0',
  FILEBOT_NODE_HTTPS_CRT: '/usr/syno/etc/certificate/system/default/cert.pem',
  HOME: '/var/services/homes/admin',
  SHLVL: '2',
  TERMINFO: '/usr/share/terminfo',
  FILEBOT_CMD: 'filebot',
  FILEBOT_NODE_HTTPS: 'YES',
  LOGNAME: 'admin',
  SSH_CONNECTION: '192.168.0.103 50642 192.168.0.101 22',
  CLASSPATH: '.:/var/packages/Java8/target/j2sdk-image/jre/lib',
  FILEBOT_NODE_HTTP_PORT: '5452',
  PGDATA: '/var/services/pgsql',
  FILEBOT_NODE_AUTH: 'SYNO',
  FILEBOT_NODE_HTTP: 'YES',
  FILEBOT_NODE_CLIENT: '',
  _: '/usr/local/bin/node' }
USER { UID: 1024, GID: 101 }
filebot-node listening at http://0.0.0.0:5452
fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EACCES: permission denied, open '/usr/syno/etc/certificate/system/default/privkey.pem'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.readFileSync (fs.js:397:15)
    at Object.<anonymous> (/volume1/@appstore/filebot-node/server/app.js:537:17)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
A permission denied error is being thrown when trying to read the privkey.pem. Filebot Note will start up in the web gui tho, but it will not execute any commands. For example, if I run the system info command, it fails and reports back:

Code: Select all

filebot -script 'fn:sysinfo'

------------------------------------------

/usr/local/bin/filebot: line 53: java: command not found
------------------------------------------

[Process error]
However, if I log in as admin over ssh and run that same command, the commands runs as it should. I'm logged in as admin in the web gui as well. Note that I am using the Synology packages for Java 8 and Node.js v4. My previous Filebot tasks I have setup in the task scheduler do not run or produce any log results. Any thoughts on this error?

thx
User avatar
rednoah
The Source
Posts: 19156
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot Node 0.2.0 for DSM 6

Post by rednoah »

1.
Does /usr/syno/etc/certificate/system/default/privkey.pem exist at all?


2.
This is a completely different issue, and has nothing to do with the HTTPS / private key issue above.

This means that java is not installed (correctly) which means you didn't use my java installer to install java:

Code: Select all

/usr/local/bin/filebot: line 53: java: command not found
:idea: Please read the FAQ and How to Request Help.
User avatar
ChilliNr1
Posts: 11
Joined: 20 Aug 2013, 20:57

Re: FileBot Node 0.2.0 for DSM 6

Post by ChilliNr1 »

Hi,

same problem I had before: Line 53 Problem
And I used your Java installer, but it points Java to a different folder...
If you find a solution for that, please let me know!

Greets
User avatar
rednoah
The Source
Posts: 19156
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot Node 0.2.0 for DSM 6

Post by rednoah »

What does the log say? Java SE -> View Log
:idea: Please read the FAQ and How to Request Help.
EmbraceNext
Posts: 4
Joined: 06 Apr 2016, 00:43

Re: FileBot Node 0.2.0 for DSM 6

Post by EmbraceNext »

For Java, do we still have to use your installer now that DSM 6 has an official Java 8 installer?
leejk
Posts: 30
Joined: 03 Oct 2015, 04:18

Re: FileBot Node 0.2.0 for DSM 6

Post by leejk »

rednoah wrote:1.
Does /usr/syno/etc/certificate/system/default/privkey.pem exist at all?
yes, and it's owned by root.
rednoah wrote: 2.
This is a completely different issue, and has nothing to do with the HTTPS / private key issue above.

This means that java is not installed (correctly) which means you didn't use my java installer to install java:

Code: Select all

/usr/local/bin/filebot: line 53: java: command not found
Correct, as mentioned I used the Synology java 8 pkg. Wouldn't that work?

Issuing the following from the command line works, but does not work in Filebot Node, thus the error.

Code: Select all

/usr/local/bin/filebot -script 'fn:sysinfo'
Executing java -version from the ssh command line results in:

Code: Select all

[email protected]:~$ java -version
openjdk version "1.8.0_60"
OpenJDK Runtime Environment (IcedTea 3.0.0pre06) (linux-gnu build 1.8.0_60-b24)
OpenJDK Zero VM (build 25.60-b23, interpreted mode)
Java is installed.

thx
User avatar
rednoah
The Source
Posts: 19156
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot Node 0.2.0 for DSM 6

Post by rednoah »

1.
your shell != other programs running as other users not called by your shell
The $PATH is different. The java executable is expected to be in the system path, i.e. linked to /usr/local/bin/java and not just added to your admin shell profile.


2.
Correct, as mentioned I used the Synology java 8 pkg. Wouldn't that work?
I guess not.

I recommend using the Oracle JDK. I even made package. You better have a really good excuse for not using it. ;)

EDIT:

Case and point: viewtopic.php?f=13&t=3595
:idea: Please read the FAQ and How to Request Help.
leejk
Posts: 30
Joined: 03 Oct 2015, 04:18

Re: FileBot Node 0.2.0 for DSM 6

Post by leejk »

Ok, verfied that the synology java 8 pkg will not work. i installed yours and it's back to working now.

thx
LiF3
Posts: 3
Joined: 07 Apr 2016, 22:35

Re: FileBot Node 0.2.0 for DSM 6

Post by LiF3 »

Hey rednoah,
first of all thanks for your indeed very excellent work and support here. Its greatly appreciated!
That said, i unfortunately seem to be unable to resolve an issue that closely resembles the one anxinom described.
I can launch filebot node via webmanager and it looks just fine, but i cannot browse for folders and the log stays empty, it basically doesnt do anything. When i try to open the dropdown to browse for a folder, it gives me the loading animation for a few seconds, then the dropdown disappears and i cant even bring it back up again unless i close and reopen the app. This is true for both dropdowns btw, so they both attempt to load, fail and refuse do anything from thereon. Somehow it rememberes my preferences though, despite me reinstalling it multiple times and even deleting a remaining filebot folder in "@appstore", so there appear to be some files remaining that im unable to find, maybe that could cause some trouble?
I did as suggested in this thread, which is to remove all packages involved in this and then install them in the order anxinom used so fix his problem.
Conclusively, my setup is as follows, installed in that order:

- Oracle Java Se 1.8.0_77 (via your installer, only version of Java installed)
- Node.js v4 4.2.6-0158 (only version of Node.js installed)
- FileBot 4.6.1
- FileBot Node 0.2.0-B1 (manually)

Still, when running manually as root it gives me the exact same response he got beforehand:

Code: Select all

/usr/local/filebot-node# ./start
ENVIRONMENT { FILEBOT_TASK_CMD: '/usr/local/filebot-node/task',
  FILEBOT_NODE_HTTPS_KEY: '/usr/syno/etc/certificate/system/default/privkey.pem',
  TERM: 'xterm-256color',
  SHELL: '/bin/ash',
  FILEBOT_CMD_UID: '1024',
  OLDPWD: '/usr/local/filebot-node',
  LC_ALL: 'en_US.utf8',
  JAVA_OPTS: '-Xmx351m',
  USER: 'admin',
  FILEBOT_CMD_CWD: '/volume1',
  SUDO_USER: 'admin',
  SUDO_UID: '1024',
  USERNAME: 'root',
  PAGER: 'more',
  FILEBOT_NODE_HTTPS_PORT: '5453',
  PATH: '/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin',
  MAIL: '/var/mail/root',
  FILEBOT_CMD_GID: '101',
  PWD: '/usr/local/filebot-node',
  JAVA_HOME: '/usr/local/java',
  LANG: 'en_US.utf8',
  FILEBOT_NODE_HOST: '0.0.0.0',
  FILEBOT_NODE_HTTPS_CRT: '/usr/syno/etc/certificate/system/default/cert.pem',
  HOME: '/root',
  SUDO_COMMAND: '/bin/ash',
  SHLVL: '2',
  TERMINFO: '/usr/share/terminfo',
  FILEBOT_CMD: 'filebot',
  FILEBOT_NODE_HTTPS: 'YES',
  LOGNAME: 'root',
  FILEBOT_NODE_HTTP_PORT: '5452',
  PGDATA: '/var/services/pgsql',
  FILEBOT_NODE_AUTH: 'SYNO',
  SUDO_GID: '100',
  FILEBOT_NODE_HTTP: 'YES',
  FILEBOT_NODE_CLIENT: '',
  _: '/usr/local/bin/node' }
USER { UID: 1024, GID: 101 }
filebot-node listening at http://0.0.0.0:5452
filebot-node listening at https://0.0.0.0:5453
I am missing the mentioned folder as well:

Code: Select all

/usr/syno/synoman/webman/3rdparty# ls
addon-aws_s3      CloudStation        MediaServer      TextEditor
addon-azure_blob  CloudStationClient  NoteStation      VideoStation
addon-hicloud_s3  CloudSync           PhotoStation     VPNCenter
addon-sfr_s3      DownloadStation     phpMyAdmin       WebDAVServer
AntiVirus         iTunesServer        README           WebStation
AudioStation      MariaDB             StorageAnalyzer  WordPress
The Start-Stop-Status is where my case starts to derive from anxinoms:

Code: Select all

[email protected]:~# cat /var/packages/filebot-node/scripts/start-stop-status
#!/bin/sh

case "$1" in
	start)
		initctl start "$SYNOPKG_PKGNAME"
		exit 0
	;;

	stop)
		initctl stop "$SYNOPKG_PKGNAME"
		exit 0
	;;

	status)
		initctl status "$SYNOPKG_PKGNAME" | grep "running"
		exit $?
	;;

	log)
		echo "$SYNOPKG_PKGDEST/node.log"
		exit 0
	;;

	*)
		exit 0
	;;
esac
Since i do not have the slightest idea what any of this means i headed over to the troubleshooting page, did what you suggested and checked for http accessibility which appears to be given if i interpret the response correctly. (although, to be fair, my interpretation is mainly based on the words "success" and "true" right at the end. Success is good, right?)

Code: Select all

[email protected]:~# curl -v http://192.168.0.100:5452/auth
> GET /auth HTTP/1.1
> Host: 192.168.0.100:5452
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Type: text/json
< Access-Control-Allow-Origin: *
< Date: Thu, 07 Apr 2016 23:03:11 GMT
< Connection: keep-alive
< Content-Length: 51
< 
{"success":true,"data":{"auth":"SYNO","user":null}}[email protected]:~# 
Anyway, i hope you can help me.

Best regards,

LiF3
User avatar
rednoah
The Source
Posts: 19156
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot Node 0.2.0 for DSM 6

Post by rednoah »

Point 1 and 2 looks good. Now continue with 3 and 4:
viewtopic.php?f=13&t=3368
Does your firewall allow TCP traffic on ports 5452 and 5453? FileBot Node will use HTTP on port 5452, and HTTPS on port 5453.
Does it work if you connect via IP and HTTP work? What about HOST and HTTPS?
The curl request shows that the service is working. But somehow the website / your browser can't connect to the service. Sounds like a network problem. Are you accessing the DSM UI from the local network?
:idea: Please read the FAQ and How to Request Help.
LiF3
Posts: 3
Joined: 07 Apr 2016, 22:35

Re: FileBot Node 0.2.0 for DSM 6

Post by LiF3 »

Well, thats a little embarrassing. Why did i do everything mentioned in this forum, most of it multiple times, just to stop at opening the ports? Works like a charm now! :D Thank you very much. And sorry for bothering you for no actual reason. :p
User avatar
rednoah
The Source
Posts: 19156
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot Node 0.2.0 for DSM 6

Post by rednoah »

Haha, finally for once the issue that should be the issue, is actually the issue. :P For the sake of documentation, do you mind explaining the steps on how you fixed for the next guy?


PS: FileBot should be installing a DSM firewall profile. Did you have to enable it manually? Or did you have to set it on the router?
:idea: Please read the FAQ and How to Request Help.
LiF3
Posts: 3
Joined: 07 Apr 2016, 22:35

Re: FileBot Node 0.2.0 for DSM 6

Post by LiF3 »

Yeah, sure. So here is what i did:

- removed all versions of Java, node and FileBot
- rebooted
- Installed Java Se 1.8.0_77 via your unofficial installer
- Installed Node.js v4
- Installed FileBot
- Installed FileBot Node 0.2.0-B1 (manually)
- Opened TCP Ports 5452 and 5453 on my Router (manually, since apparently synology cant enter more than 10 rules via the built in router config)
- (maybe rebooted)
- Voila! Works like a charm. Great piece of Software!

As to the firewall im sure it would have worked just fine as well, but i do not have that activated since my router supposedly handles that.
EmbraceNext
Posts: 4
Joined: 06 Apr 2016, 00:43

Re: FileBot Node 0.2.0 for DSM 6

Post by EmbraceNext »

I am missing something then. What does filebot need to connect to on 5452 and 5453? Where is it going? Leaving my local network?
User avatar
rednoah
The Source
Posts: 19156
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot Node 0.2.0 for DSM 6

Post by rednoah »

You need to open these ports so that YOU can talk TO filebot-node service running on the NAS from an outside network.

From inside the network, filebot has no problem connecting to outside services (e.g. TheTVDB, TheMovieDB, AniDB, etc).
:idea: Please read the FAQ and How to Request Help.
DNA6a
Posts: 22
Joined: 13 Apr 2016, 20:05

Re: FileBot Node 0.2.0 for DSM 6

Post by DNA6a »

[email protected]:~# filebot -script fn:sysinfo
Using persistent disk cache /volume1/@appstore/filebot/data/root/cache/0
FileBot 4.6.2 (r3720)
JNA Native: 4.0.1
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'zen': Native library (linux-x86-64/libzen.so) not found in resource path ([file:/volume1/@appstore/filebot/FileBot.jar])
Apache Commons VFS: [zip, ftps, rar, ftp, tar, tgz, tbz2, sftp]
Chromaprint: java.io.IOException: Cannot run program "/usr/local/chromaprint/bin/fpcalc": error=2, No such file or directory
Extended Attributes: OK
Groovy Engine: 2.4.6
JRE: OpenJDK Runtime Environment 1.8.0_60 (headless)
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 479 MB Max Memory / 15 MB Used Memory
OS: Linux (amd64)
Package: SPK
Data: /volume1/@appstore/filebot/data/root
uname: Linux DiskStation 3.10.77 #7321 SMP Wed Mar 23 11:47:12 CST 2016 x86_64 GNU/Linux synology_cedarview_1812+
Done ヾ(@⌒ー⌒@)ノ


My synology DS1812+ is an intel CPU how do I install the unofficial Java that you recommended rednoah?

I am an absolute noob I apologise but cant wait to run filebot :) I have the other stuff setup just having issues with the Java part then I should be good to go TIA

:)
User avatar
rednoah
The Source
Posts: 19156
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot Node 0.2.0 for DSM 6

Post by rednoah »

Find Package -> Java Installer -> Click Install

If it doesn't work: Oracle Java -> View Log
:idea: Please read the FAQ and How to Request Help.
DNA6a
Posts: 22
Joined: 13 Apr 2016, 20:05

Re: FileBot Node 0.2.0 for DSM 6

Post by DNA6a »

Which package is compatible for my Intel based Synology though man?
DNA6a
Posts: 22
Joined: 13 Apr 2016, 20:05

Re: FileBot Node 0.2.0 for DSM 6

Post by DNA6a »

Ahhhh there was an unofficial installer in the syno community section!! :)
ward0
Posts: 14
Joined: 09 Apr 2016, 10:58

Re: FileBot Node 0.2.0 for DSM 6

Post by ward0 »

Can someone let us know if this method works pls.

- removed all versions of Java, node and FileBot
- rebooted
- Installed Java Se 1.8.0_77 via your unofficial installer
- Installed Node.js v4
- Installed FileBot
- Installed FileBot Node 0.2.0-B1 (manually)
- Opened TCP Ports 5452 and 5453 on my Router (manually, since apparently synology cant enter more than 10 rules via the built in router config)
- (maybe rebooted)
- Voila! Works like a charm. Great piece of Software!

Can you let us know what packages we should install trough synocommunity and what manuel? What are the steps to install - Installed FileBot Node 0.2.0-B1 (manually) pls?
recker
Posts: 3
Joined: 28 Mar 2016, 19:13

Re: FileBot Node 0.2.0 for DSM 6

Post by recker »

I followed this precisely ... still getting the "Failed to run the Package Service" when attempting to run FileBot Node 0.2.0-B1. Everything up to that point installs just fine. I've even verified that the TCP ports 5452 and 5453 are open in my router.

Rednoah ... any thoughts??? There is no log for FileBot Node since its not able to run.

I'm running a DS1515+ with DSM 6.0-7321 Update 3.
DNA6a
Posts: 22
Joined: 13 Apr 2016, 20:05

Re: FileBot Node 0.2.0 for DSM 6

Post by DNA6a »

@recker Did you install the Unofficial Javapackage in synocommunities package? Not the Java8 in maind area?

And Node.Js v4 package installed?
recker
Posts: 3
Joined: 28 Mar 2016, 19:13

Re: FileBot Node 0.2.0 for DSM 6

Post by recker »

Rednoah ... its working now ... what I did was uninstall both FileBot Node 0.2.0-B1 and FileBot 4.6.1. I went to https://sourceforge.net/projects/filebo ... ebot/HEAD/ and downloaded FileBot 4.6.2 (x3720). Manually installed it. Reinstalled FileBot Node 0.2.0-B1. Checked the TCP ports to ensure they were open. Started FileBot Node in the Package Center.

Baffled why it wasn't working before ... but seems to be related to the FileBot version??
mitch3910
Posts: 1
Joined: 28 Apr 2016, 13:43

Re: FileBot Node 0.2.0 for DSM 6

Post by mitch3910 »

Hi all,

I've been doing some research trying to get this working on my Syno, and have followed (among others) the steps outlined here:

- removed all versions of Java, node and FileBot
- rebooted
- Installed Java Se 1.8.0_77 via your unofficial installer
- Installed Node.js v4
- Installed FileBot
- Installed FileBot Node 0.2.0-B1 (manually)
- Opened TCP Ports 5452 and 5453 on my Router (manually, since apparently synology cant enter more than 10 rules via the built in router config)

When attempting to run FileBot Node, I get "failed to run the package service" and the log shows the following:

Image

Thanks in advance for any thoughts!
Post Reply