Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fixing "The recovery server could not be contacted" in MacOS High Sierra

I was trying to reinstall High Sierra on an older MacBook Air using internet recovery and I kept on getting an error message when trying to reinstall High Sierra.

The recovery server could not be contacted

It appears that this has to do with the time on the machine not being synchronized, so when the MacBook tries to reach out to the recovery server the certificates do not validate and we get this useless error message.

To fix this.

  1. Open up a Terminal from the utilities menu
  2. Enter the following command
ntpdate -u time.apple.com
  1. Try to install High Sierra again. It should just work™.
@dbraga

This comment has been minimized.

Copy link

dbraga commented Dec 29, 2017

Thanks so much for this ! would you also please update the command pre-pending sudo ?

@levlaz

This comment has been minimized.

Copy link
Owner Author

levlaz commented Jan 17, 2018

@dbraga thanks for the catch!

@njdcornites

This comment has been minimized.

Copy link

njdcornites commented Jan 24, 2018

Just remove the sudo @dbraga

@wenxingxing

This comment has been minimized.

Copy link

wenxingxing commented Jan 26, 2018

In case this doesn’t work, try this

@issuulee

This comment has been minimized.

Copy link

issuulee commented Jan 26, 2018

I tried the steps mentioned above by macos-recovery-server.md and this command " sudo ntpdate -u time.apple.com " did not help as I was upgrading my Mac from Sierra to macOS Sierra and everytime I was running the installer it just showed the error message The recovery Server could not be contacted and tried all the steps mention at https://iguruservices.com/support/recovery-server-could-not-be-contacted-error/ also but nothing worked. But the one thing I learned that the installer I was running is just 19MB is size which used to download the rest of the content after starting the installer. So I had finally copied the full version of this High Sierra installer form another Mac which had it already. And I had my my upgraded from the full installer without any problem. So please check the size of installer first when you get this frustrating error message.

@ManlyElectronics

This comment has been minimized.

Copy link

ManlyElectronics commented Feb 2, 2018

Thank you it worked but without sudo.

@aganatav

This comment has been minimized.

Copy link

aganatav commented Feb 4, 2018

THANK YOU ITS HELPP :)
remove the sudo command and dont forget to connect INTERNET guys

@gitawego

This comment has been minimized.

Copy link

gitawego commented Feb 4, 2018

thanks a lot. it works!

@zekeryl

This comment has been minimized.

Copy link

zekeryl commented Feb 12, 2018

hi there
after placing this at the Terminal?
ntpdate -u time.apple.com
how can i go back to the window Reinstall mac OS?
should i quit the Terminal then? thanks for help..

@larryrst

This comment has been minimized.

Copy link

larryrst commented Feb 20, 2018

@zekeryl, yes. the install Disk utility section will re-appear, and you should be good to go. Apple really needs to fix this error.

@jonlachmann

This comment has been minimized.

Copy link

jonlachmann commented Feb 24, 2018

Thanks, this solved it for me! =D

@ghost

This comment has been minimized.

Copy link

ghost commented Feb 27, 2018

Hi all,
Really appreciate all of you input. I have a similar problem but think it's beyond editing the date and time.
The short story is I was wiping my 2010 iMac for a Russian friend and tried to reformat the disk in Russian with her help (terrible idea) and I believe that I wiped the original HD and partition.

I've been on a bunch of other forums and have tried to re-partition the internal HD, but I'm definitely making it worse. Does anyone have any suggestions? I've attached a photo of what's going on in Disk Utility because it's definitely not right. Any/all help is much appreciated.
Thanks!
img_5724

@vako1776

This comment has been minimized.

Copy link

vako1776 commented Mar 1, 2018

If sudo ntpdate -u time.apple.com doesn't work, try restoring your Hosts file back to its original values. And then do the time updated one more time.

Time updated didn't work for me at first. Then I did a reset of my hosts file because over the years it's been edited either by me or by some software. After that, sudo ntpdate -u time.apple.com could execute successfully and the installer was able to connect to the servers.

Here's how to reset hosts file: https://www.igeeksblog.com/how-to-reset-restore-hosts-file-to-its-original-version-in-mac-windows/

@jbrelsf2-nmdp

This comment has been minimized.

Copy link

jbrelsf2-nmdp commented Mar 7, 2018

This worked me too. Thanks a bunch. I've got a MacBook Pro 13 inch, Late 2011 2.4 GHz Intel Core I5. I didn't need to use 'sudo'.

@franklinisrael

