bakuchiku

Installing CrashPlan on OmniOS

The CrashPlan website has installation instructions, but they’re meant for Solaris and aren’t quite right for OmniOS. This guide will show you how to install CrashPlan properly on OmniOS using the Oracle JRE (Java Runtime Environment).

Fixing the System Java

My version of OmniOS Stable (OmniOS v11 r151008) has some sort of packaging problem regarding the JRE. You can skip this section if you like, as it’s not required for installing CrashPlan using the Oracle JRE. I found a solution on an OmniOS mailing list.

The problem is that the system java binary cannot resolve the location of a linked library:

1
2
3
4
5
6
7
8
9
10
% which java
/usr/bin/java
% java -version
ld.so.1: java: fatal: libjli.so: open failed: No such file or directory
% ldd /usr/bin/java
        libthread.so.1 =>        /lib/libthread.so.1
        libjli.so =>     (file not found)
        libdl.so.1 =>    /lib/libdl.so.1
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2

But there’s a working version elsewhere:

1
2
3
4
5
6
7
8
9
10
% /usr/java/jre/bin/java -version
openjdk version "1.7.0_21"
OpenJDK Runtime Environment (build 1.7.0_21-b30)
OpenJDK Server VM (build 24.60-b03, mixed mode)
% ldd /usr/bin/java
        libthread.so.1 =>        /lib/libthread.so.1
        libjli.so =>     /usr/java/jre/lib/i386/jli/libjli.so
        libdl.so.1 =>    /lib/libdl.so.1
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2

Create a symlink to libjli.so in /usr/lib:

1
2
3
4
5
6
# cd /usr/lib
# ln -s /usr/java/jre/lib/i386/jli/libjli.so
# java -version
openjdk version "1.7.0_21"
OpenJDK Runtime Environment (build 1.7.0_21-b30)
OpenJDK Server VM (build 24.60-b03, mixed mode)

Installing the Oracle JRE

If you try to install CrashPlan now, it will still complain about not having the Sun (Oracle) JRE. You would see this if you had already downloaded CrashPlan, ran pkgadd and accepted the EULA (which we’ll get to later):

1
2
3
4
The current installed version of Java is not the Sun Java Runtime Environment.
CrashPlan requires the Sun JRE.

ERROR: Failed to find an acceptable Sun Java Runtime Environment

It would have been helpful if the CrashPlan instructions had told us that earlier! My guess is that you could just delete the check for the Sun (Oracle) version of Java from the checkinstall script, and use the system OpenJDK version instead. I decided to go ahead and install the Oracle JRE, so you’re on your own if you decide to stick with OpenJDK.

You can manually install the Oracle JRE v7 by downloading the tarball here and copying it to your system. Or, use this handy wget command. I install it into /opt:

1
2
# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jre-7u51-solaris-i586.tar.gz
# tar -xvf jre-7u51-solaris-i586.tar.gz -C /opt

That’s it, the Java install is done! When we install CrashPlan we’ll configure it to use this instead of the system JRE.

Installing CrashPlan

Download and extract the CrashPlan installer tarball:

1
2
# wget http://download1.us.code42.com/installs/solaris/install/CrashPlan/CrashPlan_3.5.3_Solaris.tar.gz
# tar -xvf CrashPlan_3.5.3_Solaris.tar.gz -C /var/spool/pkg

Before installing, we need to modify the checkinstall script to change its java search path so that it finds the Oracle JRE instead of the system one:

1
# sed -i -r 's|^BINSLOC=(.*)$|BINSLOC="/opt/jre1.7.0_51/bin"|' /var/spool/pkg/CrashPlan/install/checkinstall

Before:

1
2
# grep ^BINSLOC /var/spool/pkg/CrashPlan/install/checkinstall
BINSLOC="/bin /usr/bin /usr/local/bin"

After:

1
2
# grep ^BINSLOC /var/spool/pkg/CrashPlan/install/checkinstall
BINSLOC="/opt/jre1.7.0_51/bin"

If you try to install now, pkgadd will complain about the file modifications:

1
2
3
4
5
6
7
8
9
10
11
12
# pkgadd
...
<snip>
...
## Executing checkinstall script.

Reviewing Java installation
## Processing package information.
## Processing system information.
pkgadd: ERROR: packaging file </var/spool/pkg/CrashPlan/install/checkinstall> is corrupt
    file size <2716> expected <2708> actual
    file cksum <36406> expected <35461> actual

So just edit the /var/spool/pkg/CrashPlan/pkgmap file and set the expected values to the new actual values to make it happy.

Before:

1
2
# grep checkinstall /var/spool/pkg/CrashPlan/pkgmap
1 i checkinstall 2716 36406 1392851833

After

1
2
# grep checkinstall /var/spool/pkg/CrashPlan/pkgmap
1 i checkinstall 2708 35461 1392851833

Run pkgadd once again and it should install correctly.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# pkgadd
...
<snip>
...
## Executing postinstall script.
log dir: /opt/sfw/crashplan/log
mkdir: /opt/sfw/crashplan/log: [File exists]

adjusting service xml paths
adjusting manifest path
creating identity path

CrashPlan has been installed.

Important directories:
  Installation:
    /opt/sfw/crashplan
  Logs:
    /opt/sfw/crashplan/log
  Default archive location:
    /opt/sfw/var/crashplan

