NiFi Build Error

I’m testing NiFi out on my local Gentoo installation to prepare for an implementation at work, and after a rather lengthy build/test process (“ten minutes” my fanny) ran into this error:

$ mvn clean install
[INFO] Scanning for projects...
...
'Script Engine' validated against 'ECMAScript' is invalid because Given value not found in allowed set 'Groovy, lua, python, ruby'

This error left me scratching my head.  Nothing related to JavaScript/ECMAScript dependencies were mentioned anywhere.  How would you get it, anyway?  Webkit, I suppose…

Sudden epiphany: this is a new Gentoo installation, and this program, including the build script, is running Java.  Gentoo doesn’t install Sun Oracle’s Java by default, but instead comes with IcedTea out of the box.  It’s acceptable for some simple uses, but is buggy for any complex. (Minecraft is a great example where it just doesn’t work.)  I haven’t used Java for anything yet, so I hadn’t installed the JDK yet.  The build instructions specify JDK 1.7 or higher, but I didn’t think anything of it because I’m used to just having it installed.

echo "dev-java/oracle-jdk-bin Oracle-BCLA-JavaSE" \
  >> /etc/portage/package.license/file
emerge -av dev-java/oracle-jdk-bin
...
$ mvn clean install
[INFO] Scanning for projects...
...
[INFO] BUILD SUCCESS

Finally!

NYC 2016

nyc vs boston
Finding your way in NYC really is easier

Meghan and I like to keep our kids exposed to the cultural world, giving them a cosmopolitan worldview.  I chose a job near Boston in part to allow frequent trips into the city.  But one city isn’t enough to give them a breadth of experience.

We took an overnight trip to New York City during February school vacation.  Discovery Times Square is currently exhibiting The Vikings, which is of particular interest to Meghan and Alpha.  (That isn’t to say there isn’t interest from me and Beta, they’re just that much more keen.)  Meghan found a great deal on motel rooms (the girls are old enough now that we need two) right by Times Square at Four Points by Sheraton.  The view wasn’t anything to write home about but the location can’t be beat: two blocks from Times Square.  The rooms were clean and neat, and the staff were bend-over-backwards friendly.  I would totally stay there again.

We drove down early Wednesday morning, dropping Butter off at Marty’s and picking up Meghan’s mom (aka Baba) on the way.  Baba loves going to NYC, she knows the lay of the land better than we do, and she’s a bit more adventurous than I am when the kids are around, so we invited her along.  She offered to share the kids’s room to keep costs down — and that provided peace of mind overnight, too.

Meghan yelled at me for this selfie. She insisted that it was inappropriate to do while making 75 mph on I-91.
Meghan yelled at me for this selfie. She insisted that it was inappropriate to do while making 75 mph on I-91.

We rolled into town around noon and got situated in the hotel with time to spare before our exhibit reservations.  We walked from the hotel and poked around Times Square for a few minutes.

woody and olaf
Click to expand

There were a pair of people in costume, one dressed as Woody from Toy Story and the other as Olaf from Frozen, soliciting tips.  They made their own costumes and don’t work for anyone but themselves, so Meghan got photos with each and tipped them a few bucks.

I continue to be amazed how many people are continually in New York City.  The crush of people feel like there’s an event going on somewhere, but it’s really just an every day occurrence.  Dozens of people at every crosswalk, hundreds of people on every sidewalk, all the time.  Boston has nothing on NYC.

alpha holding viking sword
Alpha holding a reproduction Viking sword

We made our way through the crowds to the exhibit and spent about an hour and a half learning about Vikings.  As an aside: the exhibit is self-paced and just about the right length.  They had a number of artifacts grouped into several themes about everyday life, instead of constructing a sequential historical narrative.

We waited to get lunch until after the exhibit so we were somewhat famished.  A few storefronts down from Discovery is a pizza and Italian restaurant called John’s of Times Square, located in a former church.  The adults had excellent pizza and the girls had excellent pasta.  It might have been a case of hunger making the best sauce, but probably not.

