4.7 synology issues with installer and java

All your suggestions, requests and ideas for future development
Post Reply
robwiel
Posts: 41
Joined: 18 Mar 2013, 22:41

4.7 synology issues with installer and java

Post by robwiel »

Hi,

So I own ds212+ with filebot when updating today got this msg in java log:

Code: Select all

unknown cpu architecture armv5tel add environment variables to /etc/profile
Seems like java did not install properly - my previous java was from misslehugger (dev stopped afaik).
Right now I see your java listed alongside with newest 8_091 java but it does seem to not work.

Uninstalling misslehugger package did not help.

Update of FB says: run java before running this installer

So I install java 1.8.0_91 from patters
https://pcloadletter.co.uk/2011/08/23/j ... nt-page-3/
which makes me download tar from oracle and starts properly - however filebot still says: Please run the following packages before installing this package: oracle java SE.

Restart did not help.

What do i need to fix filebot and have it running at 4.7?

LOG

Code: Select all

login as: admin
[email protected]'s password:
Could not chdir to home directory /var/services/homes/admin: No such file or directory
admin@DS:/$ filebot -script fn:sysinfo
FileBot 4.6.1 (r3315)
JNA Native: 4.0.1
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'zen': Native library (linux-arm/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: fpcalc version 1.3.1 (/usr/local/chromaprint/bin/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.5
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_91 (headless)
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 1 Core / 121 MB Max Memory / 12 MB Used Memory
OS: Linux (arm)
Package: SPK
Data: /volume1/@appstore/filebot/data/admin
uname: Linux DS 2.6.32.12 #7321 Wed Mar 23 11:47:16 CST 2016 armv5tel GNU/Linux synology_88f6282_212+

--- UPDATE AVAILABLE: FileBot 4.7 (r3923) ---

Done ヾ(@⌒ー⌒@)ノ

admin@DS:/$
Whats more seems that filebot runs just fine from command line, however task scheduler seems not to achieve anything.
Last edited by robwiel on 04 May 2016, 20:58, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: 4.7 synology issues with installer and java

Post by rednoah »

1.
What's not working? According to the log it's running just fine.

2.
Ignore the Synology package status, filebot and java are command-line tools. "Running" and "Stopped" or whatever doesn't mean anything, it's not a service.

3.
My oracle-java package doesn't support older devices. Didn't know that Package Center would stop you from installing a package if one of it's dependencies can't be "started". That's too bad.
:idea: Please read the FAQ and How to Request Help.
robwiel
Posts: 41
Joined: 18 Mar 2013, 22:41

Re: 4.7 synology issues with installer and java

Post by robwiel »

Thanks for quick reply:

1. to clarify: update to 4.7 does not work: "please run java SE" is msg I get when trying to update
1a. task scheduler does not start filebot - though same lines are working through ssh (it was working just fine before first 4.7 failed update)
2.
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: 4.7 synology issues with installer and java

Post by rednoah »

1.
That's a Package Manager quirk. It's stupid that Package Manager won't let you install the filebot package just because the oracle-java package is not "running" (which doesn't mean anything as explained in my previous post).

Try asking Synology to fix that, or if there's a workaround to force-install a package.


2.
Installing FileBot on Synology NAS wrote:Running commands from the login shell is not the same as using Synology DSM Task Scheduler or cron because they'll not initialise with ~/.profile so keep in mind that $PATH will be different.
Check the console output.

@see http://www.filebot.net/forums/viewtopic.php?f=3&t=1802
:idea: Please read the FAQ and How to Request Help.
robwiel
Posts: 41
Joined: 18 Mar 2013, 22:41

Re: 4.7 synology issues with installer and java

Post by robwiel »

rednoah wrote:1.
That's a Package Manager quirk. It's stupid that Package Manager won't let you install the filebot package just because the oracle-java package is not "running" (which doesn't mean anything as explained in my previous post).

Try asking Synology to fix that, or if there's a workaround to force-install a package.


2.
Installing FileBot on Synology NAS wrote:Running commands from the login shell is not the same as using Synology DSM Task Scheduler or cron because they'll not initialise with ~/.profile so keep in mind that $PATH will be different.
Check the console output.

@see http://www.filebot.net/forums/viewtopic.php?f=3&t=1802

Hi, got notification setup to check why it fails:

Code: Select all

Task: FileBot TV 1h
Start time: Thu, 05 May 2016 06:05:03 GMT
Stop time: Thu, 05 May 2016 06:05:03 GMT
Current status: 127
Standard output/error:
/usr/local/bin/filebot: line 21: cd: /root: Permission denied
/usr/local/bin/filebot: line 53: java: command not found
It is the same for other tasks
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: 4.7 synology issues with installer and java

Post by rednoah »

Java is not in the $PATH. It's only in your shell profile. DSM Scheduler doesn't use your shell profile.

My Java package doesn't support armv5tel but you seem to have a working Java runtime. However created that package, tell that person to link java into the path correctly. You can do that yourself by linking the java executable (wherever it may be) into /usr/local/bin.
:idea: Please read the FAQ and How to Request Help.
robwiel
Posts: 41
Joined: 18 Mar 2013, 22:41

