Monday, November 22, 2010

DBAN *ERROR /dev/sda (process crash)

So I was using DBAN 2.2.6 beta to wipe the drives on a Dell PowerEdge 860. After typing "autonuke," DBAN would load, but instead of starting the wipe I would get these errors:

DBAN finished with non-fatal errors.
*ERROR /dev/sdb (process crash)
*ERROR /dev/sda (process crash)
Press and hold power button to shut down


When I loaded DBAN manually (by pressing enter at the boot prompt instead of typing "autonuke"), I would see an "unrecognized device" in the device list.

I finally figured out what it was: the DRAC had set up some kind of virtual drives. I had to go into the DRAC menu (Ctrl-D when it asks you at the boot prompt), page down until I saw the virtual drives, and then I pressed E to disable them. Once I did that, DBAN ran just fine.

Edit:
I just ran into this same problem on a Dell PowerEdge 1950, but it must have had a different DRAC version because the process of disabling of the virtual drives was a little different. I had to press Ctrl-E to get into the DRAC menu when it prompted me, then I had to arrow down to Virtual Media Configuration and change the Virtual media setting from attached to detached.

Thursday, November 18, 2010

UnsatisfiedLinkError exception loading native library: njni11

So... I was working on automating an Oracle 11.1 db installation on a RHEL 5.5 machine. I automated the software install, but when running dbca to create the database, I kept getting this error:

UnsatisfiedLinkError exception loading native library: njni11

I googled it, but all I found were posts on how I needed to make sure I had installed the necessary packages, in particular libaio and libaio-devel. Well, I had all of those installed but I was still getting the error.

It finally hit me: I was automating everything (using Puppet), and hadn't explicitly configured those packages to be installed before Oracle. So they must've somehow gotten installed afterward. The Oracle install still succeeded for some reason, but dbca wouldn't run. Thankfully it was a VM, so I just told puppet to make sure the required packages were installed, reverted to my pre-Oracle-install snapshot, et voila!

Now time to figure out what these listener.ora and tnsnames.ora files are for and how they should properly be configured...

Wednesday, October 27, 2010

Why Python?

It's occurred to me I haven't posted much on Python, which has been my preferred computer language for the last couple of years. Nothing else compares: it's high-level, object-oriented, actually encourages easily-readable code, and doesn't get in my way as a programmer.

Granted, I'm not an expert in the field, but every time I have to program in other high-level languages such as PHP, Java, bash, or (in a worst-case scenario) Perl, I realize how much Python has spoiled me.

Here's a link to an amazing article that got me to consider Python (and I would imagine it's probably done the same for many others):

http://www.linuxjournal.com/article/3882

Enjoy!

Thursday, July 15, 2010

Genie/Vala

You wouldn't know this from reading my blog, but I'm a Python fanboy. Maybe I haven't blogged anything about Python because it's already so completely awesome that there isn't much to blog about. Well, anyway, today I stumbled upon an interesting programming language called Genie:

http://live.gnome.org/Genie
http://en.wikipedia.org/wiki/Genie_%28programming_language%29

Genie is pretty intriguing for many reasons. It's a high-level language that uses the Vala compiler. What is Vala?, you might ask. Vala is a high-level language that can be used to write cross-platform code. It's syntax is similar to C#, but unlike C#, Python, Java, or many other modern high-level languages, it doesn't need a runtime environment/VM to run, because it compiles to C, which then of course compiles to machine code. And because it compiles to C, it can be used to write cross-platform applications, on anything that supports GLib, which at the very least covers the big 3 (Windows, OS X, GNU/Linux).

So Vala itself is pretty cool. What makes Genie even cooler is that it has more of a Python-like syntax, which, of course, is one of the coolest things about Python (for those of us that happen to like Python). And Genie and Vala can be used alongside each other.

How's this for a Hello World?:

init
print "Hello, world!"


Granted, not quite as basic as a Python Hello World:

print "Hello, world!"


but basic enough. It's sure nice on the eyes without all those curly braces and semicolons at any rate.

So... if at any point I am developing an application and want the benefits of a compiled language that doesn't rely on a VM, I'll definitely be checking out Genie. And for those of you who aren't too fond of Genie's syntactical style, I'd recommend checking out Vala.

If nothing else, it sure beats trudging through C/C++. Yeah, they're not bad languages, but it seems to me with the way technology is continually advancing, it's ridiculous that C/C++ are still sometimes the best options for software development, especially when it comes to performance. Who knows, maybe Genie/Vala are the next C++. Then again, maybe not, but they're definitely worth looking into.

Tuesday, June 8, 2010

ubuntu 10.04 annoyances

well, I just upgraded to the latest version of Ubuntu (10.04), and every time I do, inevitably it seems that something breaks or at least doesn't quite work the way it used to. For instance, in 9.10, grub didn't recognize my /boot partition. I found a bug report for it, but I'm still not sure if it's fixed or not. And in Firefox, every time I'd do a search for text in a page, if it got to the end of the page or there were no search results, the page content would stretch beyond the browser window (I'm guessing it thought the browser was maximized somehow). I looked for a bug for that once, didn't find it, and dealt with it.

