My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Friday, April 24, 2009

whatismyip quit working for ddclient... change to checkip.dyndns.com

Suddenly ddclient started generating errors trying to determine my local IP address:
/etc/cron.daily/ddclient:
WARNING: cannot connect to whatismyip.org:80 socket: IO::Socket::INET: connect: Connection timed out
WARNING: unable to determine IP address
Pointing a browser at whatismyip.org:80 seemed to confirm the site is down - just kept getting connection refused.

Well, time to find an alternative for whatismyip. Poking around with google, I found this page which described using checkip.dyndns.com. Following those directions I edited /etc/ddclient.conf and replaced the following line:
use=web, web=whatismyip.org
With:

use=web, web=checkip.dyndns.com/, web-skip='Current IP Address: '
And then ran ddclient again to check:
# /etc/cron.daily/ddclient
#
No output, all seems well....But no, it isn't. Visiting DynDNS indicates I still haven't updated my information recently. Remembering my previous experience with ddclient hanging, I checked for a hung process and sure enough, there was one:

# ps auxwww | grep ddcl
root 15725 0.0 0.0 7548 3032 ? S Mar29 0:00 ddclient - read from whatismyip.org port 80
root 30771 0.0 0.0 3240 804 pts/2 S+ 21:26 0:00 grep ddcl
So I killed it:
# kill -9 15725
And reran ddclient (I found I hat to use the -force flag to get it to do anything):
# /usr/sbin/ddclient -force

And all was good.

3 comments:

scrat said...

thanks you for posting this, i also found that my ip address did not get updated at opendns.com, and i couldn't find out why... until i hit your blog page.

thanks!

Anonymous said...

I was having the same problem with ddclient hanging as well. Rather than using the force option however, I was able to fix it by deleting the colon after Current IP Address (now the line reads: use=web, web=checkip.dyndns.com/, web-skip='Current IP Address'). Not really sure why the colon was causing it to hang, but it seems to have been the source of the problem.

negocjatorek said...

THANKS!!! that's why I cannot update my IP.