This Computer's local hostname... is already in use...

Discussion in 'Mac Basics and Help' started by jnguyen4, Aug 12, 2008.

  1. jnguyen4 macrumors 6502


    Aug 27, 2006
    hey guys.. i get this response on my computer sometimes.. This Computer's local hostname "****computer.local" is already in use on this network. The name has been changed to "****-2.local" automatically. im the only one on my network.. why is this? how can i change it?

    i already went to preferences and changed the name... but it still comes back.
  2. jaminconn macrumors newbie

    Mar 2, 2010
    Anchorage, Alaska
    yeah, i'm having the same problem. my mother's computer has been doing it all the way up to "45"
  3. hoops7 macrumors newbie

    Sep 1, 2010
    local hostname changed "-2"

    It may be that the computer loses contact with the network then attempts to reconnect and finds that the Router still thinks that the previous connection still exists so the computer adds a "-2" by default to give it an original name over the network.

    1. Go to System Preferences/Sharing/Edit
    (then delete the "-2") then save.

    2. If it says "already in use" then reset your Router (switch off power so it looks for all computers on network afresh as it restarts).

    3. Repeat step 1 above while the Router is resetting.

    This problem also seems to reset Time Machine to recommence backups.

    I read that having names with no spaces helps avoid the problem.

    However problem continues for me on occasion.

    Seemed to have started with a time machine update for iMac only -
    No such update for Macbook Pro which has never had this problem although on same network.
  4. smitsc05 macrumors newbie

    Nov 4, 2010
    Additionally, you can open up a terminal and slap your hostname settings around a little:

    To confirm the real name of your machine on the network. (The terminal prompt will often not be the real hostname.)

    Type: hostname

    If you want to change it:

    Type: hostname <newname>
    Example: hostname spartacus
  5. Pinkerton macrumors newbie

    Jun 5, 2009
    San Jose, CA
    I've had the same or a similar issue. My computer was constantly renaming itself with a (2) every time it booted, after a system lockup. I tracked the issue down to CD/DVD sharing... when turned off the problem went away.

    When CD/DVD sharing was on, I could not change the name back to the original version, it would get rejected and immediately set back to the version with "(2)", displaying the message:

    The name of your computer "Name" is already in use on this network. The name has been changed to "Name (2)" automatically.

    With CD/DVD sharing turned off, I could name my computer whatever I like, even back to the original name. Turning DVD/CD sharing back on again would instantly rename my Mac. It's very persistent bug!

    Fortunately I found a fix. I was able to get rid of the problem by toggling Bonjour, as described here:

    To turn Bonjour off:

    sudo launchctl unload -w /System/Library/LaunchDaemons/

    To turn it back on:

    sudo launchctl load -w /System/Library/LaunchDaemons/

    Toggling Bonjour (mDNSResponder) forced a reset of something on my system somewhere, and now I no longer see the issue on reboot, even with CD/DVD sharing turned on. I can turn sharing on and off at will, and my computer is never renamed. Success!

    I don't think this problem has to do with CD/DVD sharing specifically... I think it's a bug in Bonjour. I've seen threads where people have complained about this issue because of printer sharing, or remote management! My guess is that a crash can cause a mDNSResponder config corruption, tricking Bonjour to share devices or services using the same name as your computer, forcing the name conflict.

    In any case, I hope this fix works for you too. I know I'm a lot happier now that there isn't a lingering issue on my box!

Share This Page