Start Script (run as root):
  /opt/sfw/crashplan/bin/CrashPlanEngine start|stop

Start Desktop UI:
  /opt/sfw/crashplan/bin/CrashPlanDesktop

You may connect a remote Desktop UI to this Service via port-forwarding
and manage it remotely. Instructions for remote management are in the
readme files placed in your installation directory:
  /opt/sfw/crashplan/doc

To enable CrashPlan as a service (as root):
  /usr/sbin/svccfg import /opt/sfw/crashplan/bin/crashplan.xml
  /usr/sbin/svcadm enable crashplan

Thank you for installing CrashPlan for Solaris.


Installation of <CrashPlan> was successful.

Before we’re finished, update the CrashPlan settings file to use the correct JRE. Edit /opt/sfw/crashplan/install.vars and modify the JAVACOMMON value to point to the Oracle JRE that we just installed. Or, just run this command:

1
# sed -i -r 's|^JAVACOMMON=/usr/bin/java$|JAVACOMMON=/opt/jre1.7.0_51/bin/java|' /opt/sfw/crashplan/install.vars

Before:

1
2
# grep JAVACOMMON /opt/sfw/crashplan/install.vars
JAVACOMMON=/usr/bin/java

After

1
2
# grep JAVACOMMON /opt/sfw/crashplan/install.vars
JAVACOMMON=/opt/jre1.7.0_51/bin/java

I move the CrashPlan install files onto my data pool for backup purposes and in case I need to reinstall the root pool.

1
2
3
# cd /opt/sfw
# mv crashplan /tank/crashplan_install
# ln -s /tank/crashplan_install crashplan

In the case of a reinstall I just need to create the link again.

The last step is to enable the CrashPlan service:

1
2
# svccfg import /opt/sfw/crashplan/bin/crashplan.xml
# svcadm enable crashplan

The service should now be running:

1
2
# ps -ef | grep CrashPlan | grep -v grep
    root  2008     1   0 21:32:17 ?           0:06 /opt/jre1.7.0_51/bin/java -Dfile.encoding=UTF-8 -Dapp=CrashPlanService -Xms20m

If not, check your console for error messages. and/or the crashplan service log file /var/svc/log/crashplan:default.log

Configuration

I used the instructions provided by CrashPlan at Configuring A Headless Client.

Credits

Thanks go to Benjamin Bryan who’s blog post I used for this guide.

Typhoon Man-Yi

Typhoon Man-Yi

I swear this isn’t an East Asian Typhoon blog. But after 10 months of nothing, I bring you…. another typhoon post! It’s that time of year again, and while last year’s Shanshan fizzled out upon arrival, this weekend is looking to be a little hairy. After a long hiatus (since 2001), Mrs. (Mr. ?) Man-Yi is on his way to Japan. Mr. Yi is currently ranked as a category four super typhoon. The typhoon is expected to arrive in Kumamoto at around 12pm tomorrow, with wind gusts as high as 130 kt (240 km/h, 150 mph)! Also, the last two weeks have seen extreme amounts of rain, causing flooding at various places around Kyushu. If this typhoon brings a lot of moisture with it, things could get bad for some people. I think I’ll go stock up on some drinks and food just in case tomorrow turns out to be a wild one.

Links:

Typhoon Shanshan?

Japan Meteorological Agency - Tropical Cyclone Information

The above map shows Typhoon Shanshan’s movement within the last couple days, and its predicted forecast. You can see that Kumamoto has just entered the “storm warning area” and will in fact be fairly close to the eye of the storm. We’ve been anticipating the typhoon all week, but it sounds like it will weaken when it hits my area. Probably not the typhoon I was anticipating, but instead maybe just a major storm. If fact, even though I’m in the red zone, I haven’t even noticed anything crazy yet. My post title has a question mark because I’m wondering if anything is actually going to happen. There’s been a little bit of hard rain and some strong winds, but nothing extraordinary compared to other storms we’ve had. I’m still waiting for the cows, bicycles and roofs to go flying by my window! But I probably shouldn’t dismiss the storm just yet; I originally began this post with a statement whining about how weak the typhoon as been so far. So what happens? The power goes out! The first time that’s happened. Even in the midst of writing this post the winds have already picked up. This should be an interesting ride.

Links:

Rally Japan - Day One in Obihiro

Last night I arrived in Obihiro, Hokkaido. I’ll be staying until Monday. The reason? Rally Japan. I’m a big fan of rally racing, and especially WRC (World Rally Championship). WRC events are non-existant in the US, so I wanted to take advantage of my time in Japan.

There wasn’t much to do since I arrived in the afternoon, and none of the events had started yet. So I made my way to Rally HQ to get my pass and information. Unfortunately it was raining then, and today it’s raining again. Oh well.

Here I am at Rally HQ.

Rally Japan

Dinner was butadon (roasted pork on rice) and some zaru soba. I don’t usually eat pork, but I had to try since it’s famous here. I have to admit, it was rather tasty. This was from a shop in the JR train station.

Rally Japan

To cap off the evening, I enjoyed the onsen (hot spring) that is available at my hotel. Since I’m paying quite a bit for this hotel, I’ll be using it as much as possible!

Next up will be the Shakedown!

Garbage Can Philosophy

This goodie has been hiding from me since I first moved into my apartment. Who knew such philosophy could be found on a garbage can. I now wonder, is my lifestyle too extravagant? I have to do some thinking…

Garbage Can English