SMF: Tomcat

For my Tomcat SMF setup, I have two files.  One, the configuration for SMF.  The second is the script used to start and restart tomcat. (My stop is simply a kill. Unfortunately, there are a few threads that aren’t shutting down properly.)
<Read on…>

Google in China?

Google corporate infrastructure was hacked in mid-December. It looks like not that much information was stolen.

However, it has said that they will no longer be censoring search results for users in China because the attach originated from the Chinese government:

We have decided we are no longer willing to continue censoring our results on Google.cn, and so over the next few weeks we will be discussing with the Chinese government the basis on which we could operate an unfiltered search engine within the law, if at all.

How awesome is that?

What that tells me though is that google.cn will stop operating in the next few months. We all know that there is no way in hell the Chinese government will allow google to provide results, uncensored.

Check it out: http://googleblog.blogspot.com/2010/01/new-approach-to-china.html

Why is SSH so Slow?

I was having a horrendous time logging into one particular Linux server.  It would take anywhere from 20 seconds to a minute to let me log in.

Turns out, there are two sshd config settings you should pay attention to:

VerifyReverseMapping and GssAuthentication

The latter only really helps if you are connecting from a Mac (like me).  VerifyReverseMapping will tell the server to look up the host name for client IPs, and if the IP you’re SSH’ing from doesn’t have a reverse DNS entry, this will result in a DNS timeout.  (The source of most of the delay in logging in.)

So open up your sshd config file: /etc/ssh/sshd_config

Remove VerifyReverseMapping, if it exists.  The default value for it is no.  If you don’t see it, this isn’t the source of your problem.

Remove GssAuthentication, if it exists.  It also, defaults to no.

Solaris Service Management Facility

Leading in with my post on switching from Linux to OpenSolaris, there are quite a few things I am in love with on OpenSolaris.

Since my first real world exposure to OpenSolaris is the process of migrating web applications away from Linux, the first thing I really had to get familiar with is the Service Management Facility framework.  SMF for short.  SMF is the Solaris equivalent of UNIX/Linux init.d, Apple’s launchd, or Windows services.

I’m coming from a decade long Linux background so let me compare and contrast init.d and SMF. <Read on…>

Passed a Honda Insight

On the way to work today, in a foot of snow, I passed a Honda insight that couldn’t make it up a hill.

I stopped at the base of the hill, 50 feet back, waiting for the hybrid to cautiously back down. Then the fart sniffer did something grand. He cut the wheel. Backed into a ditch. Got the whole thing stuck. How long have you been driving, sir?

I laughed as I drove past in my Jeep Wrangler with 33″ tires. If he was in any other non-hybrid vehicle, I would have stopped and pulled him out. But those hybrids don’t come with tow hooks… ;)

I laughed all the way to work.

Then I ran out of gas.

Linux to Solaris

It was 3 in the morning. I just got one of the pages (well, now text messages) that you dread. Site’s down. Shit. This is the 4th unexpected “Availability Event” in the past 6 months. What is it now?

I fire up the grid control panel on my laptop. Well, try to. The browser is just spinning. Grrr. Let’s see if I can SSH into the grid controller. Nope, just spinning there too. What the heck man? All the websites and applications are down. You’ve got to be kidding me!

I fire off a quick helpdesk ticket and then call the emergency line for our guys.  Leave a voicemail.  Get a callback in 5 minutes from them.  Hmm, they are awake already?

John Doe:  ”Mike, just calling you back.”
Me: “What’s the story?”
John Doe: “Yeah, well you see, the Data Center is doing network maintenance.  And we just got the email 20 minutes ago, ourselves.”
Me: “?!??!?!!”
John Doe: “Yeah, that’s what we said.  There is nothing we can do but wait it out.”

You know, this one wasn’t their fault.  But it was the last straw.  It is time to cut our losses and run.  RUN!

<Read on…>

Retrieve Request URI in Spring Web Flow

You know, Spring Web Flow could be the most aggravating library I have ever worked with. Well, it is at least in the top 5.

Riddle me this:

How do you retrieve the current request URI from within a currently running flow?  And how do you use that in your flow xml?

You see, Web Flow (rightly) swallows up the normal J2EE API that are available to you: request, response, etc.

So why in the world would you want to retrieve the request URI?? Well, flows can contain sub flows. And flows can be reused in different locations within your app. So what if you need to display some text or UI or links based on what part of your application the flow is running in? Well you can’t given the Web Flow API.
<Read on…>

MobileMe: Verily We Scorn, Scene 1.

I just bought my wife an iPhone after two years of her hating mine.  She downright despised it.  Then her killerapp came along and she just had to have it.  (I won’t tell you what app it is, but I’m sure you can guess it has something to do with Women’s insecurities. ;)

With both of us having access to the supreme mobile device on the planet (come on android and webos!  I’m rooting for you!), I decided to go ahead and buy a MobileMe account so we could have immediate access to a shared calendar.  Gosh, I’ve lived without it for so long, (How long ago was I using Palm Treos?)  I forgot how much I wanted it.

Buying a MobileMe subscription at the same time as your phone nets you $30 off.  I highly recommend it.

However, despite all that MobileMe offers, my hopes and dreams… kaput. <Read on…>

Dot Star Question Mark and Other Mishaps

I’m in the process of rolling out a new feature for Raveal.  Sometime during development of it, I noticed that suddenly a large portion of the portfolio slowed way down.  In fact, pulling up the edit screen took about 3 seconds on my dev computer!  That’s not quite right.

This new feature adds projects to the portfolio.  In the context of Raveal, a project is a free form “document” that allows you to create just about anything to describe work you have done.  It could be straight up text.  Or it could be text with diagrams and illustrations.  Or it could be images and video with short paragraphs explaining each.  It truly is so powerful, I worry that people will have a hard time figuring out what they want to use it for!
<Read on…>

Sorting by date with SOLR

Just went through a few hours of pounding my head.  I couldn’t, for the life of me, get SOLR to return results sorted by a new date field added to our schema.  My query was simply:

pr_score:[3 TO *] sort pr_lastUpdated desc

No matter what, the results came back sorted by ANYWHICHFRICKINWAY.

Scouring the mailing lists and google search results yielded exactly squat.  Then I found it.  By pure chance I was looking at a developerworks article on IBM and in a table at the bottom the showed this crazy syntax:

<Read on…>