Skip to main content

Posts

Showing posts from 2012

/var/log/mail.err: dovecot: Fatal: Time just moved backwards

I had this error appear almost on every reboot in my /var/log/mail.err file. Rather frustrating considering reboots are so infrequent that I would forget that dovecot failed to start and troubleshoot anew IMAP access failure. Well last time this happened I decided to fix the root cause and below is the solution. As per dovecot wiki this error can appear on some VPS hosts. Resolving this is relatively easy but it's not obvious, the solution consists of installing NTP - Network Time Protocol daemon which keep your time correct and synchronized and then delaying the execution of dovecot service until ntpd service is loaded. Ubunty/Debian Sollution Install the ntp package: # aptitude update Get:1 http://security.debian.org squeeze/updates Release.gpg [836 B] ... # aptitude install ntp By default dovecot startup script does not require the ntp servicet before it starts, so we must modify it that it waits for the ntp before it starts itself. Edit the /etc/init.d/dovecot ...

Verisign/Symantec "Failed to configure CA certificate chain!"

I've deployed a few SSL enabled sites in the past but have never encountered as much trouble as I did with Verisign/Symantec Secure Site SSL certificate. And the thing is it can all be blamed on a poorly formatted Download Symantec Secure Site Primary and Secondary Intermediate CA bundle page. Yes even though it does say the word 'Download' you are actually asked to copy and paste; brilliant considering that if you do so your resulting file is malformed due to additional white space on each line I did not notice the white space until well into my second hour of frustration and pain. Apache just chokes with "Failed to configure CA certificate chain!" or "Unable to configure verify locations for client authentication" errors. For the substantial premium clients pay to use SSL Verisign certificates I must say I really expected better. To resolve the issue either manually remove the white spaces or create the chain file by copying and pasting from th...

Ruby on Rails Apache Deployment

Setting up apache + passanger to serve a RoR app on Ubuntu/Debian ( VPS Linode ) I'm a Django/Python developer that was tasked with transitioning a Heroku hosted app to a Linode VPS running stock Ubuntu. This turned to be a two day adventure with a lot of dead ends and a fair share of frustration. I had the app running relatively quickly using the `rails server` built in command but could not get apache + mod_passanger to serve it. I must say that in my opinion RoR cummunity is doing it's self a disservice by not having solid easy to follow deployment instructions - doing a search on ruby on rails deployment returns outdated noise and official page that is of no help. Below is a quick summary of what I have learned and how I deployed a Ruby on Rails site with Apache on a Ubuntu system running on a Linode VPS. If this blog does help you out I ask that you do +1 or share it; so now let's begin. Do not use the Ubuntu/Debian system packages I mean do NOT, this is t...

A tip for relatively sized Html input elements using `em` units

And why I use Yahoo! (YUI3) Reset CSS Now For better or worse when doing front end development I prefer to use percentages and em as the unit of size when styling. This approach could be a bit tricky but with proper experience and the use of css screen size conditionals does allow for one rendering base for multiple screen sizes. As base I set px font-size only on the <body> html element and then afterwards use em to style all other elements; of course using pixel based units where it makes sense. This allows for example the quick changing of the font-size just on the body tag and having all the header resize accordingly. One annoyance that I experienced was that input radio and check buttons didn't honour the font-size of the body and I always just worked around the issue by explicitly styling the input radio or checkbox buttons height to a em value that made it look good. However, today by pure accident I discovered that adding font-size: inherit to the...

Installing Debian unstable safely with APT pinning

Using Aptitude to list and install backported or unstable packages Early into my linux Debian web server administration, out of necessity and after a lot of trail and error and reading I worked out the right preferences that keeps my systems very stable and yet with the ability to install the occasional backported or unstable package. My package management utility of choice is `aptitude` but these settings will also effectively work for `apt-get` and before I begin do +1 this if you find it useful. The above shows the available version of Django with their respective APT pinning numbers: 990 being the stable version and selected by default when installing, 400 being the backported version, 50 being an unstable version, and 100 pinning for our already installed version. During normal installation the stable default is always selected, however now I also have an option to easily see other available versions by viewing the information provided at bottom of the package detail...

How to child proof a fireplace

DIY - Do it yourself fireplace child guard Our wonderful 8.5 month old Sofia has become a crawling race car with an untamed thirst for exploration. And so with the cold nights approaching we needed to child proof the fireplace. This however proved to be more difficult than would reasonably expect, I've checked the local Toys "R" Us, Walmart, and even a Canadian Tire with no success for a ready to use product. Internet search was more fruitful and returned a few online stores one could order from, however in all honestly they didn't look too sturdy to me. So I build my own relatively quickly and inexpensively. Materials needed is a privacy plastic lattice - the smallest hole pattern - a few screws and anchors; tools needed are a drill, and a handsaw if you don't have the lattice cut at the store - that’s it. The construction consits of screwing the lattice into the wall and the final product is easiest explained through following pictures. ...

Hide People from "Have You in Circles"

How to manage/remove people that added you from your "have you in circles". One could call it spam, and so I am - people/profiles following you that clearly have no reason to do so, even if you don't follow them back still show up in your "have you in circles" section. There is a way to completely hide that section, block the person or ignore them. The first two are drastic, the ignore option is the best and recently. Here is how to Ignore somone on Google+ : Click on your "Notifications" box Find and click "Added you on Google+" In the list that follows find the person and click 'Ignore' Log Out and view your profile to verify it worked. To see full list click More circle notifications » See the not very helpful Google Help Page for more information. Also do +1 this post as that helps me immensely.

Do it yourself microFit Solar Panels

One home owners experience with microFit ***a posting and project in progress*** microFit is an Ontario program under which the government will pay you a premium for any electricity you generate back to the grid through renewable sources. It started in 2009 and offered an amazing 80.2¢/kWh for electricity generated by rooftop photovoltaic panels. The demand was so high that to keep the program balanced in 2012 the rate was lowered to 54.9¢/kWh - 31.5% lower and I would bet the rate will continue to declined as the program is now under yearly review. Assuming an average 13¢/kWh electricity cost in Ontario the rate is still appealing and makes the investment worthwhile financially and of course environmentally. It must be said that if you yourself are considering microFit then do not wait - apply yourself or have it done by a company on your behalf - once you get a approved your rate is locked in for 20 years and you have 6 months to complete the project. Furthermore, because th...

Maximum Logrotate Compression with bzip2

A Tip for squeezing a little more free space from a VPS Our web design VPS with Linode has been rock a solid solution over the last 4 years. It currently hosts multiple client sites, freeswitch, mail agent, wireless security camera feeds, and in the past even a Minecraft server and FreeNet; all these services eat up precious hard drive space and with only 20GB the wall can be hit early. However this measly 20GB does comes with a kick ass IO rate that beats even some dedicated servers Stop blabering and get to it Linux logs everything, these logs grow overtime, systems run 'logrotate' to archive and delete old logs - the settings are very liberal and tweaking them could save gigabytes of space, 1.1GB in my instance. Modify your /etc/logrotate.conf as needed but the important bit is compressing by default and using bzip2 instead of gzip to do so. # see "man logrotate" for details # rotate log files weekly weekly # keep x weeks worth of backlogs - defaul...

Google Analytics or Adwords Reverse Lookup

Locating the administrator of a Google Analytics account For whatever reasons a client might have not been granted access to their Google Analytics information by their former developer. This normally is not an issue as developer are mostly a friendly bunch and when asked will grant proper access, but what if the former developer's identity is unknown or lost? - yes rather unlikely scenario but this has happened to us and it can happend to you. Google Analytics tracking ID reverse lookup by ewhois On the surface ewhois is your typical look up service with the one and important exception is that it allows tracking down the administrator of analytics tracking code. This can be accomplished due to the fact that site tracking codes contain a common id representing the parent account. Danols Web Engineering Google Analytics tracking codes are UA-12420089-X where X is the unique id of a tracked site. Based on this fact ewhois is able to return other related sites from i...

Setuptools' ``include_package_data`` option does not work

MANIFEST.in not honoured during install phase The python package setup procedure appears to be a mess, you have setuptools, distutils, and distribute (distutils2?). All I set out to do was to fix the installation setup.py in django-simplemenu package which was omitting the non-python module plain locale directory but instead got myself involved a 3 hour roller coaster; I am sharing my findings in hopes of helping you, so if you are reading this do +1 this. Including sub directories and non python files as part of package There are two ways: MANIFEST.in file and package_data setup.py option. The latter is Pythonic but doesn’t do recursive includes - so you would have to list every sub directory - and can not include files in the root top most folder; sure once could write a python function to do this but why the complexity? MANIFEST.in with its file/directory pattern matching and with the setup.py's ``include_package_data`` option fits the bill: ``include_package_data...

Verify Google+ Local Pages

But old style Google Places pages are still out of luck Early this month Google introduced functionality to verify the new Google+ Local pages - not the old style Google Places which will be eventually migrated - but the new Google+ pages that must be created under the Local Business or Place category. The process is simple consists of having a Post Card with a unique pin mailed to your businesse's address. Once that is accomplished your brand page will look something like Sleepless Goat Café Google+ Local Page and more importantingly it will be unified accross Google's Search, Google Maps, and Google+. Business utilizing the former Google Places will be eventually transitioned to Google+ Local . For more information please see the oficial FAQ and discussion threads here and here Google Places Administration Page For those of you that asked below is a screen shot of the old style administration page for Google Places that will eventually be phased out...

Linphone and VoiceMail Issues

Echo Limiter Prevents FreeSwitch Voicemail Functionality If you experiencing issues while trying to leave a Voicemail due to 'Your recording was below acceptable levels' or similar errors try turning off the recommended 'Echo Limiter' in Linphone 's settings. I experienced this problem on the latest version of Linphone for Android when calling my FreeSwitch setup. Testing from a land line and with other soft phones worked as expected, changing 'record-silence-threshold' and 'record-silence-hits' FreeSwitch's mod_voicemail settings had not effect, and hence through the process of elimination the culprit was determined to be the 'Echo Limiter' setting. Saving you hours and hair; so do +1 this.

SPA3012 Dial Tone Length Duration

Change or Increase the Length of Dial Tone I have the Cisco SPA3102 and when attempting to setup a conference I found the default 10 second dial tone duration was not long enough - the fast busy would kick in before I finished searching through the phone directory. To change the duration follow the below instructions: Login into the VOIP box Select 'Advanced' mode Select 'Voice' tab Select 'Regional' sub tab Under 'Call Progress Tones' modify the 'Dial Tone' default entry's 10 second delay to whatever duration you wish.

OVH Free Dedicated Server Benchmarking

Beta server a power beast with shortcomings OVH is a hosting company out of Europe making it's entry into the American market. As part of their (brilliant) buzz marketing strategy they are giving away 10,000 free servers. They do limit the number they give away per day so do hurry and visit http://www.ovh.com/ca/en/ to get yours; a twitter account is required Once I entered a code Twitted to me the server was up an running within half hour; at first glance it is a power horse: CPU: Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz Memory: 16 GB DDR3 Hard disk 2x 1 TB - SATA2 However my basic benchmarking for IO resulted in 1.9 MB/s copy speed, now that is very sub part performance compared 60+MB/s I am getting out of my Linode VPS and is border line unusable. Network speed test with wget downloading a Debian ISO wasn't too impressive either, it averaged 1.75M/s (it did have nice high speed spikes), whereas my Linode VPS averaged 4.52M/s for the same file at the same...

Linode is Truly a Great Hosting Company

Migrated to new cluster no questions asked; got performance boost! I have been using Linode as a hosting provider since July, 2010 after I outgrew WebFaction's shared plans. Overall I have been extremely happy with the service, reliability and support, so happy in fact I have prepaid for over a year. Lately however I have been reaching my memory limit and hitting the swap space; running for fun a Minecraft server will do that. It quickly became apparent that any disk IO would bring the sites served from that VPS to a crawl. Doing some IO benchmarking tests revealed a worrisome statistic: root@)root@shared-hosting-1~>$ dd if=/dev/zero of=test bs=64k count=3k oflag=dsync && rm test 3072+0 records in 3072+0 records out 201326592 bytes (201 MB) copied, 26.3025 s, 7.7 MB/s rm: remove regular file `test'? y That is correct, lously 7.7MB/s copy test. Having access to Linode and burst.net servers I run the same VPS benchmark on them with following results: L...

Disable Ctrl+Space Opera Keyboard Shortcut

How to disable the the "Go Home" keyboard shortcut in Opera This is the most anoying Opera browser shortcut as whenever typing I have more then once accidently lost my work due to this "Go Home" shortcut. The previous button will only work if the form is initialy empty but if you are updating a post, or a comment it restores that and so you loose your work, hence most counter productive keyboard shortcut. Disable this productivy killer by doing the following steps: Click 'Opera button' on goto to 'Settings' > 'Preferences' Go the 'Advanced' tab Select 'Shortcuts' at the bottom of list on the left Select 'Edit' next to the 'Keyboard setup' list In the search window type 'space ctrl' Press 'Delete' Press 'Ok' Add me to your G+ "Cool" Circle Disable "Back" - backspace keyboard shortcut Don't even get me started on this one - symptom Opera ...

Google rel="author" and rel="publisher" Conflicts

How to fix rel="author" tag image that is no longer appearing. Today I noticed that Google stopped showing my head shot next to the Kingston Web Design search result; having this is crucial as it does increase click through rate for obvious reasons we do not need to go into. My authorship has been working and headshot was appearing in search results since mid April of this year. After lengthy debugging with Google’s Rich Snippets Testing Tool I was able to determine that rel="publisher" and rel="me" now seem to conflict with each other when on the same page; a verified rel="publisher" link makes the rel="author" link fail verification. Surprisingly and unexpectedly having a plain link to your Google+ brand page prevents your head shot from appearing - the author profile is being reported as verified yet the profile image is no longer displayed. One must completely remove any links to a Google+ Brand Page for the he...

SERP Position Forecasting Indicator

Potential trending using the "Position in search results" statistics Recently in the last 2 days our website Danols Web Engineering has achieved 3rd position for "kingston web design" keyword phrase so I have been waiting for my SERP (I finally learned what that stands for!) to stabilize. Reviewing the Google Webmaster tool reports I noticed that the sister phrase "web design kingston" in Google Webmaster tools had a few impressions from the 6-10 spot; the site ranks 13th. Intrigued by this I kept reducing the time range untill I got this: Now Google sorts the above statistic by impression column hence even though they are not showing the exact number (nothing stopping them from doing so) I can conclude that the 6-10 has the most impression. Thinking out loud here this means two things to me, well maybe three: Google is testing a new algorithm and a small percent of people are seeing the site ranking higher. Google is testing the sites...

Bussiness Cards and Coffee Mugs

Self Branding your Bussiness Successfuly for $58.42 So for the past hour or so super excitedly I have created Danols Web Engineering branded mugs, business cards, pens, and notepads. Anyone with a bit of time and attention to detail can make their way using the edit controls and create professional results as seen below. With the promotion discount that was running at the time I was ordering my total cost for 250 business cards, 2 notepads, one pen and mug was a low $51.70 a saving of $35.29! Have your own fun at brand marketing your business and visit Vistaprint , this link contains my refferal number which gives me a small kickback if you do purchase items.

Minecraft Server on Debian

Running Minecraft Server on a Linode Debian Instance If you are having issues following the official wiki then you are not alone - I found it much too generic and could not get the 'init.d' startup script to work. Following is a step by step guide to quickly set up your on game server running on Debian/Ubuntu distribution. Install Java We are going to install OpenJDK which for all intents and purposes is equivalent to Sun java but without licensing issues. Execute below commands under root or using sudo. # aptitude update # aptitude install openjdk-6-jre-headless Download and Install Minecraft Server We are going to download and install into '/usr/local/minecraft' as per the Debian FilesystemHierarchyStandard. # mkdir /usr/local/minecraft # cd /usr/local/minecraft/ # wget http://dl.bukkit.org/latest-rb/craftbukkit.jar We are installing the bukkit minecraft version rather then the vanilla one, it is fully comptabible with the vanilla server but lets your run...

SIP Voip Multiline Client

Receive call from multiple SIP accounts using one client. Finally found a decent free, no hidden costs, and open source VOIP multi line line client Linphone . It works rather well, doesn't look like dogs breakfast, hasn't crashed yet, and best of all it's also a multi platform client - it will run on your Blackberry, Android, iPhone, Windows and Linux. So in a nut shell if you have multiple sip accounts or run your own PBX system like FreeSWITCH it does the job, and it does it well. Yes you can thank me, but real thanks should go to Yasuro's Blog , I just got legendary googlefu.

Directory Size Overview in Linux

Visual console based directory size overview If you google how to get directory size list in linux you most likley find a page that tells you to use the following command: du -sh * | sort -nr Or to limit only to the top 10: du -sh * | sort -nr | head -10 However this is cumbersome and not very visual. There are two awesome solutions to this dillema: NCurses Disk Usage and Midnight Commander ; the former just let's you explore the sizes of yoru folder whereas the latter is a complete and very popular system explorer which comes with an options to calculate directory sizes. To calculate sizes in Midnight Commander press 'Shift +' to select all and choose 'Command' > 'Show directory sizes' These programs are available as Debian packages and I suggest you install both.

Opera SOCKS Proxy Setup Issues

SOCKS error: Connection closed by remote server When setting up SOCKS only proxy in Opera web browser make sure to specify the IP address instead of your fully qualified domain name (FQDN). Using a host name will not work and Opera simply fails to connect to the proxy server. Sample working setup screen shot with a Dante proxy server , note that HTTP, HTTPS, FTP, SSH options are left blank. Bug DSK-364301 has been filled with Opera, if it has been a while since this post and the issue still not fixed feel free to add your word of encouragement by emailing DSK-364301@bugs.opera.com :)