Monthly Archives: December 2011

LDAPCon 2011 presentation on OpenDJ

Great video here presented by Ludovic Poitou of ForgeRock, on the OpenDJ directory server project and its origins as OpenDS at Sun Microsystems:

 

One thing I found of particular interest (and also because I can’t resist yet another dig at Oracle – but only because they make it so very easy) comes right at the end of the presentation (here), which not only indicates that code commits to the OpenDS project which Oracle inherited are practically dead (i.e. death by neglect), but that in June 2011 they actually created a proprietary fork of it (gee, imagine that!), called “Oracle Unified Directory”.

It’s great to see that out of the two forks of OpenDS at least that I am aware of (the other is here), OpenDJ remains truly open, from the code to the documentation. No need to “contact sales” nor have to deal with a crummy “evaluation license”.

And if you need professional support, ForgeRock offer that too.

Advertisements

Stream video content from XBMC to an Android tablet

Continuing on from earlier posts here and here (which describe how to stream content from XBMC to an XBox 360, and how to encode a DVD using Handbrake such that it is suitable for playback on the XBox 360 respectively), we can also stream video content from XBMC to an Android tablet device.

In this example, I am using an Android v3.2-powered tablet in the form of the ASUS Eee Slider SL101. I am using the built-in ASUS “MyNet” application to receive the XBMC stream.

You can refer to the official Android documentation for the list of base supported audio and video codecs, pertaining in particular to Android v3.x:

http://developer.android.com/guide/appendix/media-formats.html

Generally, files encoded as H264 video and AAC audio in the MP4 container format work fine. Converting your existing media files for basic playback is a cinch in VLC Media Player, which includes a handy preset for this which takes the guesswork out of the equation (leave a comment if you need help with this):

Converting a file in VLC Media Player

Connecting the tablet to my local wireless network, one can immediately see the XBMC media server visible in the list of available UPnP media servers in the “MyNet” application. Ignore the reference to “Windows Media Connect” – this is simply the “MyNet” application assuming that the media server must be a Windows-powered device (*sigh*). By clicking on the “Video” tab, we can see for example recently added video files:

ASUS MyNet application on the ASUS Eee Slider

We simply tap on a file, et voilà:

ASUS MyNet application playing back "Elephant's Dream"

The chunky video quality in the above screengrab is simply because I am using the low-quality version of Elephants Dream, not because of any inherent quality issues with the source material, software, or hardware.

Apache Roller 5 problems on GlassFish 3.0.1

I recently installed Apache Roller 5 on GlassFish 3.0.1 (on an OpenIndiana host with JDK 6u26, connecting to a PostgreSQL 8.4 database) and had the rather unusual behaviour of the Roller web app seemingly failing after an arbitrary period of time, followed by the GlassFish domain itself stopping.

I have two GlassFish domains set up on the host in question, one serving up JSPWiki, the other serving Roller. The JSPWiki domain remained stable, so I figured this was possibly either a problem with Roller 5.0 or a port conflict issue between the two domains. Even after recreating the second domain with the –portbase option and ensuring there were no conflicting ports, Roller would still eventually crap out followed by the domain itself, with seemingly nothing of relevance logged.

I upgraded to GlassFish 3.1.1 and so far things are perfectly stable – so I guess this was due to some issue with GlassFish 3.0.1 in the end.

Apache Roller 5 running the Lightword theme

TeamViewer for Android

Not a lot really to say about this app, other than a) it’s free and b) seems to work like a charm on the ASUS Eee Slider:

TeamViewer client running on the Asus Eee Slider

I’m continued to be impressed by TeamViewer, and I’m happy to have paid for a business license. It works, it’s multi-platform, and the non-parasitic perpetual license is a major advantage over the alternatives.

Oracle WebLogic spam in the GlassFish “community”

Sigh. There seems to have been an entirely unsurprising increase in this of late, for example (the GlassFish group on Facebook is first):

Oracle WebLogic Spam

Yet More WebLogic Spam

More WebLogic Spam

Seriously, I’m not thick: if I wanted to read about WebLogic, then I’d go to Oracle’s godawful website (or the WebLogic twitter or Facebook feeds) and read about it there. The very least Oracle could do is pretend that they aren’t more interested in promoting their own bloated megabucks products above what is ostensibly a community project, but I guess in light of everything that’s transpired post-Sun even that’s too much to expect. Even if it were a thriving product (which given a look at the forums for example should give you a clue that it’s anything but), I would have my doubts anyway about the current engineering talent behind it, and perhaps with good reason.

Set up Firefox Sync to connect to a PostgreSQL database

