New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print a better Eclipse download error on server-side error. #90

Closed
leogaggl opened this Issue Apr 28, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@leogaggl

leogaggl commented Apr 28, 2015

I am getting the following error trying to install Eclipse:

ERROR: https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-standard-luna-R-linux-gtk-x86_64.tar.gz.md5&r=1 couldn't finish download: 404 Client Error: Not Found
ERROR: 404 Client Error: Not Found
CRITICAL: Exception in worker
Traceback (most recent call last):
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(_self.args, *_self.kwargs)
File "/usr/lib/python3/dist-packages/umake/network/download_center.py", line 125, in _fetch
r.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 825, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 65, in _worker
work_item.run()
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 56, in run
self.future.set_exception(e)
File "/usr/lib/python3.4/concurrent/futures/_base.py", line 504, in set_exception
self._invoke_callbacks()
File "/usr/lib/python3.4/concurrent/futures/_base.py", line 297, in _invoke_callbacks
callback(self)
File "/usr/lib/python3/dist-packages/umake/network/download_center.py", line 185, in _one_done
self._done()
File "/usr/lib/python3/dist-packages/umake/network/download_center.py", line 193, in _done
self._done_callback(self._downloaded_content)
File "/usr/lib/python3/dist-packages/umake/frameworks/ide.py", line 83, in done
UI.return_main_screen()
File "/usr/lib/python3/dist-packages/umake/ui/init.py", line 35, in return_main_screen
cls.currentUI._return_main_screen(status_code=status_code)
File "/usr/lib/python3/dist-packages/umake/ui/cli/init.py", line 53, in _return_main_screen
MainLoop().quit(status_code=status_code)
File "/usr/lib/python3/dist-packages/umake/tools.py", line 141, in quit
raise self.ReturnMainLoop()
umake.tools.ReturnMainLoop

Ubuntu make seems to be working OK otherwise - Android Tools installed fine.

Cheers,
Leo

@didrocks

This comment has been minimized.

Member

didrocks commented Apr 28, 2015

Thanks for reporting this bug.

It seems it was a temporary 404 from eclipse's website. I don't get it here, do you mind retrying? I guess the error message could be a little bit better handled to remove the stacktrace and only print "HTTPError: 404 Client Error: Not Found", what do you think?

@Tinche

This comment has been minimized.

Contributor

Tinche commented Apr 28, 2015

Hi,
my first thought was that the Eclipse folks changed the URLs, but it actually works for me. Running

$ curl 'https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-standard-luna-R-linux-gtk-x86_64.tar.gz.md5&r=1' -v
* Hostname was NOT found in DNS cache
*   Trying 198.41.30.198...
* Connected to www.eclipse.org (198.41.30.198) port 443 (#0)
* TLS 1.0 connection using TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate: *.eclipse.org
* Server certificate: DigiCert SHA2 High Assurance Server CA
* Server certificate: DigiCert High Assurance EV Root CA
> GET /downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-standard-luna-R-linux-gtk-x86_64.tar.gz.md5&r=1 HTTP/1.1
> User-Agent: curl/7.37.1
> Host: www.eclipse.org
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Tue, 28 Apr 2015 09:09:31 GMT
* Server Apache is not blacklisted
< Server: Apache
< Cache-control: no-cache, max-age=86400
< Location: http://mirrors.uniri.hr/eclipse//technology/epp/downloads/release/luna/R/eclipse-standard-luna-R-linux-gtk-x86_64.tar.gz.md5
< Expires: Wed, 29 Apr 2015 09:09:31 GMT
< Access-Control-Allow-Origin: http://eclipse.org ; https://eclipse.org ; http://www.eclipse.org ; https://www.eclipse.org
< Access-Control-Allow-Methods: GET
< X-NodeID: (null)
< X-Frame-Options: SAMEORIGIN
< Vary: Accept-Encoding
< Content-Length: 0
< Content-Type: text/html; charset=utf-8
<

This URL will actually redirect to a chosen proxy, presumably near to you. Try running the same command as me (curl) and see what happens. It's possible the proxy chosen for you doesn't have the file; in that case this should be reported to Eclipse.

@leogaggl

This comment has been minimized.

leogaggl commented Apr 28, 2015

Thanks for the quick reply ! I agree that some more shorter error message would be nice !

Personally I would find it usefully if it actually includes the URL that is throwing the 404 - as it makes troubleshooting a lot easier.

Turns out that this is a problem with Eclipse's geographic mirrors. The mirror I am getting is http://mirror.aarnet.edu.au/pub/eclipse/technology/epp/downloads/release/luna/R/eclipse-standard-luna-R-linux-gtk-x86_64.tar.gz.md5 - which actually throws the 404.

Not sure how you guys could prevent that. Probably similar to the APT retry mechanism that it tries the next mirror if it returns a 404. Or default to the Eclipse Main DL site perhaps ?

Thanks for your help - keep up the great work !

@leogaggl

This comment has been minimized.

leogaggl commented Apr 29, 2015

Been re-trying this a few times, but unfortunately the AARNET mirror seems not to sync that file properly and returns a 404.

I might have to override the URL in /usr/lib/python3/dist-packages/umake/frameworks/ide.py

@didrocks

This comment has been minimized.

Member

didrocks commented Apr 30, 2015

Please contact the eclipse foundation for the mirror, we don't have a list of available mirrors, it's all done server-side and I don't really fancy a duplicated version (because of the maintainance cost: it's going to break).

On the other issue (error showing up on the stacktrace), it happened that an annotation was missing on the download function (@MainLoop.in_mainloop_thread), so 2 exceptions were raised in a row if the download doesn't complete and you didn't get the nice wrapping. This only happened in one framework: the eclipse ide one, congrats for finding it :p

You will get something like:
ERROR: An error occurred while downloading : 404 Client Error: Not Found

Fixing it in trunk (referencing and renaming this bug report).

@didrocks didrocks changed the title from Eclipse install errror - clean install on 15.04 Vivid to Print a better Eclipse download error on server-side error. Apr 30, 2015

didrocks added a commit that referenced this issue Apr 30, 2015

Print a better Eclipse download error on server-side issue
This fixes bug #90, where the @MainLoop.in_mainloop_thread annotation was
missing. We didn't return to the mainloop, consequently, 2 exceptions were
raised in a row to quit the application in the cli flavor instead of printing
the nicely wrapped error message.

@didrocks didrocks closed this Apr 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment