We're the kind of monkeys that don't throw feces ... very often

Android App: Beacon Mission Manager

Last week I dove in and wrote my first Android app. I've been waiting for a good reason to give it a try and one finally fell into my lap. I'm a volunteer member of a search and rescue team. We use management software from Radishworks.com named Mission Manager. They released an API the other day so I took up the challenge. The result is Beacon Mission Manager. Collaborators welcome.

Cleaning Up After Amazon Appstore

Amazon Appstore for Android has a nasty habid of leaving old files around. This can cause major problems when your SD card fills up and you don't discover it until you're trying to snap a photo. What happens is Amazon downloads the APK file to the SD card and then installs it. That part is fine and necessary, in fact. The problem is the file never gets cleaned up. I can't think of any good reason for that. Maybe there's an argument for leaving it for a brief time, just in case you re-install the app, but not forever.

The workaround is to nuke the cache folder. On my DroidX, it's in /sdcard/Android/data/com.amazon.venezia/cache/. Just delete everything in there.

The correct solution, of course, is for Amazon to clean up its own temporary files.

SOPA/PIPA Blackout

Today is the great SOPA/PIPA blackout. These are two proposed bills in Congress which would create a censorship regime for the Internet, much like China, Iran, and Syria have. And we know how great those governments are, so why wouldn't we follow in their footsteps? Wikipedia and Google are the most notable, but thousands of other sites went offline in protest. We at zmonkey.org fully support these actions. Draconian Internet censorship laws are not the solution to anything, especially not when the primary problem is an outmoded business model in Hollywood. If you value your freedom on the Internet, join me in telling your representatives how horrible this proposal is.

ImageMagick Error "convert: missing an image filename"

I started using Jigl for my private photo gallery, and quite like it. In the process of generating the HTML, I received the following error:

convert: missing an image filename `0601091401.jpg' @ convert.c/ConvertImageCommand/2775

The problem turned out to be a zero byte file named 0601091401.jpg, but ImageMagick puked on it because it wasn't actually a regular file; rather, it was a symlink to that empty file. Apparently ImageMagick doesn't respond kindly to nonsense like that. The solution was just to remove the source file and the offending symlink.

Port 25

South Korea is reportedly preparing to block TCP port 25 and force all mail traffic through "official mail servers", whatever that means. The BBC article isn't much on technical details. I'm still on the fence about blocking port 25. Fundamentally, I'm opposed to blocking ports outright. If somebody is shown to abuse a service, I'm fine with restrictions. I'm not excited about the prospect of requiring all mail to go through a central server, whether it's mine or someone else's. Consolidation like that tends to make small problems into big ones, such as when one user does slip through and send out spam, now everybody else on that server is put on a blacklist. I can tell you, that's no fun to clean up.

I'm also not convinced that blocking port 25 eliminates spam. It closes down one loop hole, yes, but spammers just need to find a single vulnerability. The common one I see now is to steal mail passwords and use the victim's legitimate mail servers as a relay. Using a good password and not sharing it between sites is good protection against that, but not everyone has gotten that memo. Destination end filtering, as imperfect as it is, will be around to stay for a long time.

Green Chile Sauce

At the farmer's market on Saturday I came across a couple big bags of Hungarian wax and serrano peppers. It immediately occurred to me that I needed to make a chile sauce with them. And so I did.
6 Hungarian wax peppers
30 serrano peppers
1/4 large onion
2 cloves garlic
1-1.5 cups oil
1 tbsp red wine vinegar
I roasted the peppers and onion, but that's optional according to your tastes. I also removed the stems and seeds to keep that pithy taste out. Then came the easy part, tossing it all into a blender and hitting puree. The oil amount I had to adjust to get the right consistency. I debated at length about whether to push it through a seive or not, but in the end decided to so that I could be certain it would flow easily out of my squirt bottle. It tasted fine both ways. Perhaps a super-powered blender would have made it a moot point. The one change I would probably make for next time (oh yes, there will be a next time) would be to add in some more sweet peppers, maybe a half dozen roasted poblanos. I did enjoy the heat, but I'd prefer to get a stronger chile flavor at the same time.

Create A Degraded RAID1 Array

Say you wanted to create a RAID1 device but didn't have all your devices ready. Here is how you could create a degraded RAID1 array and then add the second device at a later time. For these examples /dev/sda1 is the first device which will become our RAID and /dev/sdb1 will be added later.

First step is easy, create the RAID array. Our array will be /dev/md0. The "-n 1" option tells it that just a single device will be used and "-f" is required to use such a non-standard option.

$ mdadm --create /dev/md0 -l raid1 -f -n 1 /dev/sda1

You can confirm that your device is working through /proc/mdstat:

$ cat /proc/mdstat
md0 : active (auto-read-only) raid1 sda1[0]
4881700 blocks super 1.2 [1/1] [U]

Now we need to add this device to /etc/mdadm/mdadm.conf, otherwise the system won't see it automatically after the next boot. First we have to find out the UUID that was assigned to the array:

$ mdadm --detail /dev/md0 |grep UUID
UUID : 7fc1afb1:e68bef6b:8972b79f:1bd36cd5

Add a line like this to your mdadm.conf:

ARRAY /dev/md0 metadata=1.2 uuid=7fc1afb1:e68bef6b:8972b79f:1bd36cd5

That's all it takes to create the degraded array. Now comes the fun when you want to expand it. First step is to grow the array to have 2 devices instead of just one with this command:

$ mdadm --grow /dev/md0 -n 2

You can confirm it's there with mdadm --detail:

$ mdadm --detail /dev/md0
/dev/md0:
...
State : clean, degraded
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Number Major Minor RaidDevice State
0 8 19 0 active sync /dev/sda1
1 0 0 1 removed

All that's left is to add the new drive to the array where Linux will automatically put it into place where the missing disk is.

# mdadm --manage /dev/md1 --add /dev/sdb1
mdadm: added /dev/sdb1

# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
29221139 blocks super 1.2 [2/1] [U_]
[>....................] recovery = 1.7% (506496/29221139) finish=8.5min speed=56277K/sec

Asterisk Experiment: IPv6 and TCP

I couldn't tell you how long these features have been in Asterisk but I decided to give IPv6 and SIP/TCP a try in the latest 1.8 release. Basically it's a simple process. There are no special options required in the build, not that I could find anyway.

Once it's installed, there are two configuration options that need to be set. By default Asterisk will only listen on IPv4 and UDP so add these options in sip.conf:

  tcpenable=yes
  bindaddr=::

Obviously those two can be used independently if you want to try just IPv6 or just TCP, but where's the fun in doing one thing at a time?

So far everything is working just like it used to. I only have one phone that supports IPv6 or TCP, a softphone for Android named Sipdroid. Hopefully more devices will add support in the future.

World IPv6 Day Wrap-up

Looks like World IPv6 Day was a good success. I saw a lot of traffic on NANOG announcing various issues people had seen, and many people declaring success. My own little fiefdom experienced relatively few problems. My Linux laptop had no issues with Google, Facebook and the other sites I could find. I reset my traffic counters this morning so I could watch it:

  • IPv4 inbound: 476MB, IPv4 outbound: 77M
  • IPv6 inbound: 5320K, IPv4 outbound: 1744K

On the work side of things, unfortunately we only have a few IPv6 test subjects so we weren't able to verify our own network. Given that it works fine in all our other tests I'm sure it's working correctly. What I wonder is if anybody had issues due to broken tunnels; none have been brought to my attention anyway.

NAT

If you've ever thought to yourself, "self, I'm going to borrow these public IP addresses which aren't mine and use them for my internal, natted network", well then let me set you straight. Don't do it. Disaster will strike at some point and the consequences will not be good. But if you do it anyway, don't expect me to feel sorry for you either.

Also, NAT sucks.

Syndicate content Syndicate content