Failure to start new MySQL server

We use replication for our MySQL server and perform a snapshot rsync to re-initialize the slave servers. One difference today was that I had to create a whole new server from scratch and perform the same re-initialization. Everything worked fine until I tried to start the server:

Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist

The server was new and had not been initialized yet. I had copied all the data files including the my.cnf files and had expected the MySQLd to work! Well, doesn’t always happen that way eh?

Anyways, all that I had to do was to tell MySQLd where the data is located:

mysql_install_db –user=mysql –ldata=/datadir in my.cnf

MySQL came up and is replicating again!

Nagios CHECK_HTTP Error HTTP WARNING: HTTP/1.1 403 Forbidden

So, I was deploying a new server and added the default CHECK_HTTP Nagios plug-in as follows:

define service{
use <Preset Service Type>
host_name <Server Name>
service_description HTTP
check_command check_http
}

However, the check would come back as an 403 Forbidden error. I know we have some restrictions set on our http.conf to allow only internal IP addresses to the Apache server, but the Nagios server is in the internal network. Poked around the settings and configurations for awhile and could not see any issues as I was able to browse the default Apache page.

Looked a bit more and found that the CHECK_HTTP is actually looking for an index page in the root html location. So I ended up creating a dummy page for Nagios and the checks came back fine! I’m sure you could make something nicer but this is all I did in the /var/www/html directory:

echo "This is a dummy page for <Server Name>." >> index.html

Works like a charm!

Restoring a gziped MySQL DB backup file

Short post… just for reference:

gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname]

Microsoft Bluetooth Mobile Keyboard 6000

So, tax season is around the corner and I just got my RRSP returns and I was able to get some money to get myself some new toys. I wanted to get a smaller keyboard that had an ergonomic layout along with a number pad that would sit on my left hand side (to allow space for the mouse). So, I decided to get a Microsoft Bluetooth Mobile Keyboard 6000! The keyboard set looked great, the size was a bit small but all-in-all looked decent and was for once decently packaged!

Then came the hard part, actually trying to get it to work. There was an issue with pairing the devices. I was able to pair them separately and they responded well. However, every time I try to use both devices at the same time, the previous device would stop responding. For example, I was using the keyboard and I turn on the number pad, the keyboard would no longer work. The keyboard would only work after I turned the number pad off! The same was try for the keyboard if I had the number pad on first!

Took me over a few hours and could not find anything. A lot of people had posted online that the way to resolve this was to pair the devices separately. Meaning to pair one, turn it off and then pair the second one. I thought, well, sort of makes sense, why not? I gave it a shot, but knowing how computers work, it is never that easy. The problem continued to stay!

I thought back and forth and couldn’t find a way until I thought, maybe this cheap Bluetooth dongle I bought at the local computer store was the issue. I went and took another dongle I had in the house and plugged it in. Right away, Windows picked it up as a Broadcom Bluetooth device and I thought to myself, well at least it doesn’t say generic Bluetooth device now! Next, I re-paired the devices and guess what? It worked right away!

So in the end, it was the dongle that was causing the issue. Long story short, if you are unable to use more than one device at the same time, take a look at the dongle that you have and try to get it replaced as a solution!

Have fun!

CDONTS on Windows Server 2008 R2

As old as it may be, we still use a sendmail API from way back to NT4! Having said that, there was a slight blip when we migrated to a new Server 2008 R2 server, the dll file was missing! I had to copy the file from the old server and move it to the new server.

  1. Copy CDONTS.dll from another server to C:\Windows\SysWOW64 and C:\Windows\System32
  2. Run regsvr32 c:\windows\SysWOW64\cdonts.dll
  3. Run regsvr32 c:\windows\System32\cdonts.dll
  4. Grant the appropriate permissions on C:\inetpub\mailroot\pickup (I granted USERS group Modify permissions). You could get permission denied if the folder security isn’t adjusted.

You don’t need to restart the server at all, just hit your site and again it will work!

Google Chrome’s automatic site searching

Here’s a fun tip! I just found out today by chance that Google’s Chrome browser will do automatic site searching! If the site you are viewing has a search functionality, all you have to do is type the domain.com follow it by a space and the item you want to search! It will automatically direct you to the search function with your search in the query string! Neat!

For example:

shopbot.ca core i5

pointed me directly to:

http://www.shopbot.ca/m/?m=core+i5

Neat little trick… once again, hope this helps and have fun!

Google Apps and Microsoft Outlook 2010

With the need to save money, I finally decided to take the plunge and try out Google Apps after a strong recommendation from a friend. Getting everything converted was simple enough, I just had to sign up for a Google Apps account, add my domain and away I go.

For those interested, when you search for Google Apps, Google will always bring you by default to their Google Apps for Business edition first. It is a bit of a maze to find the standard Google Apps, but it is there.

The main difference between the two is that you get 7GB of space instead of 25GB. Other minor stuff include Google Video, forced SSL and 99.9% uptime SLA. For that, you have to pay $50 per user per year. This is as opposed to getting 50 free users for your domain, not including any aliases you would like to use (known as nicknames in Google Apps). Another stated difference is that you are unable to sync with Microsoft Outlook and Blackberry Phones etc. This, however, I have been able to prove to be incorrect.

I have been able to sync up my Outlook and Blackberry through IMAP. True, it is not exactly like Exchange and you lose certain functionality – such as notes and journal. However, I would like to argue that overall, for someone or a company with less than 50 users, Google Apps is more than enough.

One thing to note though, the setup instructions that are available on Google’s site is incorrect. The following IMAP settings worked for me:

Username: user@yourdomain.com
Password: your password
IMAP: imap.googlemail.com
IMAP Port: 993
Encryption: SSL
SMTP: smtp.googlemail.com
SMTP Port: 587
Encryption: TLS

One other thing that I did do was to Unlock Captcha. Not sure if it is related, but I did this before I found the above settings so I can not comment if it was either due to the settings or both changes were required.

I will give this a go for a week or two before I fully terminate my old Exchange account. As always… hope this helps and remember to have fun!

Jivesoftware – SBS 4.5 and MySQL

It has been awhile, but I’m still alive. Anyway, installed SBS 4.5 from Jive Software today, however the JDBC for MySQL wasn’t included in the installer.

Downloaded the files from the following link:
http://dev.mysql.com/downloads/connector/j/

Extracted the mysql-connector-java-5.1.12-bin.jar file (versions may be different as there are newer ones available) and copied it to the following folder:
/usr/local/jive/tomcat/lib/

Restarted the Jive application and the connector worked!
service jive-application restart

Hope that helps, and remember to have fun!

Microsoft Dynamics CRM 4.0 and Outlook 2010

Although both products are from Microsoft, they don’t seem to play nice together. Most likely due to the fact Office 2010 came out recently and has changed the way it interacts with the system. Either way, when installing CRM the following error showed up:

(Error) Setup failed to determine whether a supported version of Microsoft Outlook is installed

The only solution is the ignore this manually. To do so, create the following into the registry (the entry does not yet exist):

[HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \MSCRMClient]
Key Type: DWORD
Key: IgnoreChecks
Value: 1

The installer will still state the error but it will now allow you to continue with the install! Good luck!

Windows 2008 and IIS 7.5

We got a new server at work and got some time to play around with Windows 208 R2. One thing I liked most was the new Server Manager UI. This basically gives you a full overview of what the server is set to do and you can add / remove role (services) here.

With that in mind, I started configuring the FTP service. The first thing that occurred to me is that I wanted to isolate users to their own directories. Selecting the “FTP User Isolation”, there were three options for isolation.

  1. User name directory
  2. User name physical directory

Both options didn’t seem to work even though I had created folders with the user names on the root FTP directory. The reason was that I was missing a root folder “LocalUser” before each of the user directories. So our new directory structure is as follows:

D:\FTP\LocalUser\username

After that, we could log users into the FTP site. However, the next issue popped up. We could not get the users to see any virtual directories (directories which point to certain directories that are outside of the user’s home directory).

In order to accomplish this, we had to right-click on the user’s directory within the IIS manager and select “Add Virtual Directory”. Additionally, we had to select “User name directory (disable global virtual directories) and ensure that virtual directories is enabled in the site’s “FTP Directory Browsing” options.

After all that, it is now working for us! Hope it works for you too!