I'm an experienced web developer, software engineer, and leader. Welcome to my blog. If you need to reach out you can continue the conversation with a tweet to @geedew. I hope you find what you are looking for here. You can also find me on Github and StackOverflow.

Server Accessible Locally, Not from the Internet

You can learn something everyday it seems.

Yesterday, I had some issues that I hadn’t planned on ever occurring with my local development server. Basically, the issue was discovered when my server suddenly did not have ANY access from the internet. Now, it DID have access to the internet, oddly enough, and I could reach it via hostname through my local network. The first issue I figured it would have been was a router problem. Namely port forwarding was getting messed up. My server is set statically on my network, so the port forwarding should be fine, and Remote Desktop to my XP machine works fine from the outside world. So the router is NOT the issue. Next step was DNS. Maybe my dns is messed up? I checked out my /etc/resolv.conf

> vi /etc/resolv.conf

nameserver 192.168.1.149
nameserver ###.###.###.###
I blocked out the ### because this is uneeded information about my ISP. Normally you want your name servers to be a nameserver, or your access to a name server. The first shows my router, from the inner network, which is what can be here. This explains why my hostname works via my network. But it is not the solution to my issue. So I dugg a bit deeper. What was that I said earlier? Ah yes, my server has a STATIC ip. Which means I should have a static route.
> ip route
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.129
default via 192.168.1.1 dev eth0 metric 100
OK! There is my issue! My static route is pointing by default to 192.168.1.1 which is NOT my router (192.168.1.149). So a quick update to that and that should fix it!
> vi /etc/network/interfaces

This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

auto eth0
iface eth0 inet static
address 192.168.1.129
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.149
I edited the line in bold. This was 192.168.1.1 and now it is 192.168.1.149
> /etc/init.d/networking restart
Now the networking is reset!
> ip route
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.129
default via 192.168.1.149 dev eth0 metric 100
default via 192.168.1.1 dev eth0 metric 100
And Wa-Laa! All done. Now I can access my server via the internet from anywhere as it should be always.

Lesson learned I guess. Hope this helps some others stump issues they are having with static networking on linux.

How To Fix: InnoDB has been disabled for this MySQL server.

I was in the middle of installing program that I have been working on and I encountered a very peculiar error, but I was able to eventually get the answer. Not many people have been able to come to the conclusions that I have come to, so this, I am sure, will help a few out there.

I went to add some InnoDB tables and was returned with the error :

“InnoDB has been disabled for this MySQL server.”

I was running Ubuntu Gutsy with my MySQL installed via apt-get install mysql-server-5.0.

Now, most places on the internet keep telling me that I have to uncomment out the line ‘skip-innodb’ from my /etc/mysql/my.cnf file. This file is also known as my.ini file on some other *nix distributions. I am running mysql 5.0 SO this is ALREADY uncommented.

After 3 apt-get -f –purge remove mysql-server-5.0 and and upgrade to Ubuntu Hardy, I recovered the answer. You see, InnoDB is very touchy. If it isn’t told what is going on , it just doesn’t start. It will usually throw NO error upon this issue. I’m not an expert as to why it does this, but that seems to be the case. I found that there are files in the /var/lib/mysql folder that were getting pointed to in some tutorials on MySQL.com. These files were the ibdata1 and the ib_logfile0 files. The program is outputting it’s logs to these files. Now, if InnoDB is supposed to be working, but it’s not, and these files are being pointed at by MyISAM… my understanding is there could be an issue with how the files were created. I did this as root (use sudo in front of each command otherwise)..

>cd /var/lib/mysql
>cp ibdata1 ibdata1.bak
>cp ib_logfile0 ib_logfile.bak
I was just backing them up in case of a misshap. Then I had some fun…
>rm ibdata1 ib_logfile0
After that I ran..
>/etc/init.d/mysql restart
And now my InnoDB options are running. The files have been recreated and it solved and fixed the day :)

First Looks: Yahoo! Search Monkey

So the other day I was invited to try out Yahoo! Search Monkey. If you haven’t heard yet, the Yahoo! Developers Team is looking to set Yahoo! at the cutting edge of the current level of Internet Development. They have released a preview (think private beta) testing of SearchMonkey which is the first step to making Yahoo! entirely Web 3.0 (buzzword: sharing social information across websites, using the internet as a development platform itself).

After logging in you are given three categories to get started with. Presentation Applications, Custom Data Services, and Data Feeds. The first is pretty much defining what you want th individual to see when they run a search using your application. You can pull from up to 10 URL’s after defining what information you are looking to grab. The second, Custom Data Services, is where you are able to construct your own search engine’ish data path. You can strip data from pages themselves (think wikipedia) or grab from an API (think facebook). The last is mainly used for grabbing from RSS feeds and the like.

More to come as I get developing. I will keep you up to date!