First Item Sold

First Item Sold I’ve been working on several product niches, following Anton’s Drop Ship Lifestyle system for a few months now, along side all my other projects, and this week I got my first sale so I’m very excited for the future.

Drop Ship Lifestyle has a very vibrant community, both online with their members only forums and in Chiang Mai, Thailand where Anton is based at the moment, and watching everyone else getting results has been extremely motivational for me. However there is nothing like actually getting results yourself and it’s very reassuring to know that the Drop Ship Lifestyle system really does work.

I’m still going to be very busy for the next few weeks whilst I’m preparing to move to Thailand in September as I’m still working my 9-5 until I fly out, but then it’s all systems go and I’ll be able to commit some real time and energy in to the project and start crushing it!

yum error: Couldn’t fork Cannot allocate memory

I’ve been doing some awesome things to a new VM for work, namely installing CouchDB, Apache and running Node.JS apps along side a WordPress plugin using Angular.JS. It’s pretty cool. But computer’s are dicks so when it came down to installing Monit to ensure everything was lovely I got the following error: Couldn’t fork %pre(monit-5.5-1.el6.rf.x86_64): Cannot allocate memory. Bum.

error: Couldn’t fork %pre(monit-5.5-1.el6.rf.x86_64): Cannot allocate memory

Seem’s simple enough, for whatever reason Yum cannot allocate memory, so lets take a peak

root@bridge opt]# free
             total       used       free     shared    buffers     cached
Mem:       1020376     832736     187640          0       3988      81256
-/+ buffers/cache:     747492     272884
Swap:            0          0          0

Man there’s totally enough memory there, 187MB of RAM is free, Quake took less than that and is way more complicated than some stupid RPMs.. maybe it’s something else!

Quite often this error is caused because the RPM database has duplicates or got corrupted in some way, so lets try and clean that up.

[root@bridge ~]# package-cleanup --cleandupes
Loaded plugins: fastestmirror, protectbase
Loading mirror speeds from cached hostfile
 * base: mirror.checkdomain.de
 * epel: mirrors.n-ix.net
 * extras: mirror.checkdomain.de
 * rpmforge: mirror1.hs-esslingen.de
 * updates: mirror.checkdomain.de
1490 packages excluded due to repository protections
No duplicates to remove
[root@bridge ~]# rpm --rebuilddb

Well no duplicates and the RPM database is all cool, so lets try again ..

[root@bridge ~]# yum install monit
Loaded plugins: fastestmirror, protectbase

Running Transaction
Error in PREIN scriptlet in rpm package monit-5.5-1.el6.rf.x86_64
error: Couldn't fork %pre(monit-5.5-1.el6.rf.x86_64): Cannot allocate memory
error:   install: %pre scriptlet failed (2), skipping monit-5.5-1.el6.rf
  Verifying  : monit-5.5-1.el6.rf.x86_64                                                                                                                                                                                                                                       1/1 

Failed:
  monit.x86_64 0:5.5-1.el6.rf                                                                                                                                                                                                                                                      

Complete!

Man, haters gonna hate!

Solving error: Couldn’t fork %pre(monit-5.5-1.el6.rf.x86_64): Cannot allocate memory

Ok, lets step back a minute and assume the error is legit, lets turn some stuff off ..

[root@bridge ~]# /etc/init.d/couchdb stop
Stopping database server couchdb
[root@bridge ~]# /etc/init.d/httpd stop
Stopping httpd:                                            [  OK  ]

And try again!

[root@bridge ~]# yum install monit
Loaded plugins: fastestmirror, protectbase

Downloading Packages:
monit-5.5-1.el6.rf.x86_64.rpm                                                                                                                                                                                                                               | 267 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : monit-5.5-1.el6.rf.x86_64                                                                                                                                                                                                                                       1/1 
  Verifying  : monit-5.5-1.el6.rf.x86_64                                                                                                                                                                                                                                       1/1 

Installed:
  monit.x86_64 0:5.5-1.el6.rf                                                                                                                                                                                                                                                      

Complete!

Sweet that did it. So it was a bonafide legit error and shutting some services down freed up enough memory to allow us to install RPMs again.

root@bridge ~]# free
             total       used       free     shared    buffers     cached
Mem:       1020376     510972     509404          0      11632     146780
-/+ buffers/cache:     352560     667816
Swap:            0          0          0

mmm 509MB free, thats a lot more.. I guess Yum actually needs a ton of RAM to actually do anything. Weird. If you guys get this problem, try turning some services off and on again 😉

Downsizing And Travelling Light With A Kindle

