Java SE for Embedded package for Synology NAS

UPDATE – Now running on Freescale QorIQ PowerPC CPUs as used in some x13 series Synology models!

There is a lot of good Java software, but it’s difficult to get Java running on a NAS. I decided to do something about that, mainly to pave the way for a Serviio package that didn’t require a huge guide to install. To stay legal, I followed how QNAP packaged Java for their NAS products. The Java binaries cannot be redistributed so this package looks for the downloaded .tar.gz archive in the public shared folder on the NAS. The end user is required to register with Oracle to get the file, as you can see from the description below. I also added locale support to the underlying Linux since Java requires this for UTF-8 support when reading from the filesystem.

Only Marvell Kirkwood, Intel, and Freescale QorIQ PowerPC CPUs are supported, so please check which CPU your NAS has. Java 7 for Intel Atom CPU does not currently work on Synology, so Intel users are limited to Java 6. I don’t have an Intel syno so it’s not something I can investigate I’m afraid. Though Oracle have published a JRE for PowerPC, it does not work on the older PowerQUICC PowerPC synos owing to their DSM version of glibc not being recent enough (2.3.4, but Oracle’s Java needs 2.4). It is possible to use a complicated workaround involving a chroot to a minimal Debian system, but it’s a manual process that can’t really be automated by a package.

Java package for Synology

 

Instructions

  • If you have a multi-bay NAS, use the Shared Folder control panel to create a shared folder called public (it must be all lower case). On single bay models this is created by default. Assign it with Read/Write privileges for everyone.
  • Register with Oracle and download Java SE for Embedded 7 for either ARMv5 or PowerPC e500v2 as appropriate (Intel NAS users will need the end-of-life Java SE for Embedded 6), and save in the public shared folder. If the file isn’t found an error message will display the full expected filename. You cannot use a different version by renaming it, since the folder structure inside the archive will be different.
  • Install the Java package from the DSM Package Center. In Settings -> Package Sources add my package repository URL which is http://packages.pcloadletter.co.uk. Note that DSM 3.2 build 1922 won’t show scroll bars in the main Package Center window so you may need to maximize the window to see the Java packages.
  • If you have trouble getting the Java archive recognised, try downloading it with a different web browser. Some browsers try to help by uncompressing the file, or renaming it without warning. I have tried to code around most of these behaviours.
  • The package does not need to start, just installing it is sufficient.
  • If you update DSM later, you will need to re-install this package or else UTF-8 and locale support will be broken by the update.
 

Package scripts

For information, here are the package scripts so you can see what it’s going to do. You can learn more about how Synology packages work by reading the Synology Package wiki.

installer.sh

#!/bin/sh

#--------JAVA installer script
#--------package maintained at pcloadletter.co.uk

SYNO_CPU_ARCH="`uname -m`"
DOWNLOAD_URL="http://tinyurl.com/javaembed"
if [ "${SYNOPKG_PKGNAME}" == "java6" ]; then
  EXTRACTED_FOLDER="ejre1.6.0_38"
  if [ "${SYNO_CPU_ARCH}" == "armv5tel" ]; then
    JAVA_BINARY="ejre-1_6_0_38-fcs-b05-linux-arm-sflt-eabi-headless-13_nov_2012.tar.gz"
    JAVA_BUILD="ARMv5 Linux - Headless EABI"
  elif [ "${SYNO_CPU_ARCH}" == "x86_64" ]; then
    JAVA_BINARY="ejre-1_6_0_38-fcs-b05-linux-i586-headless-13_nov_2012.tar.gz"
    JAVA_BUILD="x86 Linux Small Footprint - Headless"
  elif [ "${SYNO_CPU_ARCH}" == "ppc" ]; then
    JAVA_BINARY="ejre-1_6_0_38-fcs-b05-linux-ppc-e500v2-headless-13_nov_2012.tar.gz"
    JAVA_BUILD="Power Architecture Linux - Headless - e500v2 core"
  fi