This comment has been minimized.

Copy link

franklinisrael commented Mar 8, 2018

Please I need help. I have done everything that have been talked about here and yet I still have the same error "The recovery server could not be contacted"

What else can I do?

I need help

@jbrelsf2-nmdp

This comment has been minimized.

Copy link

jbrelsf2-nmdp commented Mar 8, 2018

@franklinisrael Just checking. Have you connected your wifi to a valid wifi access point and verified connection? Do you have any errors when you run sudo ntpdate -u time.apple.com ?

@franklinisrael

This comment has been minimized.

Copy link

franklinisrael commented Mar 9, 2018

@jbrelsf2-nmdp thank you so much for commenting. I have my computer connected to the Wifi and it is working properly. When I run the ntpdate -u time.apple.com it does not give any error. I see the server time and it is correct with the date and time. What I did was I had to run ntpdate -u time.apple.com over and over again before macOS High Sierra begins to install. As I write to you right now it is installing and it will take about 3 hours and 21 minutes to finish installing. I will wait for it to finish and once I hope it all works out well. Once it is done I will write an update here. Thank you so much.

@franklinisrael

This comment has been minimized.

Copy link

franklinisrael commented Mar 9, 2018

Hello, please I need help. I am tired of going over the same circle. It has taken more than 6 hours and MacOS Sierra finally installs. I shut down the Mac to restart again and it just won't boot up. It seems like MacOS Sierra is not good at all and it keeps crashing. Can I install El Capitan? If anyone knows how. On my other Mac I have El Capitan and it works perfectly since 2012. I need help if anyone can help out.

I tried restarting and once the white ink is moving it will stop and Mac will turn off.

@coreation

This comment has been minimized.

Copy link

coreation commented Mar 20, 2018

Awesome! This worked for me as well

@swajcitytrick

This comment has been minimized.

Copy link

swajcitytrick commented Mar 24, 2018

It worked! But not with sudo.

@jakub-zawislak

This comment has been minimized.

Copy link

jakub-zawislak commented Mar 26, 2018

I downloaded this app - http://dosdude1.com/highsierra/
It has option to download the full image - Tools -> Download macOS High Sierra

@TonnyGaric

This comment has been minimized.

Copy link

TonnyGaric commented Apr 4, 2018

The command without sudo worked for me, thank you! 👍

ntpdate -u time.apple.com
@riahlynn

This comment has been minimized.

Copy link

riahlynn commented Apr 4, 2018

So I’m at the “install macOS High Sierra” part, I did the terminal part without “sudo” after I click the agree to install it says “this disk is not formatted as Mac OS Extended (Journaled). Use Disk Utility to enable journaling or reformat the disk” how do I do this?!

@gb24119

This comment has been minimized.

Copy link

gb24119 commented Apr 7, 2018

Like franklinisrael mentioned above, I ran the time update command 5 additional times in a row and went back to try installation and it works now. Running it once was not enough.

@deadmann

This comment has been minimized.

Copy link

deadmann commented Apr 12, 2018

I had time issue on the Host machine, that couldn't get fixed using the console on the VirtualBox, now it start installing

@amanrocks11

This comment has been minimized.

Copy link

amanrocks11 commented Apr 19, 2018

It worked! Thanks!

@benjikandel

This comment has been minimized.

Copy link

benjikandel commented Apr 29, 2018

Great and fast solution. I used the ntpdate come in Terminal and it worked for me!

@ermanmobven

This comment has been minimized.

Copy link

ermanmobven commented May 4, 2018

Thank you so much it worked!!!

@weiqitoby600

This comment has been minimized.

Copy link

weiqitoby600 commented May 9, 2018

Tryin

@jonbarlo

This comment has been minimized.

Copy link

jonbarlo commented May 15, 2018

Thanks vako1776 resetting my hosts file did the trick, i struggle with this couple of weeks! :D already downloading and installing High Sierra

@alex-holt

This comment has been minimized.

Copy link

alex-holt commented May 15, 2018

Worked, thank you!

@schlenks

This comment has been minimized.

Copy link

schlenks commented May 17, 2018

Thank you very much, ntpdate did the trick for me.

@youssefbousfoul

This comment has been minimized.

Copy link

youssefbousfoul commented May 31, 2018

Thanks, never thought of it

@ssbarnea

This comment has been minimized.

Copy link

ssbarnea commented Jun 1, 2018

Thanks! Cannot believe Apple engineers were not able to cover this when starting the installer. This is soemthing lots of people will endup with after reseting NVRAM, recovery being the next stept to attempt.

@lamoureuxj

This comment has been minimized.

Copy link

lamoureuxj commented Jun 5, 2018

It worked for me as well.
But, make sure that you’re connected to the internet. The option is hidden on the top right of the screen, next to the language option.

@shulu3000

This comment has been minimized.

Copy link

shulu3000 commented Jun 5, 2018

Hi everyone
My macbook air suddenly got the grey screen of death and unfortunately I don't have a backup (what was I thinking?)
Now while trying to reinstall high sierra,I get the recovery server cannot contacted error, I used the date command, it still shows the same damn error. I don't know what to do, please help...
I also don't live in the US, so I don't know, should I try some kind of command for region too?

@shulu3000

This comment has been minimized.

Copy link

shulu3000 commented Jun 5, 2018

Also I only have access to recovery mode because the system gets stuck on apple logo and doesn't boot, so I don't know how to turn my host files into the original version using the terminal
Please help

@uicoded

This comment has been minimized.

Copy link

uicoded commented Jun 27, 2018

Creating new admin user and installing it from there worked for me.
Make sure the time is updated and hosts file is correct.
Multiple options to fix it are described here

@grishamarkov

This comment has been minimized.

Copy link

grishamarkov commented Jul 5, 2018

I used a command : sudo ntpdate -u time.apple.com, but I received error message "no server suitable for syncronization found".

Please help me, thanks everyone!

@davidfant

This comment has been minimized.

Copy link

davidfant commented Jul 10, 2018

@vako1776's solution worked for me
sudo ntpdate -u time.apple.com didn't

@lilwrizzy

This comment has been minimized.

Copy link

lilwrizzy commented Jul 18, 2018

@lamoureuxj thanks man is that easy all this while

@cdcrowder

This comment has been minimized.

Copy link

cdcrowder commented Aug 18, 2018

After 2 days of messing with this thing, your method finally worked. Thank you!

@kirkc

This comment has been minimized.

Copy link

kirkc commented Aug 31, 2018

Thanks a bunch... Was driving me crazy

@malwinder-s

This comment has been minimized.

Copy link

malwinder-s commented Oct 9, 2018

I am getting error:

Can't adjust the time of day: Operation not permitted

@QVMaster

This comment has been minimized.

Copy link

QVMaster commented Dec 7, 2018

Worked with [sudo] Thanks dud :)

@dscherger

This comment has been minimized.

Copy link

dscherger commented Dec 22, 2018

Having the same problem, ntpdate doesn't work, I get ntpdate: command not found
Tried ifconfig -a and noticed that I'm not actually connected to wifi even though I was prompted during the internet recovery startup.
Noticed that there was a wifi menu in the top right of the menubar, clicked that, disconnected, reconnected and I'm now able to contact the recovery server.
Now we'll see if I'm actually able to install something, seems like my disk might be dying/dead.

@dkyazze

This comment has been minimized.

Copy link

dkyazze commented Jan 8, 2019

Thanks so much! I recently bought 3 used mbp's and they all had this error lol. Honestly it took a lot of tries, and 1 took alot longer

@rkjl

This comment has been minimized.

Copy link

rkjl commented Jan 23, 2019

Per above, I've reset host file then retried "ntpdate" command. This results in the following error:

Error resolving time.apple.com: nodename nor servname provided, or not known (8)
23 Jan 05:47:34 ntpdate[586]: Can't find host time.apple.com: nodename nor servname provided, or not known (8)
23 Jan 05:47:34 ntpdate[586]: no servers can be used, exiting

Suggestions?

FYI, I'm reinstalling 10.13.2 because CleanMyMac X deleted a bunch of system files, screwing up normal tasks. Help appreciated greatly!

@arais0

This comment has been minimized.

Copy link

arais0 commented Feb 19, 2019

After entering “ntpdate -u time.apple.com
I receive
Error resolving time.apple.com nodename nor servname provided or not known (8)
I am not sure how to fix this.

@arais0

This comment has been minimized.

Copy link

arais0 commented Feb 19, 2019

Actually I forgot to restart it, now it’s working thank you!

@thephilgray

This comment has been minimized.

Copy link

thephilgray commented Mar 24, 2019

Thank you!

@mrigucci

This comment has been minimized.

Copy link

mrigucci commented Apr 15, 2019

I know this thread is all about High Sierra, but if you're trying to reinstall Mojave, use the following command:
sntp -sS time.apple.com

