package-list-packages I get the following errors:
Failed to download `gnu' archive. gnutls.c:  (Emacs) fatal error: The TLS connection was non-properly terminated.
I am running Emacs 24.4 on Windows. Until this week package downloads were happening normally.
I've tried this guide on setting up Emacs-GnuTLS-Windows. I tried running this code from the See if it works section:
(condition-case e (delete-process (gnutls-negotiate :process (open-network-stream "test" nil "www.google.com" 443) :hostname "www.google.com" :verify-error t)) (error e))
I do get
nil inserted into the buffer, with no validation error, which according to the article is a sign of success. However, if I set
(setq gnutls-log-level 2) and run the code again, I get the following output.
gnutls.c:  (Emacs) allocating credentials gnutls.c:  (Emacs) allocating x509 credentials gnutls.c:  (Emacs) using default verification flags gnutls.c:  (Emacs) setting the trustfile: c:/gnutls/cacert.pem gnutls.c:  (Emacs) gnutls callbacks gnutls.c:  (Emacs) gnutls_init gnutls.c:  (Emacs) got non-default priority string: NORMAL gnutls.c:  (Emacs) setting the priority string gnutls.c: [audit] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data gnutls.c:  (Emacs) non-fatal error: Resource temporarily unavailable, try again. [1428 times] gnutls.c:  (Emacs) Deallocating x509 credentials
So that seems a bit odd. According to this mailing list, the error isn't usually harmful. Nevertheless, I still cannot download
How can I restore normal package fetching?
Although there are some suggestions on GitHub that the error message is spurious,
gnu still fails to fetch. I confirmed this by checking local package versions with recently updates to the online repository.
I can no longer reproduce the issue after upgrading to Emacs 24.5.