A quick follow up to my post here. Although connecting to a MySQL database for storage of user account credentials and sync data is (very) briefly discussed on the official server setup page here, there aren’t any docs for doing the same using PostgreSQL.

Getting basic connectivity up and running to a PostgreSQL database is pretty easy. I’m not going to cover PostgreSQL setup here, so will assume you already have a server and database good to go.

 

My Sync server is running in an Ubuntu 10.04 x86 VirtualBox VM. In Ubuntu, we need to install the “postgresql-server-dev-8.4” package and dependencies – you can do this using Synaptic Package Manager for example. (This satisfies the error about the “pg_config” executable being missing that we would otherwise get in the subsequent steps.)

Next, we install the psycopg PostgreSQL adapter for Python, which will enable the Sync server to connect to the PostgreSQL database. Note that we install this using the Sync server utilities (in the server-full/bin directory), and not the Ubuntu package manager:

dave@Ubuntu-FirefoxSync:~/server-full$ sudo ./bin/easy_install psycopg2
Searching for psycopg2
Reading http://pypi.python.org/simple/psycopg2/
Reading http://initd.org/projects/psycopg2
Best match: psycopg2 2.4.2
Downloading http://initd.org/psycopg/tarballs/PSYCOPG-2-4/psycopg2-2.4.2.tar.gz
Processing psycopg2-2.4.2.tar.gz
Running psycopg2-2.4.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-SQwqs0/psycopg2-2.4.2/egg-dist-tmp-RtnRce
no previously-included directories found matching 'doc/src/_build'
zip_safe flag not set; analyzing archive contents...
psycopg2.tests.types_basic: module references __file__
Adding psycopg2 2.4.2 to easy-install.pth file

Installed /home/dave/server-full/lib/python2.6/site-packages/psycopg2-2.4.2-py2.6-linux-i686.egg
Processing dependencies for psycopg2
Finished processing dependencies for psycopg2

 

Finally, we make the relevant changes in our Firefox Server sync.conf file to point to our database, specifically, the storage and auth sections. In this example, my database is called syncdb, located on the server with the IP address of 192.168.1.4, and the database connection credentials are the user syncdbadmin with the password password:

[storage]
backend = syncstorage.storage.sql.SQLStorage
sqluri = postgresql://syncdbadmin:password@192.168.1.4/syncdb
standard_collections = false
use_quota = true
quota_size = 5120
pool_size = 100
pool_recycle = 3600
reset_on_return = true
display_config = true
create_tables = true

[auth]
backend = services.auth.sql.SQLAuth
sqluri = postgresql://syncdbadmin:password@192.168.1.4/syncdb
pool_size = 100
pool_recycle = 3600
create_tables = true
fallback_node = http://localhost:5000/

Note that contrary to what is written in the official Sync setup guide at the time of this blog entry, the correct driver name to use for the sqluri value is postgresql (i.e.as written above), not postgres as stated in the official docs.

 

See also: http://www.wenks.ch/fabian/mozilla-custom-sync-server/

“Fork Yeah! The Rise & Development of illumos”

Great presentation here from Bryan Cantrill (formerly of Sun, currently at Joyent) about the story behind illumos. Some great comments on the (destructive) role management and marketing can play in innovation, related comments about how badly Oracle don’t get this (and never will really), and a few fascinating tidbits about the history of Solaris at Sun to boot.

Updated: the video itself is now available:

“Who said IT was for Geeks?”

Nobody, but it sure does help…

Some local outfit that goes by the name of the “Computer Power Institute” has been putting these ads up around Auckland (quite large ones, in bus stops and the like):

Computer Power Institute ads

I really have to laugh. I understand in a way why an educational business such as this would want to target people who wouldn’t typically have an interest in the field, but it’s my firm belief – born out by the evidence I encounter again and again – that the best (i.e. most competent, efficient, knowledgeable, creative) people working in information technology as we define it are those that are geeks. That is, those for which it is more than simply a day job, and for which it is a passion and a lifestyle.

I think the analogy of a car mechanic is a suitable one here. Imagine BMW or similar advertising something to the effect of “who said working on our cars was for enthusiasts?”. Well, I sure wouldn’t want anybody like that working on my wheels, and if they did then I would expect the job to be completed to an entirely average standard at best. On the other hand, if I just wanted the spark plugs replaced in my used Toyota, I probably wouldn’t mind – but that hardly requires any skill.

I think if this institute is simply looking to train people to (ahem) “repair Windows”, set up Outlook clients, and run AV products on infected laptops, then fine. You don’t really need a geek to do that, and it’s not exactly taxing anybody’s intelligence nor creativity in problem solving or designing solutions. If they are looking to attract the best of the best however, then it makes far more sense to target those that have a genuine love of technology – and not those that spend more of their waking hours watching sporting events.

