emacs-circe / circe

Circe, a Client for IRC in Emacs
GNU General Public License v3.0
391 stars 51 forks source link

Circe hangs when connecting to chat server #226

Open diegueins680 opened 8 years ago

diegueins680 commented 8 years ago

When trying to connect, circe hangs with the following message: *\ Connecting...

I ran "strace -p $(pidof emacs) -e network -o circeDebug", while trying to connect to Freenode, and here is what's in circeDebug: http://pastebin.com/YVyMuSwS

Some info that might help: emacs --version GNU Emacs 24.5.2 Copyright (C) 2015 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING.

circe 20151009.410 installed

uname -a Linux jet-nixos 4.1.8 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 GNU/Linux

cat /etc/*-release NAME=NixOS ID=nixos VERSION="16.03pre69762.e916273 (Emu)" VERSION_ID="16.03pre69762.e916273" PRETTY_NAME="NixOS 16.03pre69762.e916273 (Emu)" HOME_URL="http://nixos.org/"

lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 2 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 70 Model name: Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz Stepping: 1 CPU MHz: 2119.921 CPU max MHz: 3200.0000 CPU min MHz: 800.0000 BogoMIPS: 3990.68 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 6144K L4 cache: 131072K NUMA node0 CPU(s): 0-7

jorgenschaefer commented 8 years ago

Hello, and thanks for the report! This sounds very weird.

Could you set irc-debug-log to a true value, try to connect again, and see if the *IRC Protocol ...* buffer contains something that might be help figuring out what's going on here?

fleimgruber commented 8 years ago

Circe 2.0-f6522a8 GNU Emacs 24.5.1

I am also getting

*** Connecting...
> 

in the irc.freenode.net:6667 buffer. With irc-debug-log to t, I get

E: "conn.failed"

in the IRC Protocol ... buffer.

jorgenschaefer commented 8 years ago

Hm. conn.failed means that Emacs tried to connect to that address, but it failed in some form (the connection sentinel received a "failed" argument).

This is the only content of said buffer? And are you using TLS or not?

fleimgruber commented 8 years ago

Yes, this is the only content of IRC Protocol .... I am using TLS. The relevant config is

(use-package circe
  :ensure t
  :pin melpa-stable
  :config
  (progn
    (when (file-exists-p "~/.ircpass")
      (load (expand-file-name "~/iercpass")))
    (setq irc-debug-log t
          circe-network-options
          `(("Freenode"
             :tls t
             :nick "auser"
             :port 6667
             :sasl-username "auser"
             :channels ("#emacs" "#org-mode" "#nixos")
             :sasl-password ,freenode-auser-pass)))))
jorgenschaefer commented 8 years ago

I don't think Freenode supports TLS on port 6667 – could you try 6697 and see if that works?

fleimgruber commented 8 years ago

Well, thanks for the shove... I think this was a remnant of work/home config due to ports closed by IT department and the switch to circe 2.0.

Probably also the case for @diegueins680.

jorgenschaefer commented 8 years ago

Glad it works now! :-) Still, I consider it a bug that Circe is not a bit more verbose about what's going on here. So thanks for the report and helping to debug what's going on here!

ghost commented 8 years ago

I can't connect to IRC servers such as irc.gnome.org on port 6697 (SSL/TLS) with circe. Steps to reproduce:

  1. M-x circe
  2. Network or host: irc.gnome.org
  3. Port: 6697

Output:

*** Connecting...
*** Connecting...
*** Connecting...
*** Connecting...
*** Connecting...
*** Connecting...
> 

Same problem when connecting to irc.mozilla.org on port 6697.

Instead I can successfully connect to Freenode, but for that one I use a configuration file:

(setq circe-network-options
      '(("Freenode"
     :host "irc.freenode.net"
         :tls t
     :port 6697
         :nick "fturco"
         :nickserv-nick "fturco"
         :nickserv-password "xxxxxxxxxx")))

I'm running GNU Emacs 24.5.1 on the Parabola GNU/Linux-libre distribution. Circe version is 2.3.

jorgenschaefer commented 8 years ago

Port 6697 usually is a TLS port. IRC (and thus Circe) default to plain text. I'm afraid you have to use a network configuration with :tls t to connect to port 6697 on these networks, or use a non-TLS port.

Does this help?

ghost commented 8 years ago

I have something like ERC in mind, with its erc and erc-tls commands. What about a circe-tls command?

jorgenschaefer commented 8 years ago

Sounds good to me.

ghost commented 7 years ago

I'm also running NixOS and I'm also experiencing Circe hanging when connecting to Freenode using TLS on port 6697.

What am I missing? My configuration works on other Linux distributions...

puffnfresh commented 7 years ago

@mekeor I'm also having problems on NixOS. Did you find a solution?

ghost commented 7 years ago

@puffnfresh Unfortunately, I didn't find a solution (also because I'm not using NixOS anymore). (More precisely, I don't remember if I found a solution.)

But let me and others know, if/when you find a solution! ;)

ghost commented 7 years ago

Just in case, neitheropenssl nor gnutls not installed in NixOS by default. So I just need install on of them.

ghost commented 7 years ago

@tjikini So, installing openssl or gnutls will solve this problem? If so, we should close this issue, I guess? Because it's not an issue with Circe itself then, right?

ghost commented 7 years ago

Well, maybe it's a bug that Circe doesn't tell us what's going wrong here.

ghost commented 7 years ago

@tjikini So, installing openssl or gnutls will solve this problem?

I can not speak for others, but for me - yes.

fleimgruber commented 7 years ago

@mekeor

Well, maybe it's a bug that Circe doesn't tell us what's going wrong here.

I think this was mentioned in https://github.com/jorgenschaefer/circe/issues/226#issuecomment-148998759

wasamasa commented 3 years ago

Can you still reproduce this after the fix in https://github.com/jorgenschaefer/circe/issues/377 ? Note that it applies for Emacs 26.1 or newer.

hendursaga commented 2 years ago

This seems related to my own issue at https://github.com/emacs-circe/circe/issues/405, in that, there really isn't any helpful clues as to what might be wrong.

wasamasa commented 2 years ago

That is pure speculation, only OP can know whether that is the case or not. There have been changes in Circe to switch from an external TLS process to in-process TLS, which avoids one major silent failure cases (the helper program not providing the expected output), but not all of them. Given that yours is specific to servers with an expired certificate and Freenode isn't one of those, I have my doubts.