elmarmalade icon indicating copy to clipboard operation
elmarmalade copied to clipboard

"Fatal error: The TLS connection was non-properly terminated" after adding Marmalade repo

Open itsjeyd opened this issue 11 years ago • 60 comments

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:

  1. Start Emacs via emacs -Q.
  2. Evaluate:
(require 'package)
(add-to-list 'package-archives
             '("marmalade" . "https://marmalade-repo.org/packages/") t)
  1. M-x list-packages RET
  2. 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)
  • gnutls 3.3.9-1

itsjeyd avatar Oct 26 '14 12:10 itsjeyd

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.

nicferrier avatar Oct 26 '14 12:10 nicferrier

This is causing package uploads and downloads to fail.

nicferrier avatar Oct 26 '14 13:10 nicferrier

I have the same symptoms with gnutls 3.3.8-3 on Debian testing.

bremner avatar Oct 26 '14 13:10 bremner

And here's another report from a user trying to upload: http://hastebin.com/raw/weqazocuyi

nicferrier avatar Oct 26 '14 13:10 nicferrier

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.

groks avatar Nov 24 '14 15:11 groks

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

arnested avatar Nov 26 '14 21:11 arnested

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.

cristobalito avatar Dec 21 '14 23:12 cristobalito

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?

nicferrier avatar Dec 28 '14 11:12 nicferrier

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.

bremner avatar Dec 28 '14 12:12 bremner

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.

nicferrier avatar Dec 28 '14 22:12 nicferrier

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.

paweldrozanski avatar Jan 03 '15 16:01 paweldrozanski

It's very odd. I am still trying to narrow it down. I just don't have much time in which to do it.

nicferrier avatar Jan 04 '15 14:01 nicferrier

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.

nicferrier avatar Jan 09 '15 20:01 nicferrier

Same problem, but packages seem to update.

Profpatsch avatar Jan 13 '15 22:01 Profpatsch

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)

Knusper avatar Jan 17 '15 13:01 Knusper

I also experience this bug - Emacs 24.4.1 on Arch Linux.

dschrempf avatar Jan 17 '15 13:01 dschrempf

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

pw4ever avatar Jan 18 '15 02:01 pw4ever

Yeah also have the same problem, Emacs 24.4.1 on Archlinux and 3.18 kernel

AndreaCrotti avatar Feb 01 '15 16:02 AndreaCrotti

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

voobscout avatar Feb 16 '15 18:02 voobscout

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

gavenkoa avatar Feb 19 '15 17:02 gavenkoa

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.

kzar avatar Feb 20 '15 09:02 kzar

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)

tom10d avatar Feb 21 '15 15:02 tom10d

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

nicferrier avatar Feb 22 '15 17:02 nicferrier

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.)

kzar avatar Feb 24 '15 16:02 kzar

Go amd63, go! Let's see how far down it can get, just 31 more to regress to 32 bits.. : -)

deepfire avatar Mar 06 '15 08:03 deepfire

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

alphapapa avatar Mar 10 '15 21:03 alphapapa

It sucks. I'm really sorry. It doesn't affect the http version though does it?

nicferrier avatar Mar 15 '15 14:03 nicferrier

Same error message here. Emacs 24.4 on Fedora 21. It doesn't seem to have an effect for me, though.

e-monson avatar Mar 17 '15 03:03 e-monson

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.

alphapapa avatar Mar 22 '15 01:03 alphapapa

Same here Emacs 24.5.1 on Ubuntu 15.10 I build emacs from source

tshemeng avatar Jun 16 '15 08:06 tshemeng