Re: 4.7 synology issues with installer and java

Post by robwiel »

Code: Select all

admin@DS:/$ source /etc/profile
admin@DS:/$ which java
/volume1/@appstore/java8/ejdk1.8.0_91/linux_arm_sflt/jre/bin/java
admin@DS:/$
Ok think found java as above

And this is profile, what should I modify? [adding /volume1/@appstore/java8/ejdk1.8.0_91/linux_arm_sflt/jre/bin/java to first PATH did not help]

Code: Select all

#/etc/profile: system-wide .profile file for ash.

umask 022

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
export PATH

PGDATA=/var/services/pgsql
export PGDATA

TERMINFO=/usr/share/terminfo
export TERMINFO

TERM=${TERM:-cons25}
export TERM

PAGER=more
export PAGER

export LC_ALL=en_US.utf8
export LANG=en_US.utf8

PS1="`hostname`> "

alias dir="ls -al"
alias ll="ls -la"

ulimit -c unlimited

if [ -f /etc.defaults/.bashrc_profile ]; then
	source /etc.defaults/.bashrc_profile
fi
PATH=$PATH:/volume1/@appstore/java8/ejdk1.8.0_91/linux_arm_sflt/jre/bin # Synology Java Package
JAVA_HOME=/volume1/@appstore/java8/ejdk1.8.0_91/linux_arm_sflt/jre # Synology Java Package
CLASSPATH=.:/volume1/@appstore/java8/ejdk1.8.0_91/linux_arm_sflt/jre/lib # Synology Java Package
LANG=en_US.utf8 # Synology Java Package
export CLASSPATH JAVA_HOME LANG PATH # Synology Java Package
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: 4.7 synology issues with installer and java

Post by rednoah »

So you added this to the path? I don't think you can add an executable to the path like that...

Code: Select all

/volume1/@appstore/java8/ejdk1.8.0_91/linux_arm_sflt/jre/bin/java
You can add a FOLDER that contains executables to the $PATH through:

Code: Select all

/volume1/@appstore/java8/ejdk1.8.0_91/linux_arm_sflt/jre/bin
:idea: Please read the FAQ and How to Request Help.
robwiel
Posts: 41
Joined: 18 Mar 2013, 22:41

Re: 4.7 synology issues with installer and java

Post by robwiel »

Hi, tried that:

Code: Select all

sudo ln -s -f :/volume1/@appstore/java8/ejdk1.8.0_91/linux_arm_sflt/jre/bin/java /usr/local/bin/java
this just leaves 1 error line 53 java:command not found

Also tried adding folder as you suggested, still same error.
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: 4.7 synology issues with installer and java

Post by rednoah »

1.
Why is there a colon?

2.
What does /usr/local/bin/java -version say?
:idea: Please read the FAQ and How to Request Help.
robwiel
Posts: 41
Joined: 18 Mar 2013, 22:41

Re: 4.7 synology issues with installer and java

Post by robwiel »

a

Code: Select all

dmin@DS:/usr/local/bin$ java -version
java version "1.8.0_91"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_91-b14, headless)
Java HotSpot(TM) Embedded Client VM (build 25.91-b14, mixed mode)
admin@DS:/usr/local/bin$
Sir! you are a genius! removing colon fixed everything.
For this "sudo ln..." working I assume I can include something in profile instead so no need to redo it every restart?
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: 4.7 synology issues with installer and java

Post by rednoah »

You've created a file. It doesn't go away until you delete it (or DSM updates, i think that might not preserve /usr/local).
:idea: Please read the FAQ and How to Request Help.
CrowleyAJ
Donor
Posts: 7
Joined: 20 May 2016, 18:17

Re: 4.7 synology issues with installer and java

Post by CrowleyAJ »

I still can't get it to work. Even with a correct symlink, FileBot installation still needs "Oracle Java SE" to be running:

Code: Select all

>/usr/local/bin/java -version
java version "1.8.0_91"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_91-b14, headless)
Java HotSpot(TM) Embedded Client VM (build 25.91-b14, mixed mode)
Can anybody help me with this? Since upgrading didn't work I tried removing the previous version and now have no working version available anymore.
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: 4.7 synology issues with installer and java

Post by rednoah »

Edit:

Code: Select all

/var/packages/oracle-java/scripts/start-stop-status
Replace:

Code: Select all

exit 4	# package status is unknown
With:

Code: Select all

exit 0
That should make DSM shut up and make the package always appear as "Running" regardless of anything. :lol:
:idea: Please read the FAQ and How to Request Help.
CrowleyAJ
Donor
Posts: 7
Joined: 20 May 2016, 18:17

Re: 4.7 synology issues with installer and java

Post by CrowleyAJ »

It worked, yay! Thanks for your quick response. Very excellent support indeed.
I sent a donation directly to your email address, the link in your signature didn't work for some reason.
robwiel
Posts: 41
Joined: 18 Mar 2013, 22:41

Re: 4.7 synology issues with installer and java

Post by robwiel »

Changing package status fixes my updating 4.6.1=> 4.7 as well, brilliant. Many thanks!
Post Reply