Customers certainly deserve far better, given the generally abysmal state of technical service out there.

blog.davekoelmeyer.co.nz – now with a WordPress Premium Theme

Quick post – I have upgraded this blog with the Photography premium theme from http://thethemefoundry.com/. I’ve always been fond of darker themes, and this one seems nice and clean to boot.

Now to check for any formatting hiccups…

Setting up a local Firefox Sync server

I love Firefox. Aside from the quite awesome levels of cross-platform support, I’m a big fan of the built-in Sync feature. For those concerned about security and privacy, Mozilla provide instructions for setting up your own Sync server, and the good news is that it’s a snap to get a basic server up and running.

For a start, on an Ubuntu 10.04 x86 VirtualBox VM, I followed the “Prerequisites” and “Building the server” sections here:

http://docs.services.mozilla.com/howtos/run-sync.html

My server VM is running with bridged networking on my local network with its own IP address.

 

Upon running the server and attempting to connect from other Firefox clients, I ran into two problems which I don’t believe are documented at the above link.

First, I could not get clients to connect successfully to the server using the handy “Add a Device” Sync feature. To troubleshoot and resolve this, I performed the following steps.

  1. Set up Firefox sync on the relevant client browser.
  2. In the Firefox client, launch the Firefox configuration page by entering about:config in the address bar (more information on this may be found here).
  3. Use the search filter to narrow down the entries relevant to Sync settings.


I noted that the setting named services.sync.serverURL was correctly pointing towards my server. I would have thought that this was sufficient to get Sync working, but apparently not: in my case, the setting named services.sync.clusterURL was pointing to localhost, and this also needed to be set to the server address (i.e. identical to the value set for services.sync.serverURL). Once done, the client could then successfully connect to the Sync server.

Update to the above: This is resolved by modifying the fallback_node property of the Sync server sync.conf file. There is a somewhat misleading reference to this in the official documentation, which says (at the time of writing):

“Warning: If you run behind a server, you need to set up the fallback_node option in the [auth] section accordingly…”

What is actually meant is if the server is serving multiple remote (i.e. non-local) clients, then the server address should be set in the fallback_node property. By default, the property is set to the following in the sync.conf file:

[auth]
backend = services.auth.sql.SQLAuth
sqluri = sqlite:////tmp/test.db
pool_size = 100
pool_recycle = 3600
create_tables = true
fallback_node = http://localhost:5000

If the IP address of my server is 192.168.1.4, then I would modify this to read:

[auth]
backend = services.auth.sql.SQLAuth
sqluri = sqlite:////tmp/test.db
pool_size = 100
pool_recycle = 3600
create_tables = true
fallback_node = http://192.168.1.4:5000

Clients should then connect to the Sync server seamlessly.

 

Second, once my clients were happily syncing up with my server, upon rebooting the server every one of them crapped out with a Sync authentication error. It turns out that the authentication database by default is stored at /tmp, so on reboot of course everything goes kablooey. Again, this is not documented clearly in the setup guide, but it can be resolved by performing the following.

Inspecting the contents of the Sync sync.conf file, the location of the storage and authentication databases can be specified. By default, the locations are defined as follows:

[storage]
backend = syncstorage.storage.sql.SQLStorage
sqluri = sqlite:////tmp/test.db
standard_collections = false
use_quota = true
quota_size = 5120
pool_size = 100
pool_recycle = 3600
reset_on_return = true
display_config = true
create_tables = true

[auth]
backend = services.auth.sql.SQLAuth
sqluri = sqlite:////tmp/test.db
pool_size = 100
pool_recycle = 3600
create_tables = true
fallback_node = http://localhost:5000

 

I changed these to point to a database that will instead be created at /var/sync:

[storage]
backend = syncstorage.storage.sql.SQLStorage
sqluri = sqlite:////var/sync/sync.db
standard_collections = false
use_quota = true
quota_size = 5120
pool_size = 100
pool_recycle = 3600
reset_on_return = true
display_config = true
create_tables = true

[auth]
backend = services.auth.sql.SQLAuth
sqluri = sqlite:////var/sync/sync.db 
pool_size = 100
pool_recycle = 3600
create_tables = true
fallback_node = http://localhost:5000/

 

After reconfiguring all Firefox client Sync connections, authentication then continues to function after the Sync server is rebooted.

Sync also works successfully from Firefox running on the Eee Slider Pad as well, if the first troubleshooting step is performed.

 

See also: http://www.wenks.ch/fabian/mozilla-custom-sync-server/