"Fatal error: The TLS connection was non-properly terminated" after adding Marmalade repo
When I do M-x list-packages RET after enabling the Marmalade repo, I get the following output in *Messages*:
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:80 [2 times]
Contacting host: marmalade-repo.org:443
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.
Running package-refresh-contents instead of list-packages produces the same result.
Steps to reproduce:
- Start Emacs via
emacs -Q. - Evaluate:
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "https://marmalade-repo.org/packages/") t)
-
M-x
list-packagesRET -
C-h e to see full output in
*Messages*buffer.
Specs:
- GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3)
-
gnutls3.3.9-1
Yeah. I've had this from one other user so far. This was the packaged emacs, right?
I think it works. I'm not sure where the message is coming from. I am investigating.
This is causing package uploads and downloads to fail.
I have the same symptoms with gnutls 3.3.8-3 on Debian testing.
And here's another report from a user trying to upload: http://hastebin.com/raw/weqazocuyi
Same problem:
emacs-24.4-2.fc21.x86_64
gnutls-3.3.10-1.fc21.x86_64
(fedora 21 beta)
Running:
gnutls-cli-debug -V -d 100 marmalade-repo.org
...shows no actual errors, bot both this and https://www.ssllabs.com/ssltest/analyze.html?d=marmalade-repo.org indicate that session caching is disabled, which seems like an odd configuration.
Seeing the same problem here:
- GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, Carbon Version 157 AppKit 1343.16) (Yamamoto Mitsuharus Mac port)
- gnutls 3.3.10
Same problem on Windows using installation instructions as per marmalade-repo.org homepage. Downloaded gnutls-3.3.11-w32.zip from gnutls.org. Using chocolatey install of emacs (GNU Emacs 24.4.1 (i686-pc-mingw32) of 2014-10-24 on LEG570)
Thankfully, this doesn't seem to stop package-list-packages or installing from marmalade.
Hum.
We've been able to get Debian to work. I've never seen the problem on a Mac, that's new to me. Windows should work if you set the TLS stack up as per the details.
So there's lots of variation here.
Just to confirm, has everyone tried using just HTTP for the archives?
Nic Ferrier [email protected] writes:
Hum.
We've been able to get Debian to work. I've never seen the problem on a Mac, that's new to me. Windows should work if you set the TLS stack up as per the details.
So there's lots of variation here.
Just to confirm, has everyone tried using just HTTP for the archives?
HTTP access (forwarded to https?) to marmalade seems to for me from Debian, although I still get the message
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.
Yeah, I don't know why that error happens. When you change the source to HTTP you're avoiding the most egregious Emacs bug. Everything except the initial request is done with tls. I don't know why the error message happens. I still haven't had time to trace the problem.
FWIW I'm convinced it's with the rewrite of the package code which was unnecessary as it was flawed.
Hello, I can report that the problem occurs using both HTTP and HTTPS protocols in debian testing. I've been using Ubuntu 14.10 recently with emacs and the problem didn't occured. Ubuntu has package with version: 3.2.16-1ubuntu2.1. Maybe installing that version of gnutls-bin can help? But it can be wrong idea acording to that gnutls is a security package.
It's very odd. I am still trying to narrow it down. I just don't have much time in which to do it.
It's very frustrating. I've made http://marmalade.ferrier.me.uk for those of you experiencing this problem
This obviously compromises the https but I can't see another way right now.
Same problem, but packages seem to update.
I experience the same bug - Emacs 24.4.1 on opensuse 12.3.
(Adding to the confusion - I get this error - but installation and updating of packages works)
I also experience this bug - Emacs 24.4.1 on Arch Linux.
Ditto: fully updated ("pacman -Syu") Arch LInux, GNU Emacs 24.4.1
Linux xxxx 3.18.2-2-ARCH #1 SMP PREEMPT Fri Jan 9 07:37:51 CET 2015 x86_64 GNU/Linux
Yeah also have the same problem, Emacs 24.4.1 on Archlinux and 3.18 kernel
Occurs both with http and https... gnutls 3.3.12 Arch Linux kernel version 3.18.6-1-ARCH GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.7) of 2015-01-17 on bisson
Have same error on Debian Sid. After some time Emacs crashed.
Updating libgnutls packages fix error:
$ tail /var/log/apt/history.log
Start-Date: 2015-02-19 19:00:54
Upgrade: libgnutls-deb0-28:i386 (3.3.8-3, 3.3.8-5), libgnutls26:i386 (2.12.20-1, 2.12.23-18), libgnutls-openssl27:i386 (2.12.20-1, 3.3.8-5)
End-Date: 2015-02-19 19:01:00
I'm also getting this error trying to refresh the package list. Running Emacs 24.4.1 on Ubuntu 14.04 with 3.13.0-45-generic kernel.
I also get this error with GNU Emacs 24.4.1 (i686-pc-mingw32) I get NO errors with GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) Same gnutls was used in both instances: gnutls-3.3.12-w32
I also get NO errors with: http://sourceforge.net/projects/emacsbinw64/ (it comes with its own gnutls)
Anyone who wants the secret "no ssl" version of marmalade please mail me privately. Clearly this is not an issue that is going to be fixed quickly.
More diagnostic information that is interesting: marmalade is hosted in a docker with emacs 24.3.1. Maybe for some people that makes a difference. I talk to it all the time with marmalade 24.4.1 though with libgnutls26 which is from package libgnutls26:amd63 - 2.12.23-12ubuntu2.1
So perhaps it's a problem with gnutls 3
OK it turned out I couldn't upgrade packages because for some reason the ~/.emacs.d/elpa and ~/.emacs.d/var directories were owned by root. I chowned to my user and now it works again. It turns out the TLS errors were not causing the problem after all! (They still show up.)
Go amd63, go! Let's see how far down it can get, just 31 more to regress to 32 bits.. : -)
Just built and installed Emacs 24.4 on Ubuntu Trusty and am getting this error. Can't even do list-packages. Package management is completely non-functional because of this error. :(
Overriding package-menu--print-info with paradox--print-info
Overriding package-menu--generate with paradox--generate-menu
Overriding truncate-string-to-width with paradox--truncate-string-to-width
Overriding package-menu-mode with paradox-menu-mode
Contacting host: raw.github.com:443
Contacting https://api.github.com/user/starred?per_page=100
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:80
Contacting host: marmalade-repo.org:80 [2 times]
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.
Contacting host: melpa.milkbox.net:80
paradox--package-star-count: Wrong type argument: listp,
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated. [2 times]
libgnutls26:
Installed: 2.12.23-12ubuntu2.1
It sucks. I'm really sorry. It doesn't affect the http version though does it?
Same error message here. Emacs 24.4 on Fedora 21. It doesn't seem to have an effect for me, though.
I'm sorry, I discovered that the problem I was having was not caused by these errors. These errors started happening when I upgraded to Emacs 24.4, but they don't seem to cause any actual problems, they just show the error message in the minibuffer.
Same here Emacs 24.5.1 on Ubuntu 15.10 I build emacs from source