Travelling Light With A Kindle I love reading but reading for myself is something that only happens nowadays if I go on holiday. There’s far too much work related material to read instead.

One of the things I want to do is read more, and for myself. There are at least a dozen books going dusty that I haven’t read yet and many more that I need to catch up on!

Travelling Light

When I travelled around Europe in 2004 I made a lot of mistakes that I’ve since learned from. Including carrying a half dozen guide books of Europe with me.

I made a similar mistake on the 2012 Mongol Rally when we took the Lonely Planet guide for pretty much every country we went through with us. We had a car so weight wasn’t an issue, but all those paperback books ended up damp and left in Ulan Bator.

Downsizing

I moved flat in October 2011 and did it backwards. Moving in and unpacked completely before going through everything I owned to decide if I needed it or not! As part of that downsizing I sold all my CDs and DVDs and donated most of my books to either my parents or the British Heart Foundation. (The BHF later informed me they’d raised £100 due to the sale of the books!) I only kept my vinyl any any of my books that either I hadn’t read or were full of beautiful pictures.

Downsizing And Travelling Light

I’m now looking for obvious ways to both downsize and travel light and replacing all my books with a form of E-reader is a no brainer.

Ebooks can be well under 1MB in size and with the advances of flash memory you can store millions of them in something smaller than a paperback novel.

I do already have an iPad and an iPhone which have many Ebook related apps but for several reasons they are unsuitable.

I took an iPad with me for the Mongol Rally and whatever anyone says it’s not a replacement for a laptop. As I have a laptop the iPad only gets used for my photography portfolio so extra features would go unused. iPads are also quite expensive and I will worry about losing or damaging it.

An iPhone can do everything under the sun but this means it has a short battery life. If I use it as a phone, camera, MP3 player and Ebook reader it will last half a day tops. Also if I lose it I then I lose more than just the ability to place phone calls.

Kindle Paperwhite

I know a few people with Ebook readers so before I made any decisions could trial a few in person. I got to play with both dedicated E-readers like the Nook and [amazon text=Kindle&asin=B00JG8GYAW] range as well as some Android tablets.

Whilst lacking all the features of a full tablet, the dedicated Ebook readers were a lot more suitable for reading books. Featuring a longer battery life, screens that were easier on the eyes and a more rugged build their cheaper price felt like a bonus.

The [amazon text=Kindle Paperwhite&asin=B00JG8GYAW], pictured above along side the books it will be replacing seemed to be the best device for me. As you can see it’s a much smaller and lighter option.

The 6″ screen is more comfortable to read from than a phone and more portable than a full size tablet. The entire thing can fit in either the rear or front pocket of all the trousers I wear.

The device itself is rugged, I won’t think twice about throwing it in to my bag and the matt finish suggests scratching wont be an issue.

The [amazon text=Kindle&asin=B00JG8GYAW] store uses DRM to prevent piracy which is always a worry as it limits where you can source books from. Amazon is HUGE though and the majority of the books on my unread list are available from there so that is less of an issue. There’s 2GB of space which is enough to store 2000 books, more than I imagine I will read in the next 20 years!

The standout bonus is Amazon provide free world wide 3g on the Kindle and a basic web browser. For travelling this is amazing and something I will treat as an added safety net. As long as I have the [amazon text=Kindle&asin=B00JG8GYAW] I should be able to E-mail or Facebook an SOS message!

12 Weeks in Thailand: The Good Life on the Cheap

I’d been toying with the idea of escaping my 9-5 for a while and came up with 2 different ideas. The first was to go to the Mana Retreat in New Zealand, volunteer and live for free whilst meditating and doing yoga.

The second idea was a Thai fight camp.

Googling lead me to JohnnyFD and this book, 12 Weeks in Thailand: The Good Life on the Cheap, a sort of motivational biography about how Johnny visited Thailand on holiday and then decided to move there training in Muay Thai and becoming a scuba instructor.

The book is well laid out and offers lots of advice on how to live in Thailand, the realities of both fight camps and scuba diving and lots of tips and tricks to help you make the most of your time whilst you are out here as well as places to visit and things to bring with you.

There aren’t many concise resources out there for someone considering moving to Thailand so this is a must read for anyone toying with the idea. I know I read it cover to cover 5 times before I booked my tickets, and whilst it didn’t inspire me to go to Thailand (that seed was already firmly planted) it did motivate me to make the decision and see what happens.

An informative, enjoyable read that I’d recommend to anyone considering going to Thailand, let alone moving there.

The Trip Is Booked!

Thailand Today I took action and booked flights out to Phuket, Thailand and made arrangements for my first week out there.

Most People In Life Don’t Show Up