elif [ "${SYNOPKG_PKGNAME}" == "java7" ]; then
  EXTRACTED_FOLDER="ejre1.7.0_21"
  if [ "${SYNO_CPU_ARCH}" == "armv5tel" ]; then
    JAVA_BINARY="ejre-7u21-fcs-b11-linux-arm-sflt-headless-04_apr_2013.tar.gz"
    JAVA_BUILD="ARMv5 Linux - Headless EABI, SoftFP ABI, Little Endian"
  elif [ "${SYNO_CPU_ARCH}" == "x86_64" ]; then
    JAVA_BINARY="ejre-7u21-fcs-b11-linux-i586-headless-04_apr_2013.tar.gz"
    JAVA_BUILD="x86 Linux Small Footprint - Headless"
  elif [ "${SYNO_CPU_ARCH}" == "ppc" ]; then
    JAVA_BINARY="ejre-7u21-fcs-b11-linux-ppc-e500v2-headless-04_apr_2013.tar.gz"
    JAVA_BUILD="Power Architecture Linux - Headless - e500v2 with double-precision SPE Floating Point Unit"
  fi
fi
JAVA_BINARY=`echo ${JAVA_BINARY} | cut -f1 -d'.'`
PUBLIC_FOLDER="`cat /usr/syno/etc/smb.conf | sed -r '/\/public$/!d;s/^.*path=(\/volume[0-9]{1,4}\/public).*$/\1/'`"
TEMP_FOLDER="`find / -maxdepth 2 -name '@tmp' | head -n 1`"
NATIVE_BINS_URL="http://packages.pcloadletter.co.uk/downloads/java-native-${SYNO_CPU_ARCH}.tgz"
NATIVE_BINS_FILE="`echo ${NATIVE_BINS_URL} | sed -r "s%^.*/(.*)%\1%"`"
INSTALL_FILES="${NATIVE_BINS_URL}"
source /etc/profile


preinst ()
{
  if [ -z ${PUBLIC_FOLDER} ]; then
    echo "A shared folder called 'public' could not be found - note this name is case-sensitive. "
    echo "Please create this using the Shared Folder DSM Control Panel and try again."
    exit 1
  fi

  JAVA_BINARY_FOUND=

  if [ ! -z ${JAVA_HOME} ]; then
    echo "It seems from /etc/profile that a Java Runtime is already installed at ${JAVA_HOME}. Uninstall it and try again."
    exit 1
  fi
  
  [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar.gz ] && JAVA_BINARY_FOUND=true
  [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar ] && JAVA_BINARY_FOUND=true
  [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar.tar ] && JAVA_BINARY_FOUND=true
  [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.gz ] && JAVA_BINARY_FOUND=true
  
  if [ -z ${JAVA_BINARY_FOUND} ]; then
    echo "Java binary bundle not found. " > $SYNOPKG_TEMP_LOGFILE
    echo "I was expecting the file ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar.gz. "
    echo "Please agree to the Oracle licence at ${DOWNLOAD_URL}, then download the '${JAVA_BUILD}' package"
    echo "and place it in the 'public' shared folder on your NAS. This download cannot be automated even if "
    echo "displaying a package EULA could potentially cover the legal aspect, because files hosted on Oracle's "
    echo "server are protected by a session cookie requiring a JavaScript enabled browser."
    exit 1
  fi

  cd ${TEMP_FOLDER}
  for WGET_URL in ${INSTALL_FILES}
  do
    WGET_FILENAME="`echo ${WGET_URL} | sed -r "s%^.*/(.*)%\1%"`"
    [ -f ${TEMP_FOLDER}/${WGET_FILENAME} ] && rm ${TEMP_FOLDER}/${WGET_FILENAME}
    wget ${WGET_URL}
    if [[ $? != 0 ]]; then
      if [ -d ${PUBLIC_FOLDER} ] && [ -f ${PUBLIC_FOLDER}/${DOWNLOAD_FILE} ]; then
        cp ${PUBLIC_FOLDER}/${DOWNLOAD_FILE} ${TEMP_FOLDER}
      else     
        echo "There was a problem downloading ${WGET_FILENAME} from the official download link, "
        echo "which was \"${WGET_URL}\" "
        echo "Alternatively, you may download this file manually and place it in the 'public' shared folder. "
        exit 1
      fi
    fi
  done
  
  exit 0
}


postinst ()
{
  WORKING_DIR=`pwd`
  
  #extract native binaries
  cd ${SYNOPKG_PKGDEST}
  tar xzf ${TEMP_FOLDER}/${NATIVE_BINS_FILE} && rm ${TEMP_FOLDER}/${NATIVE_BINS_FILE}

  #build missing locale with UTF-8 support (don't think it matters which language)
  cp ${SYNOPKG_PKGDEST}/bin/locale /bin
  cp ${SYNOPKG_PKGDEST}/bin/localedef /bin
  cp -R ${SYNOPKG_PKGDEST}/share/i18n /usr/share
  if [ ! -d /usr/lib/locale ]; then
    mkdir /usr/lib/locale
  fi
  localedef -c -f UTF-8 -i en_US en_US.utf8
  
  #extract Java (Web browsers love to interfere with .tar.gz files)
  cd ${PUBLIC_FOLDER}
  if [ -f ${JAVA_BINARY}.tar.gz ]; then
    #Firefox seems to be the only browser that leaves it alone
    tar xzf ${JAVA_BINARY}.tar.gz
  elif [ -f ${JAVA_BINARY}.gz ]; then
    #Chrome
    tar xzf ${JAVA_BINARY}.gz
  elif [ -f ${JAVA_BINARY}.tar ]; then
    #Safari
    tar xf ${JAVA_BINARY}.tar
  elif [ -f ${JAVA_BINARY}.tar.tar ]; then
    #Internet Explorer
    tar xzf ${JAVA_BINARY}.tar.tar
  fi
  
  #install Java
  mv ${EXTRACTED_FOLDER} ${SYNOPKG_PKGDEST}/jre
  
  #modify environment variables
  echo "PATH=\$PATH:${SYNOPKG_PKGDEST}/jre/bin" >> /etc/profile
  echo "JAVA_HOME=${SYNOPKG_PKGDEST}/jre" >> /etc/profile
  echo "LANG=en_US.utf8" >> /etc/profile
  echo "export JAVA_HOME LANG PATH" >> /etc/profile
  if [ -f /opt/etc/profile ]; then
    echo "PATH=\$PATH:${SYNOPKG_PKGDEST}/jre/bin" >> /opt/etc/profile
    echo "JAVA_HOME=${SYNOPKG_PKGDEST}/jre" >> /opt/etc/profile
    echo "LANG=en_US.utf8" >> /opt/etc/profile
    echo "export JAVA_HOME LANG PATH" >> /opt/etc/profile
  fi
  echo "PATH=\$PATH:${SYNOPKG_PKGDEST}/jre/bin" >> /root/.profile
  
  #fix up some rubbish in the root account's profile from a timezone bug in prior package version
  #this was caused by a pattern match that wasn't tight enough
  #Pacific and Atlantic returned several results
  PROFILE_FIX="Canada\/Pacific Pacific\/Guam Pacific\/Auckland Pacific\/Fiji Atlantic\/South_Georgia Atlantic\/Azores Atlantic\/Cape_Verde"
  for LINE_TO_DEL in ${PROFILE_FIX}; do
    sed -i "/^${LINE_TO_DEL}$/d" /root/.profile
  done

  #set the current timezone for Java
  #this should be configured in each Java daemon's start script to that changes
  #to timezone settings in DSM are reflected
  #we need to use the modern timezone names so that Java can figure out DST
  #set the current timezone for Java so that log timestamps are accurate
  #we need to use the modern timezone names so that Java can figure out DST
  SYNO_TZ=`cat /etc/synoinfo.conf | grep timezone | cut -f2 -d'"'`
  SYNO_TZ=`grep "^${SYNO_TZ}" /usr/share/zoneinfo/Timezone/tzname | sed -e "s/^.*= //"`
  grep "^TZ=" /root/.profile > /dev/null \
   && sed -i "s%^TZ=.*$%TZ="${SYNO_TZ}"%" /root/.profile \
   || echo TZ="${SYNO_TZ}" >> /root/.profile
  echo "export JAVA_HOME LANG PATH TZ" >> /root/.profile
  
  cd ${WORKING_DIR}
  source /etc/profile
  source /root/.profile
  
  java -version > ${SYNOPKG_PKGDEST}/output.log 2>&1
  echo >> ${SYNOPKG_PKGDEST}/output.log
  echo System installed locales: >> ${SYNOPKG_PKGDEST}/output.log
  locale -a >> ${SYNOPKG_PKGDEST}/output.log
  echo >> ${SYNOPKG_PKGDEST}/output.log
  echo JAVA_HOME=$JAVA_HOME >> ${SYNOPKG_PKGDEST}/output.log
  echo TZ=$TZ >> ${SYNOPKG_PKGDEST}/output.log
  
  echo "NOTE - Ignore that last sentence. This package does *not* start and stop like other packages. "
  echo "Java is correctly installed if you can see the runtime and HotSpot version numbers, "
  echo "and locale information in the package Log tab."
  
  exit 0
}


preuninst ()
{
  exit 0
}


postuninst ()
{
  #clean up profile mods
  sed -i '/^PATH=\$PATH:\/.*\/@appstore\/java.\/jre\/bin$/d' /etc/profile
  sed -i '/^JAVA_HOME=\/.*\/@appstore\/java.\/jre$/d' /etc/profile
  sed -i '/^LANG=/d' /etc/profile
  sed -i '/^export JAVA_HOME LANG PATH/d' /etc/profile
  if [ -f /opt/etc/profile ]; then
    sed -i '/^PATH=\$PATH:\/.*\/@appstore\/java.\/jre\/bin$/d' /opt/etc/profile
    sed -i '/^JAVA_HOME=\/.*\/@appstore\/java.\/jre$/d' /opt/etc/profile
    sed -i '/^LANG=/d' /opt/etc/profile
    sed -i '/^export JAVA_HOME LANG PATH/d' /opt/etc/profile
  fi
  sed -i '/^PATH=\$PATH:\/.*\/@appstore\/java.\/jre\/bin$/d' /root/.profile
  sed -i '/^TZ=/d' /root/.profile
  sed -i '/^export JAVA_HOME LANG PATH TZ/d' /root/.profile
  
  #remove locale stuff
  rm /bin/locale
  rm /bin/localedef
  rm -r /usr/lib/locale
  rm -r /usr/share/i18n
  
  exit 0
}
 

Changelog:

  • 0015 updated to Java 7u21, Java 6 Embedded seems to be no longer maintained by Oracle
  • 0014 Fixed metadata for DSM 4.2 Package Center
  • 013 Updated to Java 6u38 and Java 7u10
  • 012 Installer script fetches native binaries separately to reduce bandwidth on repo hosting
  • 011 Added support for Freescale QorIQ PowerPC CPUs used in some Synology x13 series products, PowerQUICC PowerPC processors in previous Synology generations with older glibc versions are not supported
  • 010 updated to Java 6u34 and Java 7u6
  • 009 corrected timezone bug for Atlantic and Pacific timezones which may have caused error messages when in fact the package had installed correctly
  • 008 unified the build scripts
  • 007 included the locale binaries to simplify installation, fixed environment variables for root user (inc. timezone with DST support), displayed Java version information and env vars in Log tab, incremented Java to latest versions 6u32 and 7u4, fixed detection of renamed .tar.gz archives downloaded by Google Chrome
  • 006 fixed path issue for root user on non-bootstrapped systems, updated info link to refer back to this page, and improved description text
  • 005 incremented JRE versions to match new releases from Oracle
  • 004 forced check for existence of ‘public’ shared folder
  • 003 fixed a stupid typo that stopped 002 from working :)
  • 002 rewrote scripts to be easier to maintain, and to allow for web browsers that untar or rename the Java and toolchain binary bundles as they’re saved
  • 001 fixed package repo support, defined as a non-runnable service, prevented more than one JRE being installed, saved files into actual package folder rather than @appstore/java now that package names can be separate from Package Center display names
  • v3 initial spk release (I think!)
 
 
About these ads