@akroko

This comment has been minimized.

Copy link

akroko commented May 31, 2019

I have tried to "ntpdate -u time.apple.com" multiple time and it says "no server suitable for synchronization found. Please help! Thank you! I have since updated the date but it still doesn't connect to the recovery server.

@Anbroid99

This comment has been minimized.

Copy link

Anbroid99 commented Jul 1, 2019

I got the "the recovery server could not be contacted" error when trying to install Majave. So I tried to execute "ntpdate -u time.apple.com" as the first helping post suggests but could not be able to execute it. I looked and played around more on the mac without OS and found out that the Wifi was turned off after I erased the previous installation. So I turned on Wife and got connected. I tried to install Majave again and this time it was charm and it went all the way to Done. So make sure your Wifi was on and connected.

@ilonka65

This comment has been minimized.

Copy link

ilonka65 commented Aug 16, 2019

thanks so much this worked!

@nicolas-miari

This comment has been minimized.

Copy link

nicolas-miari commented Sep 5, 2019

I tried:

$ ntpdate -u time.apple.com
bash: ntpdate: command not found
$ sudo ntpdate -u time.apple.com 
bash: sudo: command not found

I checked the WiFi and I was connected to some shady, "free" WiFi that requres login in the browser etc., so I switched to the company WiFi (the password had been lost during disk erase), and it worked.

@sLisnychyi

This comment has been minimized.

Copy link

sLisnychyi commented Oct 2, 2019

check wi-fi connection

@brettbond

This comment has been minimized.

Copy link

brettbond commented Nov 21, 2019

worked.

@MMsulexky

This comment has been minimized.

Copy link

MMsulexky commented Jan 10, 2020

Command ntpdate not found but can be installed using some ntp commands

Note m running it on a windows device

@mickeyreiss

This comment has been minimized.

Copy link

mickeyreiss commented Mar 11, 2020

I know this thread is all about High Sierra, but if you're trying to reinstall Mojave, use the following command:
sntp -sS time.apple.com

This also applies to Catalina. Use sntp instead of ntpdate.

@sarmousavi

This comment has been minimized.

Copy link

sarmousavi commented Mar 31, 2020

I was trying to update from MacOS Yosemite to Catalina and the same problem happened. I had to go to safe mode and then this command
... sudo ntpdate -u time.apple.com .... worked. Thank you very much. Worked.

@rulethepool01

This comment has been minimized.

Copy link

rulethepool01 commented Apr 8, 2020

Hello, I am getting this message when I type in ntpdate -u time.apple.com into terminal and sudo isn't working. Any thoughts, and any help is greatly appreciated. Need to update my Mac so I can work from home. Thanks friends !

"We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Password: "

@desireeseow

This comment has been minimized.

Copy link

desireeseow commented Apr 23, 2020

This worked without "sudo" on my Mid 2010 27-inch iMac. Super lifesaver! Spent HOURS trying to figure this out.

Had to wait around for about 20-30 seconds between clicking "Continue" on the Install macOS High Sierra screen...which got me a bit panicky (20 times bitten, 20 times shy) but when it proceeded to the next page of selecting which HD to install it on I literally jumped off my chair.

THANK YOU SO MUCH. Miles better than Apple Support (who suddenly disconnected me from the chat) who was basically copying and pasting me apple.com recovery links from Google (-_-)"

@Raghav-006

This comment has been minimized.

Copy link

Raghav-006 commented Jul 14, 2020

Hii
I am trying to Reinstall MacOS Catalina using internal Recovery but everytime i try installing it an error appears as "recovery server could not be contacted"
I tried the above solution of "ntpdate -u time.apple.com" with and without sudo but everytime it says "command not found". I am being frustrated trying this again and again tried all that is given on various forums. is there any change in the above command for MacOs Catalina. Please help me out. Thanks

@Raghav-006

This comment has been minimized.

Copy link

Raghav-006 commented Jul 14, 2020

https://gist.github.com/levlaz/16b63384bd5e1bee3593be0d91aedbd7#gistcomment-3207581

I tried doing the above solution also but it did not work for me the problem persists and it says the recovery server could not be contacted.
Guys please help me out.

@nemaia

This comment has been minimized.

Copy link

nemaia commented Aug 2, 2020

Is downloading for me, imac 27inch mid2010. Connected to wifi via wifi icon in top right hand corner, then entered above solution without sudo and time/date resolved correctly. Now downloading OS, hopefully will install correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.