ulfbehrt sword
There’s a great NOVA episode about the “mystical” Ulfberht sword

After lunch we shopped around Times Square a bit.  Alpha bought a New York-emblazoned sweat shirt and Beta got a pin for her hat.  Baba noticed that Phantom of the Opera was playing right in front of us, so she bought three tickets for 8 o’clock that night.  Beta wasn’t interested and I was wiped from driving all day; we chose to stay in.

We wandered back to the hotel to rest up.  I had to step out in search of a pharmacy: we had a snafu when we left the house and forgot to pack our bathroom stuff.

meghan and alpha at phantom
Waiting for Phantom of the Opera to start

Our motel offers complimentary dinner stuffs on Wednesday nights.  We were just coming off of lunch, not particularly hungry, but the food was delicious. Free wine and beer, too!

We finished dinner and Beta and I headed up to our room to watch some TV and get ready for bed.  Meghan, Baba, and Alpha headed out to their show, and didn’t get back until after I was asleep — sometime after 10:30 pm.  They said they had a great time though!

We started the next day with an excellent breakfast buffet at the motel.  We seem to have a knack for choosing motels with great breakfasts; it really makes dollars stretch further if your breakfast is hearty when you’re traveling.

We decided that we could fit in one more museum visit before leaving town.  The American Museum of Natural History was on our way home and is always worth a visit.  We also considered the USS Intrepid but decided to save it for another visit so we can give it the amount of time it deserves.

wrong-way shadows
Notice the shadows. The sun is rising off to the right, but the cars are throwing shadows the wrong way. The strange beauty of a city made from glass.

We got in early and encountered almost no waiting to get into the parking garage and admissions line.  We had three destinations in mind: the dinosaurs, the blue whale, and the gift shop.  We got to see all three, in that order. The life-size blue whale model is stupendously large – and that’s after seeing the full-size apatosaurus for comparison.

baba and girls
Driving home (click to expand)

We made our way out of the city around 1 pm.  We didn’t want to get home too late, and the drive can take upwards of six hours with stops and detours to Willimantic and Hampton. The ride home was uneventful, traffic was mostly light and Waze didn’t let us down.  Butter the dog was very happy to see us when we picked her up, and I was extremely happy to sleep in my own bed.

Jones Family Outing

The Mystic Jones Clan met us at the Museum of Science today.  They’ve never been, we’re long-time members with a fistful of free passes, and the various cousins love seeing each other, so it was a date.

We planned to meet at the museum, but our first hurdle was knowing what time they would arrive — it’s a 90 minute drive for them, but only 20 minutes for us.  We made a rough guess on when to leave, and happened to get into the parking garage two cars before they did.  The museum garage was full, so we both wound up in overflow parking around the corner at the Galleria Mall.

lightning exhibitThe MOS is the MOS, which means we all had a good time.  Half of us got to see the electricity show, half chose to play in the animal displays.  We all got to play in the hands-on bits in the ‘models’ exhibit.

The youngest cousin is not quite six, so we finished with the museum after not too long.  He had fun monkeying around in the Discovery Center for a while, but even that’s not enough for a six year old to last all day.

Meghan and Mu
Meghan kept little Mu busy and entertained. When he snuggled up in a sleepy-little-kid pose we had a collective realization that he’s tired.

We wandered back to the mall to grab a little food and figure out dinner.  A mall-wide fire alarm kept us outside for a bit, but eventually the fire department showed up and disabled it — false alarm.  We considered our options while running around Newbury Comics and settled on an early dinner at P. F. Chang’s – right outside the mall.

The food was excellent, the service was terrible, the kids were acceptable.  Meghan got in some little boy time, giving Katie a break.

As the sun went down, some flurries kicked up as a fresh storm prepared to roll in overnight.  The Mystic Joneses had a long drive home so we all packed up and headed out.

