NonRandomImg

Gavin Duley's Weblog

Still nothing of interest

Main page
Photo Gallery
Weblog (RSS)
Interests
UK Farming Crisis
What's new?
Links
Contact me


External (open in new window)
Librarything profile
Snooth profile
Twitter (RSS)


Old posts:
May 2013 (1)
Apr 2013 (1)
Oct 2011 (6)
Sept 2011 (1)
Aug 2011 (1)
Jul 2011 (27)


Categories:
/books
/botany
/cars
/cars/oldcars
/computing
/computing/android
/computing/mac
/computing/unix
/music
/photography
/photography/cameras
/photography/experiments
/soporific
/stuffisaw
/stuffisaw/error_messages
/this_site
/travel
/travel/australia
/travel/australia/south_australia
/travel/france
/travel/france/burgundy
/travel/uk
/wildlife
/wine
/wine/oenology_diploma
/wine/vintage2011


Fri, 01 Jul 2011

Odd hostname problems

Just for the past few months, my MacBook had been assigning itself a hostname from the network. Only odd thing is, the network is is on is my home network, and wasn't set up to hand it a hostname from DHCP.

A quick search on google found that Mac OS X goes through a number of steps to automatically determine its network hostname:

  1. The name provided by the DHCP or BootP server for the primary IP address
  2. The first name returned by a reverse DNS (address-to-name) query for the primary IP address
  3. The local hostname (set in the Sharing pane of System Preferences)
  4. The name localhost
-- Mac OS X hostname determination

Only thing is, it must have been asking my ISP's DNS servers, and ended up getting an odd amalgam of the local internal IP address and my ISP's domain, eg: 192-168-1-5.tpgi.com.au

This was a similar format to the external hostname given to my router by the ISP, which is in the form of 123-456-78-90.tpgi.com.au (where 123-456-78-90 represents an imaginary IP address 123.456.78.90).

Here's what /var/log/system/log showed:

Feb 24 05:03:42 192-168-1-5 kernel[0]: sleep
Feb 24 05:03:42 pippin kernel[0]: Wake reason = USB1
Feb 24 05:03:42 pippin kernel[0]: System Wake
Feb 24 05:03:43 pippin kernel[0]: USB (UHCI):Port 2 on bus 0x1d has remote wakeup from some device
Feb 24 05:03:42 pippin configd[34]: setting hostname to "pippin.local"
Feb 24 05:03:45 pippin kernel[0]: AirPort: Link Up on en1
Feb 24 05:03:47 192-168-1-5 configd[34]: setting hostname to "192-168-1-5.tpgi.com.au"
Feb 24 05:03:47 192-168-1-5 mDNSResponder[22]: NOTE: Wide-Area Service Discovery \
                disabled to avoid crashing defective DNS relay 192.168.1.1:53
Feb 24 05:03:49 192-168-1-5 mDNSResponder[22]: Note: Frequent transitions for  \
                interface en1 (192.168.1.5); network traffic reduction measures in effect
Feb 24 05:03:51 192-168-1-5 Mail[215]: Type selection took over 1.000 seconds. Stopping early....
(some line-wrapping added by me)

Obviously, as far as problems go, this was a very minor one. But odd, too -- it really shouldn't have been trying to get a hostname off my ISP, given that the network is behind a NAT firewalled router/"modem". Also, this address was a figment of the computer's imagination: attempting to ping it from within the network failed.

There were a number of suggestions as to how you could force Mac OS X to use a static hostname, but most of these seem to come with a warning as to why you shouldn't do that. In the end, since I am, err, "network administrator" of my home network I just gave myself a static IP address on the router, and told it to give that IP address the hostname I wanted.

This seemed to work:

Feb 25 00:04:04 192-168-1-5 kernel[0]: AirPort: Link Down on en1
Feb 25 00:04:07 pippin configd[34]: setting hostname to "pippin.local"
Feb 25 00:04:21 pippin airportd[3594]: Error: Power unexpectedly off, bailing  - Apple80211GetPower() = off (0)
Feb 25 00:04:21 pippin airportd[3594]: Could not find any preferred networks; trying broadcast requests..
Feb 25 00:04:21 pippin airportd[3594]: Error: Apple80211Scan() error 82
Feb 25 00:04:21 pippin airportd[3594]: Error: __performScan() failed (82)
Feb 25 00:04:22 pippin airportd[3594]: Error: Power unexpectedly off, bailing  - Apple80211GetPower() = off (0)
Feb 25 00:04:27 pippin login[3573]: DEAD_PROCESS: 3573 ttys001
Feb 25 00:04:41 pippin PubSubAgent[3593]: AgentTask: Daily Tasks took 6756 msec
Feb 25 00:05:07 pippin ntpd[14]: sendto(17.72.255.11) (fd=23): No route to host
Feb 25 00:05:18 pippin login[3603]: USER_PROCESS: 3603 ttys001
Feb 25 00:06:00 pippin kernel[0]: AirPort: Link Up on en1
Feb 25 00:06:07 pippin configd[34]: setting hostname to "pippin.home"
Feb 25 00:06:08 pippin mDNSResponder[22]: NOTE: Wide-Area Service Discovery disabled to avoid crashing \
                defective DNS relay 192.168.1.1:53
Feb 25 00:06:12 pippin ntpd[14]: sendto(17.72.255.11) (fd=23): Network is unreachable
Feb 25 00:06:42 pippin login[3623]: USER_PROCESS: 3623 ttys002

I just wonder what exactly it is that it is complaining about with "Wide-Area Service Discovery disabled to avoid crashing defective DNS relay 192.168.1.1:53"...

posted at: 01:50 | path: /computing/mac | permanent link to this entry

Dead MacBook - deja vu all over again?

Well, the problems I had had previously with my MacBook had come back again. I think, even though I did manage to revive it last time, that the hard disc still has problems. The computer boots using the same ELive live CD, just not off the hard disc.

At the moment, it's still dead. I don't have a backup that's as up-to-date as I would like, so I'll try copying stuff across the network before I reinstall. Interestingly, I can still read the hard disc when I boot using the Live cd, it just won't boot off it.

Booting from the Mac OS X installer disc, I can run test on the hard disc. The test that checks the file system reports no problems, but it keeps crashing on the test that tests file permissions. I wonder if this is the problem, or just a symptom...

Ironically, I was trying to do a backup when it died. I hadn't plugged in my TimeMachine disc in about 10 days, so plugged it in so it would do a backup. When, after several hours, it had only backed up a few megabytes I decided something was wrong and so restarted it. I then tried again. Then my web browser crashed and couldn't be persuaded to restart. I decided to try restarting the computer, as the backup still wasn't going well. Unfortunately, this time it decided not to restart...

posted at: 01:50 | path: /computing/mac | permanent link to this entry

Dead MacBook

For a couple of weeks, I had a dead MacBook on my hands (flippers?). I thought I'd write up a quick weblog post, as I've not found much information on the particular problem I had. I'm not certain how common it is, but anyway...

The only symptom was this: the MacBook (1st generation, for what it's worth) would not boot. I got past the Apple start up screen, on to the blue startyp screen. This alternated between a blank blue screen, and one with a circular progress bar. And got no further. I was able to boot from both the Mac OS X DVD and from a Linux live CD -- ELive CD. This showed at least that it was not a hardware problem such as dead RAM.

Initially, I had thought that it was just a dead hard disc, but I was able to mount it okay with the Linux live cd. In addition, I was able to use Disk First Aid on the Mac OS X install DVD, which found no problems with it.

The problem seemed to have just been a software issue -- my guess is it was just a few corrupt startup files. I'm not really certain what caused this -- it could be an early warning of looming hardware problems, or it could just be bad luck. In any case, the only way I found to get it to boot was to reformat and reinstall OS X. Luckily, I had a Time Machine backup of my user files and settings (unfortunately not of the whole system), so this was easy enough. There was an option to transfer files from a Time Machine backup at the point in the OS set up where you can transfer your information from another Mac, and this worked smoothly enough.

Now I just have to hope it keeps behaving itself...

posted at: 01:50 | path: /computing/mac | permanent link to this entry

RSS Feed


Copyright (c) Gavin Duley 2007 onwards