Technically I started making arrangements last year, when I handed in my notice at work, only to ask for it back and change role.

I also booked a trip to Turkey over Christmas which I didn’t go on as I wasn’t feeling it.

One of the issues I’ve always had with the world is that anyone can pay for things. Turning up, putting your neck on the line and actually doing something takes courage.

So far all I’ve done is the paying for things, that’s the easy part. I was hoping to hand my notice in on the 1st May but now I think it might be 1st June.. this is the hard part.

The Flight

I booked a return flight with British Airways from London Heathrow to Phuket, Thailand on 1st September. It was cheaper to buy a return ticket than a single. I rang up British Airways to confirm this and they made the excuse that it’s because it would mean the seat wasn’t sold. I think the real reason is so they can overbook the flight knowing that some people won’t turn up.

The return part of the ticket is 30th November, meaning I will have been in Thailand for 90 days, but hopefully I won’t need to use that.

The Accommodation

I intend to spend my first 3 months in Thailand training at Tiger Muay Thai. Regarded as a bit of a McDojo, Tiger Muay Thai offers some fantastic packages and will arrange everything for you. Which for me, now, is perfect, so I will reserve judgement.

Rather than book an entire 3 month package with Tiger Muay Thai I’ve only booked the first week. I am hoping when I am there things might be a little cheaper and I can save some money if I use some common sense.

Signature Phuket Resort

For the first week I will be staying at the Signature Phuket resort. A beautiful boutique resort and restaurant 150m from Tiger Muay Thai.

The Training

Tiger Muay Thai offer group and private martial arts, yoga and strength and conditioning classes. For the first week I’ve booked an all-inclusive package that lets me do everything. Whilst I would love to do yoga, weight lifting and Muay Thai daily, from experience I will not be able to train for 9 hours a day. Again after the 1st week I should have a better handle on what I can cope with to make a more informed choice for the rest of my time there.

Tiger Muay Thai

Pursuing An Alternative Career

Part of the trip is to develop new skills unrelated to IT so I have more career options. Ive enrolled in 2 online courses, one on travel journalism and another on travel photography. Writing has never been my strong point but I do love photography and this is the perfect opportunity to develop those skills.

My more hopeful goal is to train and certify as a PADI dive master and potentially make money taking people out to scuba dive. I’ve never done it before but it’s always been on my list as I love water and there are so many great things to see. It also opens up other avenues such as underwater welding.

The Albert Burger – Best Burger in Brighton?

Cheese and Bacon Burger at The Albert It’s rare that I’m genuinely in shock and awe of something, but that’s how I felt last night in The Albert, down under Brighton train station!

The menu came with a crazy amount of options, so for the burger I added bacon and cheese and for the chips, thick cut rather than skinny and chilli and cheese. Not chilli cheese mind, as that was a separate option, as were the beef brisket, hash browns, onion rings, guacamole etc etc etc TOO MANY CHOICES! The entire thing came to £10 on the nose.

I’m actually feeling bad writing this up, as the photos don’t do the burger justice. They don’t show the perfectly cooked centre of the meat, the delicious crisp of the chips and the amazing tenderness of the brisket (at least I think it was brisket, the menu just said ‘chilli’…)! I should probably do one of those Internet courses on food blogging and photo taking or something 🙁

Cheese and Bacon Burger at The Albert

The burger came with real bacon, the kind of bacon you’d be proud of, and the chilli on the chips? Not the minced beef and stewed kidney bean chilli I was expecting, rather a phenomenal slow cooked beef brisket flavoured with a deliciously spicey concoction.

The entire thing was awesome. Could this be the best burger in Brighton? It’s definitely the best one, hands down, that I’ve had in 2014.

Speeding Up MDADM RAID Rebuilds

Speeding Up MDADM RAID Rebuilds I’m slowly migrating a bunch of awesome things from a really old server, it’s still running Ubuntu 10.04.. to a really nice and shiny one. Which has 2 new 3TB HDDs in RAID 1, which are syncing..


cat /proc/mdstat
md3 : active raid1 sda4[0] sdb4[1]
1847478528 blocks super 1.2 [2/2] [UU]
[>....................] resync = 0.1% (2061952/1847478528) finish=28857.9min speed=1065K/sec

That’s like 40 days of syncing.. surely we can do better than that? Can’t we speed up this MDADM RAID 1 rebuild?

Speeding Up MDADM RAID Rebuilds

Sure we can, we’re awesome, I’m awesome, you’re awesome, can I get a hell yeah? HELL YEAH!

Likes lots of things that are tuneable, we have to do NASTY things to /proc. This bit sets the minimum speed we want mdadm to go at.


