2

I'm trying to download android source (Cyanogenmod). i have spent more than 12hrs to download 2.5GB files, Now my connection lost for a while, it shows

 error: RPC failed; result=56, HTTP code = 200
    fatal: The remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed
    fatal: unable to access 'https://android.googlesource.com/platform/prebuilts/misc/': Could not resolve host: android.googlesource.com
    fatal: unable to access 'https://github.com/CyanogenMod/android_packages_inputmethods_LatinIME/': Could not resolve host: github.com
    fatal: unable to access 'https://android.googlesource.com/platform/prebuilts/misc/': Could not resolve host: android.googlesource.com
    error: Cannot fetch CyanogenMod/android_packages_inputmethods_LatinIME
    error: Cannot fetch platform/prebuilts/misc
    error: Exited sync due to fetch errors

Can i resume the download or i should download from the beginning, please help me to resume my download. Thank you!

Spartan
  • 23
  • 4

4 Answers4

1

Once you have applied the fix that I describe below, you should simply re-run repo sync in order to resume and fully complete the resource synchronization process that was interrupted by these fatal errors.

The solution to the DNS-related error that you've encountered [fatal: Could not resolve host] is detailed on the Known Issues resolution page at Google's AOSP Developer Site. Apply this fix by adding the appropriate host entry for your remote repository android.googlesource.com inside your development machine's /etc/hosts config file. Begin by clicking here and here to execute the IP address lookup tool provided by the free web resource: http://network-tools.com/nslook/.

Google's full description of this issue with detailed resolution I've included here:

Difficulties syncing the source tree (DNS issues).

Symptom: When running repo sync, the process fails with various errors related to not recognizing the hostname. One such error is <urlopen error [Errno -2] Name or service not known>. EDIT: Another fatal error might be Could not resolve host.

Cause: Some DNS systems have a hard time coping with the high number of queries involved in syncing the source tree (there can be several hundred requests in a worst-case scenario).

Fix: Manually resolve the relevant hostnames, and hard-code those results locally.

You can resolve them with the nslookup command, which will give you one numerical IP address for each of those (typically in the "Address" part of the output).

    $ nslookup googlesource.com
    $ nslookup android.googlesource.com

You can then hard-code them locally by editing /etc/hosts, and adding two lines in that file, of the form:

    aaa.bbb.ccc.ddd   googlesource.com
    eee.fff.ggg.hhh   android.googlesource.com

Note that this will only work as long as the servers' addresses don't change, and if they do and you can't connect you'll have to resolve those hostnames again and edit etc/hosts accordingly.

zero2cx
  • 482
  • 6
  • 19
  • @Spartan The reason for the DNS fail is not really poorly configured DNS settings. It's the fact that `repo` rapidly generates many concurrent, duplicate DNS requests. Then, `repo` fatally fails because the DNS server response was judged to be too slow, i.e. did not respond. – zero2cx Jan 29 '17 at 19:06
0

You don't resume a clone, you can try a shallow clone instead.

As mentioned here:

Error code 56 indicates a curl receive error of CURLE_RECV_ERROR which means there was some issue that prevented the data from being received during the clone process.
Typically this is caused by a network setting, firewall, VPN client, or anti-virus that is terminating the connection before all data has been transferred.

You can know more with:

set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1

You can try changing http.postBuffer or switching to ssh url clone.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Could not resolve host: android.googlesource.com

Which could be a DNS server problem. Try first restarting your modem in order to flush its DNS cache. If you're still seeing the problem, try changing your Primary DNS to either one these two publicized DNS servers that Google operates:

  • 8.8.8.8
  • 8.8.4.4

Note that, if your Primary DNS has already been configured as described and you've also long-rebooted the router without resolution (pun intended), then adjusting your Primary DNS configuration to point at other public DNS servers is not likely to fix your situation. However, a reputable list of no-cost public servers can be found here.

zero2cx
  • 482
  • 6
  • 19
0

Spartan i checked the Cyanogenmod its working normally i prefer use internet download manager.i download 60mp and recall it.successfully fetched and resumed.

Anburaj_N
  • 109
  • 1
  • 1
  • 10