so... apparently I'm too lazy to look up and see if these are bugs, at least for the moment, but here are my current annoyances with Ubuntu 10.04:

  • clicking on the Rhythmbox icon in the system tray no longer opens and closes the window. I now have to click the icon, then click "Show Rhythmbox" to open the window, and use the "X" in the top bar of the window to close it. Yeah, it sounds silly, but it's more work now (at least to open it).

  • I can no longer drag a tab from Firefox from one desktop to another. I have to first drag the tab off of the window so it creates a separate window, then drag that entire window to another desktop. that's pretty annoying.



I did find one bug, with my sound, and I even reported it, so I guess I'm not completely lazy... (https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/589915)

Monday, May 24, 2010

jTDS for dummies

I got this error when trying to use a MS SQL data source in Confluence:

Cannot load JDBC driver class 'net.sourceforge.jtds.jdbc.Driver'

I had downloaded the jTDS JDBC driver (or so I thought) and put it in the common/lib folder of my Tomcat installation.

What I had done wrong is I downloaded the jtds-1.2.5-bundle.jar file thinking it was the MS SQL connector I needed. Apparently I should have downloaded the jtds-1.2.5-dist.zip file, extracted jtds-1.2.5.jar from that, and copied that file to my Tomcat common/lib folder.

Friday, May 21, 2010

balsamiq

I just stumbled upon this really cool program for creating UI mockups called Balsamiq. I'll let the pictures speak for themselves. You can also play with it online:

http://www.balsamiq.com/builds/mockups-web-demo/

One possible open source alternative is called the Pencil Project, but it looks like it's maybe got a little too much going on. One of the main things Balsamiq has going for it is it only takes a couple of minutes to slap together a mockup. You definitely don't want to be spending more time on your mockup than you have to, taking away from time spent actually implementing it.

One promising alternative, which is free and web-based is Mockingbird. It uses Javascript, and it's pretty nice.

Balsamiq examples:



Thursday, May 20, 2010

Heimdal 1.3: BAD_ENCRYPTION_TYPE

Solution:

Edit the Kerberos configuration file (for me it's /etc/krb5.conf), and add this line in the [libdefaults] section:

allow_weak_crypto = true

Details:

More of the same... (see my posts on Berkeley DB) I compiled the latest version of Heimdal Kerberos the other day (it's the recommended flavor of Kerberos to use with OpenLDAP), and after getting everything set up, I would get these errors when trying to run LDAP searches:

SASL/GSSAPI authentication started
ldap_sasl_interactive_bind_s: Local error (-2)
additional info: SASL(-1): generic failure: GSSAPI Error:  Miscellaneous failure (see text) (encryption type 2 not supportedt))

(sometimes it also said encryption type 1 not supportedt, again with the t on the end of supported)

My first thought was maybe I didn't have a valid Kerberos ticket, but when running kinit, I would get this:

kinit: krb5_get_init_creds: BAD_ENCRYPTION_TYPE"

Google searches on those terms didn't get me far, but after looking through the Heimdal documentation, I realized they deprecated support for DES encryption in Heimdal 1.3. The solution I discovered for enabling it again is posted above.

Et voila! Back in business.

More information: DES will die in Heimdal 1.3

Wednesday, May 19, 2010

Compiling Berkeley DB on GNU/Linux

When compiling Berkeley DB on GNU/Linux (in particular if it's being compiled to be used with OpenLDAP), make sure you compile it with the following flags:

--enable-posixmutexes --with-mutex=POSIX/pthreads

I happened to run across that buried in the openldap-software mailing list archives. Here are some more details:
"On x86 though, they have a hybrid mutex mechanism which is enabled by default. It uses both assembly language spinlocks and pthread mutexes, first spinning in the assembly language lock some number of times before falling back onto the mutex. They claimed that this improved performance in their tests, because pthread mutexes can be very expensive on some platforms. In my tests on x86_64 Linux however, it just forced CPU usage to 100% (200% actually, dualcore) and slowed down overall throughput.

You can give an explicit "--with-mutex=POSIX/pthread" argument when configuring BerkeleyDB to avoid the hybrid mutex scheme"
http://www.openldap.org/lists/openldap-software/200708/msg00344.html

"BerkeleyDB will use excessive CPU on Linux unless you configure --with-mutex=POSIX/pthreads. By default it uses "hybrid" mutexes, which use an assembly language spinlock loop before falling back to pthread mutex. The spinlock will chew up all of your CPU on multiprocessor machines..."
http://www.openldap.org/lists/openldap-devel/200809/msg00085.html

More:
http://www.openldap.org/lists/openldap-devel/200902/msg00064.html
http://www.openldap.org/lists/openldap-technical/200906/msg00015.html

Wednesday, January 27, 2010

bacn

Is anyone out there actually using this term other than me? In general, I normally just try not to sign up for stuff that I'm not going to read (mailing lists, etc.), but there is the occasional list that I may not read regularly, but still don't want to unsubscribe from. Especially at work, where I'm supposed to be subscribed to certain mailing lists, but I don't necessarily have time (or want) to read everything they send me, so they go to their own special bacn folder :D

http://en.wikipedia.org/wiki/Bacn_(electronic)