You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Shared name of Mac keeps changing

This infuriating little bug has been around since at least 2007, but gets "solved" every few years and then reappears with the next release of OS X.


I'm posting because it's especially bad with "Yosemite" (10.10), none of the previous fixes one can find on the web work, and it's just bloody ridiculous in this day and age that Apple of all people has such a persistent networking bug in the middle of their prize "bonjour" protocol. It's awful, annoying, infuriating and someone should actually do something about it, no?


The bug is that the Sharing name of a computer on a local network will constantly change by reason of bracketed numbers being added to the end of the name. If your computer name is "George" for instance, it will change to "George (2)", "George (3)", and so on. Mine has gone up to "(6)" a few times recently. All these computers, which are actually the same computer, will then show up as separate entities in the bonjour sharing dialogue. Clearly there is a sort of infinite loop thing going on where the computer looks at the network, sees itself, and thinks that this is actually a second computer of the same name. It's a childish, annoying little bug that Apple seems to not give a rat's behind about. It's been around for over 7 years!


Various online discussions (some here) can be found wherein various things can be tried, some of which on some OS's stop the behaviour for a while, but NONE of which actually work on Yosemite.


The most direct method to "fix" it is to reset the mDNSResponder.plist with some scary terminal code, but this fails on Yosemite because the file in question doesn't exist anymore.


The only thing I have found that slows it down, is to turn off all sharing, and turn off wireless on my computer. Needless to say this is NOT A SOLUTION. It's ridiculous to expect users to essentially turn off bonjour, to fix a bug within bonjour. Even so, the bug will reappear at times even with all sharing services turned off and wireless turned off.


Please, someone find a way to fix this nightmare. Apple has had seven years and apparently can't manage it.

Posted on Oct 24, 2014 12:32 PM

Reply
66 replies

Nov 24, 2014 9:25 AM in response to R C-R

Thanks for the new information. I will try this if I get the time, but it seems like something the end user shouldn't *have* to do to make a network behave in a normal fashion.


Also, I keep a close eye on my IP's and they rarely, if ever, change at all. Additionally, the problem happens whether the computer (the one with the name multiplying) is on a wireless or a wired connection, whereas the stable devices that don't change their name are primarily wireless only.


I will probably get around to trying it and report back here if it works, but I think that this has only a small chance of success for these reasons.

Nov 24, 2014 11:18 PM in response to dbengston

dbengston wrote:


My situation has resolved itself. No more renaming after a sleep/wake scenario.


So far, (it has been about 12 hours only) I can confirm the 10.10.1 update did the trick also for me.


I had left this un-checked after the initial negative feed-back that had been reported this thread.

My bonjour sleep proxy is now enabled and the computer network name appears stable. ( crossing fingers)


Thanks for sharing


/P

Nov 30, 2014 11:29 AM in response to Gran Maestro

It's been a week since I turned Wake for Network Access back on on my systems running 10.10.1 so I feel fairly confident that the upgrade fixed the issue for me. While it was more of a annoyance than a real problem I'm glad it is resolved.


And Gran Maestro I agree that going to static IP's or using the MAC number would not affect this issue. Given that Bonjour's Wake on Demand and Sleep Proxy was at the root of the issue.


regards

Feb 5, 2015 3:03 PM in response to mr_bee

Hi, I've had this same problem, with the addition to my Terminal appending a dash and a number "-2' to my mac's name.

The following fix worked for me, I hope it will work for you too:


First change the mac name, host name and local hostname using:


sudo scutil --set ComputerName "your mac's name"

sudo scutil --set LocalHostName "your mac's name"

sudo scutil --set HostName "your mac's name"


Then flush the DNS cache by typing:

dscacheutil -flushcache


Finally quit Terminal and open it again. Check if this works for you and let me know.

Feb 22, 2015 8:24 PM in response to colly wobbles

colly wobbles wrote:

same here; but i have noticed (for me) it's happening because of home sharing through iTunes. anybody else found this?

For me & I know for many other users with more than one Mac, this has occurred occasionally for many years, at least as far back as 2008 when OS X 10.5 Leopard was the current version. It doesn't seem to have anything to do with iTunes or which Macs or other devices are on the home network.

Feb 22, 2015 9:40 PM in response to ilgaar

ilgaar wrote:

The following fix worked for me, I hope it will work for you too:


First change the mac name, host name and local hostname using:


sudo scutil --set ComputerName "your mac's name"

sudo scutil --set LocalHostName "your mac's name"

sudo scutil --set HostName "your mac's name"

Interesting! From the scutil man page:

ComputerName The user-friendly name for the system.

LocalHostName The local (Bonjour) host name.

HostName The name associated with hostname(1) and gethostname(3).

I think the first two correspond directly to the values visible (& settable) in System Preferences > Sharing as "Computer Name" & as the local host name (with ".local" automatically appended) settable via the "Edit..." button.


Using "scutil --get Computer Name" & "scutil --get LocalHostName" returned the expected values. However, on every Mac in the house, "scutil --get HostName" returned "not set."


I have no idea if this has anything to do with the added dash & number issue but I would be interested in knowing if others get the the same 'not set' result for HostName.

Feb 24, 2015 1:21 PM in response to R C-R

R C-R wrote:

For me & I know for many other users with more than one Mac, this has occurred occasionally for many years, at least as far back as 2008 when OS X 10.5 Leopard was the current version. It doesn't seem to have anything to do with iTunes or which Macs or other devices are on the home network.


My usual suspects here are an AirPort, Time Capsule, or any other similar device that's managing a Bonjour sleep proxy, or a local network misconfiguration such as the existence of a loop in the local network. Either the proxy, or the same Mac via a separate path. Not a different Mac.

Mar 6, 2015 9:57 AM in response to mr_bee

I've had this problem periodically, and indeed Bonjour Sleep Services is the culprit. Flushing dnscache, terminal setting of hostnames, repairing permissions will not fix the issue.


The only thing that will resolve this:

- unplug *ALL* Apple routers - AirPort Extreme, AirPort Express, Time Capsule

(if you have multiple Apple routers they must ALL be unplugged)

- unplug *ALL* AppleTVs on your network

- change hostname back in Sharing Preferences of all affected Macs

- shut down all Macs

- plug in all Apple routers and allow to restart

- plug in all AppleTVs

- startup all Macs


Discovered this on another thread several months ago, but can't seem to find it.

- Paul

Mar 6, 2015 11:18 AM in response to R C-R

well, i can tell you for a fact i shut down iTunes, rename the box and it stays good.

the problem only occurs across wifi, not wired.

i'm now on a beta of 10.10.3, maybe they slipped in a fix.

nothing to do with DNS, i don't need to restart, i don't need to unplug Apples TV's, routers or anything else for that matter; and i don't need to delve into the occult.. iTunes has been around quite a while (pre 2008), although admittedly home sharing was introduced around 2010.


whilst it's troublesome, i know how to stop it for me. so, i'm happy with that..

Jun 3, 2015 4:12 PM in response to mr_bee

So...........did anybody get to the nuts and bolts of how and why this is happening? or did it simply get patched??


My issue is not quote the same as all of yours. I dolt have any AirPorts, TimeCapsules or AppleTV's on my network, yet I keep getting the error "This computer's local hostname "MacbookAir-3955.local" is already in use on this network. Then name has been changed to "MacBookAir-4771.local".


The problem here is that only 1 hour ago the local hostname was MacbookAir-1100.local, meaning it has changed 0over 3600 times!!!


It get's even more curious from there..........The name is actually changing when I switch the Wi-Fi off entirely. The error does not present when the Wi-Fi is on.


I can't get this one sorted. I have no Ethernet connection, I have also deleted any other Network Interfaces from the system.


I don't understand why 1) this error can even happen with no network connection and 2) why this has started happening in the last 24 hours


Any help would be appreciated

Jul 15, 2015 11:27 AM in response to Djinn22

Jumping in to reiterate pretty much everything the original poster shared.


I'm a consultant helping 10+ small businesses with all Mac networks and this is maddening. It happens as some of my clients, but not all. Our offices are setup as basic as possible. Usually 15 or less users needing access to a file server for file sharing. We try to roll out a consistent set of hardware with regards to routers and switches. Flat networks, DHCP reservations from the routers. Offices that are setup exactly the same do not behave the same. One client never has names change while another does daily. I saw a computer today with (303) after it. 300 name changes since my last visit 7 days ago...

Shared name of Mac keeps changing

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.