I found the solution here:
I had problems with mail.app; a volume from a macbook pro was searched each time I opened the application followed by the connection failure message (it did not matter if the volume was or was not in the network). I tried all of the various solutions suggested in the WWW. All failed to solve my problem. Resetting the SyncServices folder as indicated in the foregoing article through the Terminal.app did finally solve it. I hope this is useful for those that end up landing on this thread looking for a solution.
This seems to have worked for me. I had to change internet providers and routers lately. I went into Network under System Preferences, but my location said 'Automatic', so I went to 'Advanced...' button on bottom unchecked box under 'remember networks this computer has joined' and then highlighted my old network as well as any temporary networks I had joined such as Starbucks and any hotel internet and clicked the minus sign to remove them from the list. I then restarted my Mac and so far the error has not come back...Yeah!
Thank you, this helped me finally solve it!
I've had this problem for years and years through numerous OS versions and computers and I've tried to solve it many times but with no luck.
Today, by the help of this thread, I finally found out what was causing the problem so I just wanted to chime in on this if it can be of help to other people like myself who don't really know my way around terminal and obscure system files in my computer library.
In my case what caused the problem was an alias (whatever that is...) saved in the <username>/Library/PDF Services/ folder that was pointing to Yojimbo, a program I deleted from my laptop loooong ago but stored a copy of on an external harddisk that was once upon a time connected to an old Airport Extreme kalled "Kontor". So every time I clicked on "PDF" in a printer dialogue the system would try to find Yojimbo on "Kontor" in order to show me the full menu of PDF-options available, but of course in vain as that server no longer exists. Deleting that single alias from that folder stopped the problem immediately, no need to restart the computer or anything. Wohoo!
I tried a lot of the other suggestions in this thread, but this was the only thing that worked. Deleting a list of old servers, deleting login-items, etc etc had nothing to do with it, and also I didn't have to clear out the entire contents of that folder, only one file. So try looking in that folder for things pointing to programs you no longer use. And good luck! This has been a real pain for me for so many years, can't believe I can finally work with pdf's without having to wait for that stupid error message for ages every time I want to save something as pdf! Hope this works for others too.
I found references to a folder I used to open on a now-nonexistent server in loginwindow.plist. I removed the reference in the plist file and now I no longer get the missing server message on startup - thanks for the tip.
Those uncomfortable editing like this can simply go to Login prefs in Users and delete the bad server or folder, I think. MY problem was that the folder was simply called "f" and it's been so long that I forgot what "f" was - thought it might be a Trojan or something. :|
Another thing I did was to Search <User>/Library for the missing server name - and I found several references to it, which I simply selected and moved to trash.
Tried everything else, including removal of all items in "~/Library/PDF Services/", but Ahrum Pilendiram's method fixed the problem for me. I rm'd those preference files then logged out and back in and now I can connect to my local servers again.
I also experienced the continuous error Connection failed, the error message indicated my MAC mini was trying to connect to an old NAS on y LAN I ceased to use half a year ago.
My problem was not related to iPhoto, Acrobat Reader. Nor did i have any entries in the Library/Preferences/com.apple... as suggested by Ahrum Pilendiram's.
Note I have recently upgraded to Yosemite OS X 10.10, and I can only find a file named Library/Preferences/com.apple.loginwindow.plist
files com.apple.loginitems.plist or com.apple.recentitems.plist do not exist on my machine....
In my case the error started after the Yosemite upgrade.
By chance (after a few days struggling with this problem) I stumbled upon a Apple Utility called 'Keychain Access'.
It turned out it had stored multiple keys / entries related to my old NAS.
After removing those entries AND restarting my MAC the error was gone.
Hopefully this helps others!