From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: izzy.yichao.cai@gmail.com Newsgroups: gmane.emacs.help Subject: Re: Ubuntu 16.04 server --- Contacting host: elpa.gnu.org:80 when package-refresh-contents Date: Thu, 18 Jan 2018 18:28:29 -0800 (PST) Message-ID: <25bfc0c0-be6e-477b-abd1-f2d45bf43df2@googlegroups.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1516328934 15649 195.159.176.226 (19 Jan 2018 02:28:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 Jan 2018 02:28:54 +0000 (UTC) Injection-Date: Fri, 19 Jan 2018 02:28:29 +0000 User-Agent: G2/1.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 19 03:28:50 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecMQ4-0003Ib-Nu for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Jan 2018 03:28:40 +0100 Original-Received: from localhost ([::1]:44962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecMS4-0004Lu-L5 for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jan 2018 21:30:44 -0500 X-Received: by 10.55.25.37 with SMTP id k37mr32604231qkh.59.1516328909887; Thu, 18 Jan 2018 18:28:29 -0800 (PST) X-Received: by 10.31.128.137 with SMTP id b131mr545422vkd.7.1516328909641; Thu, 18 Jan 2018 18:28:29 -0800 (PST) Original-Path: usenet.stanford.edu!i22no4387924qta.1!news-out.google.com!e39ni1614qtk.1!nntp.google.com!s47no1382597qta.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Original-Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=137.132.217.208; posting-account=JCkVWQkAAABkcF94rL6x09xRDEW4g_cI Original-NNTP-Posting-Host: 137.132.217.208 Original-Xref: usenet.stanford.edu gnu.emacs.help:221664 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115781 Archived-At: to...@tuxteam.de=E6=96=BC 2018=E5=B9=B41=E6=9C=8817=E6=97=A5=E6=98=9F=E6=9C= =9F=E4=B8=89 UTC+8=E4=B8=8B=E5=8D=888=E6=99=8212=E5=88=8642=E7=A7=92=E5=AF= =AB=E9=81=93=EF=BC=9A > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On Wed, Jan 17, 2018 at 03:56:34AM -0800, izzy.yichao.cai@gmail.com wrote= : > > Hi folks, > >=20 > > I have tried to install elpy in emacs (24.5.1) on my server which is ru= nning Ubuntu 16.04. > >=20 > > When I run M-x package-refresh-contents, emacs successfully connected t= o stable.melpa.org:443.=20 > > After that, it was hanged on "Contacting host: elpa.gnu.org:80". I am p= retty sure that I am not behind proxy.=20 >=20 > I don't know about this... >=20 > > Then I tried to ping this host and this is what I got: > > me@server:~$ ping elpa.gnu.org:80 > > ping: unknown host elpa.gnu.org:80 >=20 > ...but this won't work. Indeed, "elpa.gnu.org:80" isn't a host name. > Try pinging "elpa.gnu.org". It's there and replies to pings :) >=20 > > However, pinging other websites is normal. I also tried to access this = (elpa.gnu.org:80) on my local computer and it is accessible. >=20 > You don't ping websites -- you ping hosts. Actually, elpa.gnu.org > is serving a website at port 80 currently. So the URL > http://elpa.gnu.org:80/ should get you something (since port 80 > is the default for http anyway, you can leave it out). >=20 > That said, elpa.gnu.org is also serving https, so I'd strongly > recommend going with https://elpa.gnu.org/ >=20 > Cheers > - -- tom=C3=A1s > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.12 (GNU/Linux) >=20 > iEYEARECAAYFAlpfPa0ACgkQBcgs9XrR2kZ+5wCfUj5LUoKJbu+ty2kjd6fJCKjK > d0gAnis0HbxOkzP0n579SeUupTJUFEAa > =3D136e > -----END PGP SIGNATURE----- Hi Tomas, Basically, I've been following the instruction from elpy github repo for in= stallation. (https://github.com/jorgenschaefer/elpy) In my .emacs file. I've added the following: ``` (require 'package) (add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/")) (package-initialize) (elpy-enable) ``` So, I am using https, which is a safe practice as Dan pointed out. How did emacs decide to connect to elpa.gnu.org? Is this a default of emacs= ? Because I never included the elpa.gnu.org link in my .emacs file or evalu= ated it in my buffer. (That means I have no choice in using https or http. = :( It just happened and I don't know why.) > ...but this won't work. Indeed, "elpa.gnu.org:80" isn't a host name. > Try pinging "elpa.gnu.org". It's there and replies to pings :) Yep, I tried to ping "elpa.gnu.org" and it did replied. ------------------ **ISSUE UPDATE**: ------------------ This is an update on the issue. So, I have successfully installed eply in my emacs right now! However, this= remains mysterious to me as in how it worked out. In my first post, emacs was hanged on "Contacting host: elpa.gnu.org:80". E= xiting emacs here and running package-install resulted in could not find th= e elpy package.=20 Since I am running emacs on my server, I decided to let it run in hope that= it would get connected anyhow.=20 After two days, when I come back to it, it's still hanged. So I quite emacs= (C-x C-c) and restart it. Then, I run package-install and elpy now can be = installed. Then, I tried package-refresh-content again but it still got hanged. Do you have any idea how this might happen? Thank you so much! Best regards, Yichao