lighting show
The Lighting Show in the Theater of Electricity, at the Boston Museum of Science. Meghan thinks the bolt looks like a dancer.

Winter Finally Arrived

After the warmest winter to-date, including multiple spans of 50° and 60° F days, we finally got some cold.  We bottomed out at -10° F.

-10 degrees F
The outside thermometer is currently in a sunbeam; I believe (per the forecast) that the current temp is more like 10° above zero.

Bridging Wired and Wireless Networks, Gentoo-style

I want my wired and wireless networks to share a single 192.168.1.x address space (instead of separate 192.168.0.x and 192.168.1.x addresses).

In order to do that, we need to set up a bridge to merge disparate networks into a single space.

Part 1: The Basic Configuration

ADMtek NC100 (uses tulip driver)
Ralink RT61 PCI (uses rt61pci driver)
hostapd
linux 4.1.15-gentoo-r1
net-misc/bridge-utils 1.5
net-wireless/iw 3.17

Part 2: Making It Work

I started out creating a basic bridge, using the Gentoo Wiki as a guide:

cd /etc/init.d
ln -s net.lo net.br0

/etc/init.d/net.br0 start

There’s no need to change how hostapd starts; it still talks to wlan0 (not br0).

# /etc/conf.d/net

modules_wlan0="!iwconfig !wpa_supplicant"
config_wlan0="null"
config_eth0="null"
config_br0="192.168.1.1/24"
brctl_br0="setfd 0
sethello 10
stp off"
bridge_br0="eth0 wlan0"

The Problem

The above config is naive and doesn’t work right.  I got this error:

Can't add wlan0 to bridge br0: Operation not supported

Huh.  There’s nothing indicative in dmesg about the error, the last entry shows the bridge being created on the wired card and then being taken down.  Just to be sure, I created a bridge with just eth0 and it worked:

$ brctl show
bridge name   bridge id           STP enabled   interfaces
br0           8000.00045a42a698   no            eth0

After casting about a bit, I found a serverfault.com page that pointed to this fix:

$ iw dev wlan0 set 4addr on
$ brctl addif br0 wlan0

That works, but that won’t do me much good as a long-term solution.  I would need to pay a visit to the basement after every planned reboot and unplanned power outage, or else nobody can get onto the network.

( More about the 4addr option here. )

You can’t just add the option to modules_wlan0, it doesn’t work that way.  A quick visit back to the wiki suggested the solution, though, which is to define a preup function where we can execute arbitrary commands.

The Working Config

These statements are in addition to the WAN interface config:

# /etc/conf.d/net
modules_wlan0="!iwconfig !wpa_supplicant"
config_wlan0="null"
config_eth0="null"
config_br0="192.168.1.1/24"
brctl_br0="setfd 0
sethello 10
stp off"
bridge_br0="eth0 wlan0"

preup() {
    # br0 uses wlan0, and wlan0 needs to set the
    # 4addr option before being used on a bridge
    if echo "${IFACE}" | grep -q 'br0' ; then
        /usr/sbin/iw dev wlan0 set 4addr on
    fi

    return 0
}

Then do all the accounting to clean up:

rc-update add net.br0 default
rc-update del net.eth0 default
rc-update del net.wlan0 default

I also had to update my iptables config to refer to br0 instead of eth0 and wlan0.

Finally, a reboot to test that everything starts properly.

Your Tax Dollars At Work

A thought for anyone who asks “Can I stop paying taxes because of this thing I don’t like/can’t use?”

There are lots of things that you pay for but will not, choose not, or hope not to use. Your tax dollars go towards welfare, unemployment, drug treatment programs, prisons, nuclear bombs, and foreign countries. Do you expect to take advantage of any of those programs in the near future?

Taxes pay for things that benefit the public at large, but don’t necessarily benefit you.  That’s a price we pay for civilization.