Skip to content
New issue

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

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

Already on GitHub? # to your account

Circe hangs when connecting to chat server #226

Open
diegueins680 opened this issue Oct 9, 2015 · 22 comments
Open

Circe hangs when connecting to chat server #226

diegueins680 opened this issue Oct 9, 2015 · 22 comments
Labels
Milestone

Comments

@diegueins680
Copy link

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 jorgenschaefer added this to the v2.1 milestone Oct 10, 2015
@jorgenschaefer
Copy link
Collaborator

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
Copy link

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
Copy link
Collaborator

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
Copy link

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
Copy link
Collaborator

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

@fleimgruber
Copy link

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
Copy link
Collaborator

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!

@jorgenschaefer jorgenschaefer modified the milestones: v2.1, v2.2 Nov 29, 2015
@jorgenschaefer jorgenschaefer modified the milestones: v2.3, v2.2 Feb 26, 2016
@jorgenschaefer jorgenschaefer modified the milestones: v2.4, v2.3 May 12, 2016
@ghost
Copy link

ghost commented Aug 4, 2016

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
Copy link
Collaborator

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
Copy link

ghost commented Aug 5, 2016

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

@jorgenschaefer
Copy link
Collaborator

Sounds good to me.

@jorgenschaefer jorgenschaefer modified the milestones: v2.4, v2.5 Feb 25, 2017
@ghost
Copy link

ghost commented Apr 29, 2017

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

@jorgenschaefer jorgenschaefer modified the milestones: v2.5, v2.6 May 28, 2017
@jorgenschaefer jorgenschaefer removed this from the v2.5 milestone May 28, 2017
@puffnfresh
Copy link

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

@ghost
Copy link

ghost commented Jun 1, 2017

@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
Copy link

ghost commented Jul 20, 2017

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

@ghost
Copy link

ghost commented Jul 20, 2017

@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
Copy link

ghost commented Jul 20, 2017

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

@ghost
Copy link

ghost commented Jul 20, 2017

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

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

@fleimgruber
Copy link

@mekeor

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

I think this was mentioned in #226 (comment)

@jorgenschaefer jorgenschaefer modified the milestones: v2.6, v2.7 Sep 29, 2017
@jorgenschaefer jorgenschaefer modified the milestones: v2.7, v2.8 Jan 28, 2018
@wasamasa
Copy link
Collaborator

wasamasa commented Sep 28, 2020

Can you still reproduce this after the fix in #377 ? Note that it applies for Emacs 26.1 or newer.

@hendursaga
Copy link

This seems related to my own issue at #405, in that, there really isn't any helpful clues as to what might be wrong.

@wasamasa
Copy link
Collaborator

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants