What's new

AC68U,asuswrt-merlin,Java = crashplan ??

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

voipair

Occasional Visitor
Hoping to have crashplan running on router. seems to be tons of discussions in nas forums (i think nas may have better processors than typical router) so maybe that is why i haven't found much about running on routers, although environments seem similar.

My current hardware is asus ac68u, current merlin build - i can switch firmware if it makes it easier
not sure if the arm chip makes this any more difficult

I don't understand half of what i am reading on this subject so dont know if i am asking the impossible.

What i have found so far

Java is required, but have not found an install how to yet.

specific post about QPKG CrashPlan package for a nas, although they have 3 arm versions.seems to have an install script, not sure what if any can be reused
installing entware arm = just a required step
Available Entware packages the link has V7 in it
A QNAP package list from a QNAP form but it doesnt have v7 in the link but seems to be hosted at same domain as entware, maybe qnap and entware are interchangable
A post talking about a repository that appears to say it is for the armV7 models and also says it is for the the X31 model NAS. maybe the X31 model nas files will work on my router

Reading the posts it appears that QNAP might be the same Entware but i am not clear if that is the case.

Running a whole linux distro in a ch rooted environment on router, possibly another way to install crashplan and java but i am sure there is a catch, not sure if a chroot is more of a full environment with more of the dependencies available or if there would be a big performance hit

lots of pages of tuts for installing on nas and the tweaks required
synlogy
synology2
arm qnap
 
So i have managed to get a few things installed here, currently stuck at this error in the crashplan engine log file
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

When i run java -version i gt the correct response, so not sure how to solve the above. I will still need a couple of compiled .so files for arm (i think they are java). All the posts seem to mention having to do this but haven't found anyone who has compilied versions for debian arm yet and don't know enough to modify instructions from other distros.

-----------
so far these are the steps completed

install debian chroot from here
install java from one of the steps in this post
install crash plan from here
required apt-get install cpio prior to ./install.sh command
the ./install.sh was the last command run as i couldn't get the binaries to compile

From this post run these commands (update for actual paths)
sudo rm -r /usr/local/crashplan/jre
ln -s /usr/lib/jvm/ejre1.7.0_71 /usr/local/crashplan/jre
------
At this point running ./CrashPlanEngine start would say it started butrunning status would show it was in fact stopped and the log file /usr/local/crashplan/log/engine_error.log would show one line withsomething like "nice: some path to java : permission denied"

I tried a number of things here, i think one of these changed the error
chown -R root:root /usr/lib/jvm/ejre1.7.0_71 /usr/local/crashplan/jre
chown -R root:root /usr/lib/jvm/ejre1.7.0_71 /usr/local/crashplan/jre
also tried chmod a+x
I don't think the above made any difference. but maybe the next two did
from
- In "/usr/local/crashplan/install.vars", changed the JAVACOMMON variable to point to that openjdk executable (/usr/bin/java)
from
vi /etc/init.d/crashplan
And add at the beginning of the script (line 18)
PATH=$PATH:/mnt/pools/A/A0/NAS_Extension/ejre1.7.0/bin
export PATH

-----

at some point i also had a locales issue with the debian chroot so i did this from here
my error was on login would get this message "bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"

On my fresh Debian installation (minimal) locales was completely missing. Installing it (aptitude install locales) and running locale-gen did the trick though. So guys, do as Chad Feller mentioned but check for having the package locales installed first.
 
Crashplan just started running, without any new .so files
It was failing with memory errors, ended up setting really low and it succeeded from this post this section "Setting ram limit on the Java VM"
nano /usr/local/crashplan/bin/run.conf
on the server line changed to
-Xmx128m

-- But then crashplan died with a .so error in logfile
 
turns out the .so files are required.
from this post
download here
Again went back to the great Archlinux post to guess which files to move from to where
these are the commands i typed in to move the files around
extract the archive into folder /tmp/test/ preserving file structure

Code:
cd /usr/local/crashplan/
rm libjtux.so
cp /tmp/test/lib/libjtux.so  /usr/local/crashplan/libjtux.so

mv /usr/local/crashplan/lib/jna-3.2.5.jar /usr/local/crashplan/lib/jna-3.2.5.jar-OLD2
cp /tmp/test/app/lib/jna-3.2.5.jar /usr/local/crashplan/lib/jna-3.2.5.jar

cp /tmp/test/lib/libffi.so.5 /usr/local/crashplan/lib/libffi.so.5

mv libmd5.so libmd5.so_OLD2
cp /tmp/test/app/libmd5.so /usr/local/crashplan/libmd5.so
Crashplan runs now without shutting down, just cant connect with remote ui for some reason, posted issue here
 
Last edited:
oh my gosshh login success, final changes
add iptables rules to allow 4243 crashplan port
Modify these files
copy contents of file on asus router to host pc
asus router debian chroot /var/lib/crashplan/.ui_info
host pc /var/lib/crashplan/.ui_info

host pc, edit this file with ip address of router
/usr/local/crashplan/conf/my.service.xml
<serviceHost>192.168.12.1</serviceHost>
<servicePort>4243</servicePort>
 
summary of files that are changed

files to change on ui pc to connect to the local engine
/usr/local/crashplan/conf/ui.properties


file to sync between installs ( i guess this is a security thing)
/var/lib/crashplan/.ui_info

Engine install (debian chroot in router)
/usr/local/crashplan/conf/my.service.xml
change these two lines
Code:
<javaMemoryHeapMax>128m</javaMemoryHeapMax>
  <serviceHost>0.0.0.0</serviceHost>
/usr/local/crashplan/install.vars
change this line
Code:
JAVACOMMON=/usr/lib/jvm/ejre1.7.0_71/bin/java
/usr/local/crashplan/bin/run.conf
on the server line change the mem string to the below
Code:
 -Xmx128m
 
Last edited:
initial test is an inbound backup from pc connected to router via wifi 7200 files 22 GB. After running for 14 minutes, Crashplan is estimating 1.8 hours remaining. Aside from having the port open on the wan interface this is brilliant, actually doing backup will be the real test - the low memory is reported to be an issue and the slower speed of usb swap.


from asuswrt-merlin
free
Code:
  total  used  free  shared  buffers
Mem:  255732  223960  31772  0  6692
-/+ buffers:  217268  38464
Swap:  245536  984  244552

Top
Code:
Mem: 229108K used, 26624K free, 0K shrd, 6516K buff, 115316K cached
CPU:  2.1% usr  8.9% sys 12.0% nic 51.4% idle  4.9% io  0.0% irq 20.3% sirq
Load average: 1.48 1.61 1.20 2/165 4177
  PID  PPID USER  STAT  VSZ %VSZ CPU %CPU COMMAND
15656  1 admin  S N  272m108.8  0 19.2 /usr/lib/jvm/ejre1.7.0_71/bin/java -Dfile.encoding=UTF-8 -Dapp=CrashPlanService -DappBaseName=CrashPlan -Xms20m -Xmx128m -
 
Last edited:
I wonder what can be done to optimize the disk environment ?
maybe usb3, not sure if it works through hub as would also want hdd in usb3
correct format, ext_
usb device r/w speeds,
i am assuming that swap will make up for the lack of ram, but maybe i am wrong
i should look for a post about this
 
initial backup 10k files 18gb to pc connected to router over wifi estimated 6 hours working around 7Mbps - per crash plan interface

after 10 minutes running backup, from router
top
Code:
Mem: 221040K used, 34692K free, 0K shrd, 1392K buff, 91848K cached
CPU:  2.7% usr 10.4% sys 43.0% nic  8.6% idle 11.5% io  0.0% irq 23.5% sirq
Load average: 3.67 3.39 2.32 3/166 6725
 
re installed on a new debian install, this additional step was necessary, not sure why it worked on the previous install as /bin/ps didn't exist on that install. so you might not need it. If you do it will appear after you run on the router
/usr/local/crashplan/bin/CrashPlanEngine start
the next line will say it will fail on line 87
this package installs /bin/ps
Code:
apt-get install procps

When first i connected from the desktop front end after putting in credentials it said upgrading crashplan, I think it was my desktop client that was upgrading. Then it kicked me (just quit no errors in logs just shutting down) out and continued to kick me out or fail to connect for 5-10 attempts, I also restarted the engine a couple of times. edit- logs indicated multiple crashplan upgrades were installed- took about 10 minutes, would have been nice if the ui this. Eventually it let me in
 
Last edited:
update--
when crashplan updates to 4.3.3, they changed something
on the host pc with they gui you need to change 0.0.0.0 at the end of /var/lib/crashplan/.ui_info to the ip address of your router
you may also need to copy the same file from the router if the update has changed the key.
source

update
that appears to be the only file we need to change now, crashplan seems to ignore what is in the other file on the host pc. /usr/local/crashplan/conf/ui.properties
Apparently this is common with crashplan updatees - working but not supported set ups (like this) may break and it takes a bit for people to figure things out if they haven't updated the official documentation for unsupported set ups.
 
Last edited:
now my server crashplan has updated to version 4.4.1 and server starts but wont backup and client wont connect.
 
This seems to be the problem, the router is only listening on ip 127.0.0.1 for port 4243 so connecting from another ip doesn't work. I don't know where to change the listening port on the server for crashplan.
Code:
ssh admin@192.168.12.1
admin@192.168.12.1's password:
netstat -an |grep -E '(4243|4242)'
tcp  0  0 0.0.0.0:4242  0.0.0.0:*  LISTEN 
tcp  0  0 127.0.0.1:4243  0.0.0.0:*  LISTEN


I only needed to ssh tunnel for a while then it started working without it, not sure if a version update occurred
to ssh tunnel to router with port forward.
allow ssh port forwarding in asuswrt-merlin
Administration -> System
open tunnel
Code:
ssh -L 4200:localhost:4243 admin@192.168.12.1
Edit /var/lib/crashplan/.ui_info file, set port to 4200, and ip leave at 127.0.0.1, match key from router file. this key seems to reset everytime the server is rebooted, so a recopy is required.
Code:
cat /var/lib/crashplan/.ui_info
4200,963f0a31-8449-4337-9f48-b7848bb4ad80,127.0.0.1
leave it at port 4243 (default) if not ssh port forwarding
 
Last edited:
I have had it with crashplan, now the router wont backup files to anywhere and on an incoming backup from another pc it saved 5% then stopped. saying it couldn't reach backup destination, (but it is still mounted and accessible via ssh)
could be this or this or maybe a java file needs updating
I wish there was an arm opkg for it, people run it on nas with their packaging system. to bad as to have it run on the router and accept backups from cross platform clients 24/7 would have been great.

Sadly crashplan will update all on its own, no way to disable it and although it works - without a maintainer for our system it isn't reliable. there is a QNAP arm package but we are not qnap and i don't know how to modify/copy how they make it work.

going to look at these now
Duplicati - unsure if will run on router (i would like to have something running on router backing up drives connected to router), no server but cross platform clients can save to router via ssh
Attic - this actually has a package under apt-get install in our chroot debian so that is hopefully a good sign (haven't installed yet), con is no windows client,
urbackup - this one seems really interesting, most of crashplan features i want, but open source. they say they have an arm package,
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top