508 thoughts on “Java SE for Embedded package for Synology NAS

    1. Alex

      Java has been updated again it seems. It’s looking for the file
      ejre-7u10-fcs-b18-linux-i586-headless-13_nov_2012.tar.gz but i can only download
      ejre-7u10-fcs-b18-linux-i586-headless-28_nov_2012.tar.gz.

      I tried renaming but to no avail…

      Reply
      1. patters Post author

        Check again at http://tinyurl.com/javaembed

        The 28th Nov file is Java 7. The 13th Nov file is Java 6. I just double checked the package script and it’s still correct. Intel Synology products can only run Java 6 so you are trying to use the wrong file.

  1. LouiS

    Hello, since it’s no longer possible to download the required packages from Orcale (just tried, and it’s not in the archives as well), could you please upload the correct packages to a site?

    Reply
      1. LouiS

        Cool, thanks! I was able to install it with some renaming trick, but I’m gonna make a fresh install, just to make sure :)

      2. patters Post author

        That wouldn’t have worked because there’s a folder inside the archive which needs selecting by name – and that changes with each release.

  2. suzannah

    Is there a plan to update to the latest Java versions – Java 6u38 and Java 7u10?

    I am unable to install as I recieve an error message displaying the full expected filename.
    These older java versions – Java 6u34 and Java 7u6 – appear to no longer available to download from the oracle website or archive.

    Thanks,
    Suzannah

    Reply
  3. Rogier

    Hi Patters,

    I’ve been able to setup Crashplan and Java 7 embedded on my 411j. Which was working great. Now I’ve tried to upgrade Java 7, and therefore the file “ejre-7u6-fcs-b24-linux-arm-sflt-headless-10_aug_2012.tar.gz” is needed. I’ve searched everywhere, but no luck, the file isn’t available from the Oracle download section anymore.
    Because I allready tried to upgrade, the current Java 7 installation isn’t working anymore….

    Any idea to get things working again?

    Thx,
    Rogier

    Reply
  4. DW

    I’ve searched everywhere also and the required Java packages are impossible to get now. Oracle only makes certain versions available in the Java Archive download page and unfortunately they did not do this for the ones required by this Synology package.

    Oracle did choose to make 7u4 and 6u32 available in the Archive page for the long haul. So maybe just standardize on those for this Synology package rather than latest Java versions to avoid having to keep up with each Oracle java version bump?

    In any case, really hoping you can update your Synology package so it can still be used or someone can post one of the supported Oracle packages somewhere for download!

    Thanks!

    Reply
      1. DW

        Perfect, many thanks. Installed and running fine on a DS213 now I’ll put on my DS713+ next. I’ll be clicking that Paypal Donate button.

  5. Johnsen

    Hi Patters! I still can´t install java on my DS212j. After Upgrading to dsm 4.1 I can´t install crashplan because Java is not working. The java install seems right but crashplan installer says it´s not. In the java log I can read this: “/var/packages/java7/scripts/postins: line 28:java: not found.” Can you please help me with this?

    Reply
    1. Johnsen

      Hi again. Is there anyone else that know anything about these problems I described above? I would really like to make crashplan work again soon.

      Reply
  6. Anthony B.

    Hello, i have install the new version of synology on my DS 210j, i have re-install the java package and crashplan. But i can’t connect to crashplan with the tunnel “ssh -L 4200:localhost:4243 admin@xxx.xxx.x.xx

    i have this error
    channel 3: open failed: administratively prohibited: open failed

    any idea?

    Reply
    1. Wybe

      I’m having the same problem on my DS210+, the install package is not there. Does this mean the java package cannot be installed on a DS210, or is there another problem?

      Reply
      1. Thibsie

        Patters, a solution for older CPUs may be en route. This a copy/paste of Syno’s reply. I quote your post (with link of course) stating the Glibc problem. Answer I got a couple hours ago was:

        “Hi Thibault,

        Thanks for your waiting.

        According to our engineer, our engineer has a plan to upgrade glibc in the middle of this year. If everything is like what’s expected, you could see the update in the middle of this year’s release.

        Hope this helps.

        Best Regards,
        Adair Hsu

      2. OJ

        Guess this is the reason why it would not run on a DS410 eventhoug I don’t understand why some Freescale CPUs are supportede and others aren’t

      3. patters Post author

        Because the underlying Linux distribution on those older ones is different. It’s a software issue, not a hardware one.

  7. Steven Babb

    Hi

    I’ve just bought a Synoogy NAS and have heard about Serviio. Where can i obtain a download of Java SE for Embedded 7 so that i can use it on my NAS please?

    Thanks for your help!

    Regards, Steven

    Reply
    1. patters Post author

      It’s all explained on this page. If you’re uncertain which file you need to download from Oracle – try installing my package without it and you’ll be prompted.

      Reply
      1. Steven Babb

        Hi patters

        I’ve looked on this page and can’t find a link – I’ve gone to Oracle’s site and it is no longer available – would you be able to send me a link please?

        Thanks

        Regards, Steven

  8. Matt

    Hi Patters,

    just tried to install Java 7_10 on my DS 413, but it looks like the script is balking.
    Even though I’ve put both files
    ejre-7u10-fcs-b18-linux-ppc-e500v2-headless-28_nov_2012.tar.gz
    java-native-ppc.tgz
    into /volume1/public, I get the error message that java-native-ppc.tgz could not be downloaded.

    If you need any further information, feel free to contact me via PM.

    TIA
    Matt

    Reply
      1. Matt

        Same problem with Java 6, unfortunately.

        @Patters, do you have an idea what causes this problem?
        The 4.2beta does not support Java on the DS413, so I’m out of luck with Crashplan, which is a shame.

    1. Matt

      Hi Patters,
      did some digging, and this is what I found out:
      In java1.7.0_21-merged-0015.spk is a file called installer.sh, which looks like the installer (doh!).

      In line 79 and 80 a variable named ${DOWNLOAD_FILE} is used but never assigned.
      I’m not much into shell programming, but could this be the reason why Java 7 won’t install on my DS413?

      Reply
      1. Matt

        If I remember the script correctly, the unassigned variable leads causes the script to not find the downloaded files, after which it reports an error message and fails.
        Downloading the file from your server via wget works fine.

      2. Matt

        Hi Patters,

        do you have a date for the next version? If you need someone to give the update a try, feel free to contact me!

  9. jjLDN

    Hi patters.
    Today released beta 4.2 comes with Java Manager which helps to download and install Oracle Java package (pretty much the very same way as your package)the only difference is target location for Java installation which is /var/packages/JavaManager/target/Java/jre/lib.
    Are you p0lanning to use officially suuported Java installation and is there any chance you could update Serviio package and Minecraft pretty soon?
    Actually Java Manager before installation has discovered of Java installation from your package, so maybe they are fully compatible?
    I will test and give you a shout.
    Is there any chace you could send Java based aplication to Synology to include them in official 3rd party repository?
    Kind regards

    Reply
    1. jjLDN

      Hi again.
      Just uninstalled your Java package, installed official Java Manager and conducted Java installation using that software, rebooted my DS712+ and Serviio apparently works fine with new Java.
      The only catch is for now Synology package supports only version 6 (I believe because of problems with 7 on Atom based boxes).

      Reply
      1. garfield

        Hi, could you tell me how remove the java package? I ‘ve already set JAVA_HOME= ‘empty’ and removed JDK directory but i’ve still the same error message while i’m trying to install java manager package…
        Help!

  10. Simon

    Thanks a lot for the package. After the installation is it possible to delete the ‘public’ folder or is it required?

    Reply
    1. patters Post author

      Many of my other packages require it and if Java gets updated you’ll need to put it back so, I’d probably recommend leaving it.

      Reply
    1. Alessandro

      And in case your java package is not needed, would you mind releasing a package that installs UTF-8 support? That is greatly needed, at least for me, but I think for many other users…:)

      Reply
  11. Pingback: Ryan, Debi, and Toren Cragun's Blog » Linuxmint or Ubuntu: Crashplan backup using headless Synology NAS

  12. HangChoi

    Excuse me Sir, I can’t find the package of java 6 or 7. I can just see the package of Minecraft, Bukkit and OpenRemote. Did i did something wrong? why I can’t find it?

    Reply
    1. HangChoi

      Sorry Sir it’s me again, i did known that my NAS is using PowerQUICC PowerPC processors, So have there any method to use Java?

      Reply
  13. Jeffrey Friedl

    I just updated the Java/CrashPlan packages (thanks!), but now CrashPlan on the Synology thinks its a different destination than it was before the backup, so when I look at my CrashPlan destinations from my laptop, I see the Synology unit listed twice, the “real” one that contains my backup but is offline, and a second online one that is available for a new backup. Is there an easy way to tell CrashPlan on the Synology to be its old self? Thanks!

    Reply
    1. Jeffrey Friedl

      It seems that the latest CrashPlan package has created /var/services/homes/crashplan, ignoring /volume1/crashplan, the latter of which has all my backups. Should I perhaps just symlink one to the other?

      Reply
      1. patters Post author

        /var/services/homes/crashplan is where the app settings are stored (plus sync status, block tracking). /volume1/crashplan is where friends’ backup data is stored. No changes to that for a long time.

      2. Jeffrey Friedl

        I see, thanks. Have you seen this before, where CrashPlan doesn’t notice that it had been installed before and sets itself up as a new computer? I have terabytes of backup from multiple places that I’d prefer not to redo from scratch :-)

    2. Jeffrey Friedl

      I see now that the old configuration data lies in “/volume1/@appstore/crashplan_data_mig”, while the new/unneeded data lies in “/volume1/@appstore/CrashPlan”. It seems that I should be able to rsync the former over the latter… does that seem reasonable?

      Thanks!

      Reply
      1. Jeffrey Friedl

        To followup on my own question, I did rsync the conf and .crashplan directories over from “crashplan_data_mig” (whatever that is… data migration?), started the service, and it worked. It took several hours to do a deep compact and sync data, but then was caught up.

  14. Alex

    I spent several hours online trying to find the best online backup for a synology DS213+ after having some doubtful experience testing the Synology client for Amazon Glacier and I think I found it here.

    Reply
  15. Lucas

    Hi Everybody,
    I wanted to update my susbsonic to 4.7 and figured I might as well update my DSM and java as well. I got myself in some trouble though.
    After updating to DSM 4.1-2668 on mu DS211j I’m not able to install Java and Subsonic.
    After updating DSM, I tried to do a fresh java install. Although the links are correct in the install files Package Center says that there was a problem downloading the java-native-armv5tel.tgz file.

    Manually installing the pacakges doesn’t work either. Placing all the files in my public share folder doesn’t solve the problem. When i place the wrong java install in my public folder package center does mention that it was expecting a other file. Placing the right file in the public folder makes this message dissapear, but then there is the downloading problem. So it seems to find my public folder, but it doesn’t install the files that are in there.
    Does anyone knows what’s wrong? Any help is appreciated!
    After using subsonic for years now, I miss it everyday. I’m not looking forward to installing it manually through ssh again.

    Reply
  16. James

    Hi! Im excited by finding this solution. Thanks for all the work.

    I have an issue when entering http://packages.pcloadletter.co.uk into dsm 3.2 on my synology ds211+. It looks for the location, then I get, ‘invalid location’. I can’t find anyone else who seems to have experienced this. Any advice?

    James

    Reply
      1. James

        thanks for the repIy

        I can ping it from my MacBook Pro
        http://imageshack.us/photo/my-images/713/screenshot20130222at927.png/

        when I log into my syno via ssh and ping i get bad address (it’s the first time I have ever done this)
        http://imageshack.us/photo/my-images/853/screenshot20130222at929.png/

        I just upgraded the dsm to v4.0 to see if that helped and it didn’t.

        I’m still reading as much as I can to improve my knowledge and I’m sure it’s a setting my end. I’ve followed all your instructions above which I think are pretty clear. Hope to get there soon!

      2. patters Post author

        Try explicitly adding a DNS server to the network settings in DSM. I seem to recall mine didn’t work properly until I did that. If you don’t know your ISP ones, just add 8.8.8.8 (Google DNS server). Should fix your issue hopefully.

      3. James

        ok, it was a dns thing, i changed my dns to 8.8.8.8 in the syno and now the packages works. Thanks!

  17. Noah

    Having problems getting this to work, I’ve tried java 7 first, then tried java 6 – Here’s what I’ve done so far

    Platform: DS209
    DSM Version 4.0-2228

    Created public folder, set permissions,

    Downloaded: ejre-1_6_0_38-fcs-b05-linux-arm-sflt-eabi-headless-13_nov_2012.gz
    and also tried
    ejre-7u10-fcs-b18-linux-arm-sflt-headless-28_nov_2012.gz

    Placed in public folder, updated the package sources, ran the installer, but both times I get:
    ‘The Operation Failed. Please log into DSM again and retry.”

    It seems your script can handle the .gz extension, and I’ve tested running the installer without anything in public and it threw an error, so it seems like it’s working. Not sure what the problem is. I’ve also downloaded java-native-armv5tel.tgz and placed in public too with no effect.

    Any thoughts?

    Reply
  18. djikstra

    I’ve got some trouble to setup Java on my DS411. After un update of DSM (4.0 to 4.2), I also remove my old Java 1.6, in order to install an up-to-date version.

    Removing Java was OK, but installing the brand new version is KO (neither java6 nor java7). Here is what I’ve done
    - Downloaded the appropriate java files and saved them in my public folder ejre-1_6_0_38-fcs-b05-linux-arm-sflt-eabi-headless-13_nov_2012.tar.gz for Java6 and ejre-7u10-fcs-b18-linux-arm-sflt-headless-28_nov_2012.tar.gz for Java7)
    - Try to launch the appropriate package (6 or 7). Downloading the package -> OK. Confirm settings screen -> OK. But just after this screen, a message saying “Java SE for Embedding 7 – Failed to install the package” (same for Java 6).

    In /volume1/@tmp/@synopackage, I can see the new folder java7, which contains the single file @SYNOPKG_DOWNLOAD_java7, confirming the package download was OK. But I see in the INFO file of the package that the arch attribute is not define for 88f6282, the architecture of my DS411. I changed this and recreate a package to install manually, but still the same problem, I’m a little bit lost now…

    Reply
  19. Mike

    Having trouble install. The default package on Oracle still is the ejre-7u21-fcs-b11-linux-ppc-e500v2-headless-04_apr_2013.gz package. Do I need to wait for an upgrade of the Synology package before I can install java 7 ?

    Reply
  20. Ober Sepp

    I can’t download the file ejre-7u10-fcs-b18-linux-arm-sflt-headless-28_nov_2012.tar.gz from Oracle. the have a newer file and with the newer file i can’t install Java on the nas

    Reply
    1. sor

      With “ejre-7u21-fcs-b11-linux-arm-sflt-headless-04_apr_2013.gz” for the DS 212+ everything is fine. Thanks for the update!

      Reply
    2. Richard

      After upgrading your Java 7 package on my DS413, the log no longer shows the version numbers but the following error message

      /var/packages/java7/scripts/postinst: line 28: java: not jound

      I can no longer run your Crashplan package because of this.

      Please help!!

      Reply
      1. Richard

        I think that the Java download file must have been corrupt. I downloaded it again and everything installed correctly.

  21. richard

    I have installed the correct script through the Java SE package
    I have installed the crashplan package
    I have run the SSH connect to route 4200 to 4243
    I have added the following to the UI file servicePort=4200

    When I run the app the terminal window shows the following error
    channel 3: open failed: administratively prohibited: open failed

    I run a 412+

    Reply
  22. Haravikk

    Given the continuing security issues that Java has been experiencing, I wanted to ask what the procedure is for updating to new Java versions is on when using this package on a Synology NAS? Will I need to uninstall and then reinstall it, or is there a procedure for doing this by putting a new Java version in the /public share, or even better is embedded Java able to automatically check for updates?

    Thanks for providing this package by the way! It made installing CrashPlan a few custom Java apps of my own a breeze! I wonder though; instead of trying to support specific Java packages would it not be easier to have this installer just check using the naming convention of the files? I think most users can handle finding the right download if the installer just tells them the architecture they need the release to be targeted for, so trying to give a specific download name is probably more confusing overall.

    Reply
    1. patters Post author

      When I first made the package I wasn’t particularly familiar with Linux shell scripting (coming from Windows) so I kept it simple. I could possibly automate it a bit further in future, but since Oracle keep changing their website, and since there are a lot of people who don’t follow the instructions correctly I think this would result in more confusion overall. It’s useful that the error messages are so explicit about precisely what needs to be downloaded.

      When a new version is released by Oracle, people tend to report difficulty in finding the correct file on these comments here, and I update the package. I publish this updated package version on my package repo, and your Synology will automatically report that an update is available.

      Reply
  23. Marc-Andre

    Is there a Java SE for Embedded 7 for Synology Intel version now available? Crashplan no longer works for me as they now require version 7 of Java.

    Reply
  24. nicolareina

    Hello,
    I am having the same problem as someone has had (as per the reading of the complete 500 comments…)
    I have downloaded from Oracle site and put the proper tar.gz file in the /public/ folder on hte synology.
    I install and the process finishes successfully (from the “gui” point of view).
    But then if I check the logs (output.log or log in the gui of package manager) I have the message:

    /var/packages/java7/scripts/postinst/: line 28: java : not found

    and indeed if I go to the java home foldet 7volume1/@appstore/java/
    there’s no jre folder and no binary at all…

    Also installng applications that need java se leads to the message “no java installed”

    Creating a directory jre and untarring there the content of the tar.gz would solve?

    I am on a DS212
    the binary put in /public is:
    ejre-7u21-fcs-b11-linux-arm-sflt-headless-04_apr_2013.tar.gz

    Thank You for your help

    Reply
  25. nicolareina

    It seems I have found the cause of the problem.
    I do not understand how but the ejre file is ok on the PC and gets corrupted in the transfer to the syno…

    Reply
  26. nicolareina

    And a final successful update hoping it avoids headaches to others.
    The problem was linked to the transfer of the file to the syno.
    Somehow the format of the file was altered in this step.

    Please note that the file was not corrupted: 7z from command line in shell was decompressing it, not tar.

    I was transferring from iPad to syno though dsfile.

    Then I tried to put it in the synobox sync directory and… Magic tar was working on the transferred file…

    Reply
    1. patters Post author

      It should be possible, yes. I don’t have time right now, but I ought to be able to build something for you to test soon. Do you own a DS213j yet or are you just considering it?

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s