cat /proc/sys/dev/raid/speed_limit_min
1000

We’re greedy though and in the words of Tim Tool Time Taylor, MORE POWER. As root..


echo 50000 > /proc/sys/dev/raid/speed_limit_min

We’ve just made mdadm run FIFTY TIMES faster. FOR FREE. We didn’t even swap out the SATA disks for SAS SSDs, we just changed a number ..


md3 : active raid1 sda4[0] sdb4[1]
1847478528 blocks super 1.2 [2/2] [UU]
[=====>...............] resync = 26.0% (480866560/1847478528) finish=141.9min speed=160501K/sec

Now 10 minutes later we’re already over 1/4 the way through, 2 hours left baby. Hell yeah.

authorized_keys vs authorized_keys2

authorized_keys vs authorized_keys2 Earlier today I was setting up a brand new server for a migration and just as I was typing scp .ssh/authorized_keys2 my brain went and asked a question..

What is the difference between authorized_keys and authorized_keys2?

I’ve been working with Linux for well over a decade and some of my practices stem from things I learned in the ’90s that still work, putting all my public keys in ~/.ssh/authorized_keys2 is one of those things.

authorized_keys vs authorized_keys2

In OpenSSH releases earlier than 3, the sshd man page said:

The $HOME/.ssh/authorized_keys file lists the RSA keys that are permitted for RSA authentication in SSH protocols 1.3 and 1.5 Similarly, the $HOME/.ssh/authorized_keys2 file lists the DSA and RSA keys that are permitted for public key authentication (PubkeyAuthentication) in SSH protocol 2.0.

Which is pretty self explanatory, so that’s what the key difference in the files were originally, authorized_keys for RSA in SSH 1.3 and 1.5 and authorized_keys2 for 2.0

What is the difference between authorized_keys and authorized_keys2?

However, that’s from releases of OpenSSH earlier than 3.0, which was released in 2001, a long time ago.. looking back at the OpenSSH 3.0 release announcement authorized_keys2 is now actually deprecated. We should all just be using authorized_keys instead from now (er, 2001..) onwards!

do-release-upgrade Checking for a new Ubuntu release No new release found

My HTPC is almost appliance like, in the way I never upgrade it, i.e. this morning it was still running Ubuntu 11.04 Natty Narwhal… It’s also not very appliance like in that it’s also full of random development stuff that probably shouldn’t be on it as well as several different types of databases, my backup infrastructure and tons of other things you really don’t care for.

But not today. Today I was bored and decided the best use of my time was to replace MythTV with XBMC. Not only that, I figured I should probably upgrade from

      Ubuntu 11.04 (Natty Narwhal)
      Ubuntu 11.10 (Oneiric Ocelot)
      Ubuntu 12.04 LTS (Precise Pangolin)
      Ubuntu 12.10 (Quantal Quetzal)
      Ubuntu 13.04 (Raring Ringtail)
      Ubuntu 13.10 (Saucy Salamander)

That’s a lot of upgrading. It would have probably been better for me to just install 13.10 ..

But when I got to Pangolin, the 12.04 LTS EVERYTHING WENT WRONG!


rus@relax:~$ sudo do-release-upgrade -p
Checking for a new Ubuntu release
No new release found

OMG I hear you cry, much like I did. WHAT IS THIS??? I tried everything, apt-get update, turning it on and off again, throwing things at the TV, I even went outside and bought a coffee. None of the above worked. This was because I was stupid.

do-release-upgrade Checking for a new Ubuntu release No new release found

The reason for the error was because I’d arrive at an LTS release. And the do-release-upgrade configuration had changed to now *stick* to LTS releases and not upgrade any more. So as the new 14.04 LTS isn’t out yet (as we’re not in the future, dummy) it couldn’t find anything to upgrade to.

The fix is to tell the computer to just upgrade to the next release and not be so stubborn by editing /etc/update-manager/release-upgrades


# Default behavior for the release upgrader.

[DEFAULT]
# Default prompting behavior, valid options:
#
# never - Never check for a new release.
# normal - Check to see if a new release is available. If more than one new
# release is found, the release upgrader will attempt to upgrade to
# the release that immediately succeeds the currently-running
# release.
# lts - Check to see if a new LTS release is available. The upgrader
# will attempt to upgrade to the first LTS release available after
# the currently-running one. Note that this option should not be
# used if the currently-running release is not itself an LTS
# release, since in that case the upgrader won't be able to
# determine if a newer release is available.
Prompt=lts

See how it says Prompt=lts? THATS JUST RUBBISH! Change it from lts to normal then rerun do-release-upgrade. Theres a good boy!