Running Java Web Start From a Zone

As indicated in my previous entry, I run my VPN software within a zone to connect to the Oracle intranet. Another component I need to access is the Solaris bug tracking system, which is launched via Java Web Start. To my disappointment, this also required a bit of troubleshooting. As my example here, I'll use one of my favorite Java Web Start applications, JDiskReport.

Assuming you left off with getting Firefox running from a zone, if you attempted to Web Start JDiskReport, the first problem is that Java Web Start isn't even installed on the system:


This is easy enough to fix:

root@myzone:~# pkg install java
               Packages to install:     5
           Create boot environment:    No
               Services to restart:     1
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  5/5     779/779    34.4/34.4

PHASE                                        ACTIONS
Install Phase                              1179/1179 

PHASE                                          ITEMS
Package State Update Phase                       5/5 
Image State Update Phase                         2/2 

With Java installed, Firefox properly detects Java Web Start:

However, when you try to launch JDiskReport now, nothing happens at all. This is the most frustrating kind of error.

If you select the option to save the jdiskreport.jnlp file to your home directory and try to launch it from there, you'll see we're dumping core again:

bleonard@myzone:~$ javaws jdiskreport.jnlp 
Segmentation Fault (core dumped)

Unlike with Firefox however, we're not given anything else to work with. Using truss and digging into the stack trace, I was able to determine we also need the packages utf-8 and libxtst:

root@myzone:~# pkg install utf-8 libxtst
               Packages to install:     1
           Create boot environment:    No
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  1/1   2674/2674    10.4/10.4

PHASE                                        ACTIONS
Install Phase                              2722/2722 

PHASE                                          ITEMS
Package State Update Phase                       1/1 
Image State Update Phase                         2/2 

Once these 2 packages are installed, you're in business with Java Web Start:


It's worth noting what a small footprint my zone has - less than 1 GB. Pretty cool, huh? Even more impressive is that it's actually only consuming 400 MB of space in my global zone because it's on a zfs dataset with compression turned on:

bleonard@solaris:~/Desktop$ zfs get all rpool/zones/myzone
NAME                PROPERTY                        VALUE                           SOURCE
rpool/zones/myzone  type                            filesystem                      -
rpool/zones/myzone  creation                        Wed Jun  8 11:31 2011           -
rpool/zones/myzone  used                            388M                           -
rpool/zones/myzone  available                       14.7G                           -
rpool/zones/myzone  referenced                      33K                             -
rpool/zones/myzone  compressratio                   1.89x  
...                         -

And while we're on the subject of resource consumption, look at zonestat:

bleonard@solaris:~$ zonestat 5 1
Collecting data for first interval...
Interval: 1, Duration: 0:00:05
SUMMARY                    Cpus/Online: 1/1   Physical: 1535M    Virtual: 2512M
                    ----------CPU---------- ----PHYSICAL----- -----VIRTUAL-----
               ZONE  USED %PART  %CAP %SHRU  USED   PCT  %CAP  USED   PCT  %CAP
            [total]  0.31 31.8%     -     - 1141M 74.3%     - 1369M 54.5%     -
           [system]  0.12 12.7%     -     -  302M 19.6%     -  643M 25.6%     -
             global  0.15 15.5%     -     -  604M 39.3%     -  529M 21.0%     -
             myzone  0.03 3.57%     -     -  234M 15.2%     -  196M 7.81%     -

Only 234M of RAM. Like I said in the previous post, you can't achieve numbers like that with a VirtualBox VM.

Comments:

shouldn't utf-8 and libxtst be java dependencies? a core dump due to missing files is not really acceptable when your package manager is supposed to manage dependencies

Posted by imarambiocatan on June 09, 2011 at 05:28 PM GMT #

imarambiocatan, right on. I filed https://defect.opensolaris.org/bz/show_bug.cgi?id=18518 publishing this post.

Posted by W Brian Leonard on June 10, 2011 at 04:50 AM GMT #

I so much like the CSS of your site. Code snippets et al.

Posted by guest on June 10, 2011 at 08:42 PM GMT #

guest, thanks. The new Oracle template doesn't format code snippets as nicely as we did at blogs.sun.com, so I have to manually manage it all now. Unfortunately, I don't even have control over the CSS, so it has to be done for each individual code snipped :-(.

Posted by W Brian Leonard on June 13, 2011 at 01:13 PM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The Observatory is a blog for users of Oracle Solaris. Tune in here for tips, tricks and more as we explore the Solaris operating system from Oracle.

Connect with Oracle Solaris:


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
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
   
       
Today