* proxy returning empty hits only in emacs
@ 2015-03-12 15:16 Sam Halliday
2015-03-12 15:22 ` Sam Halliday
0 siblings, 1 reply; 3+ messages in thread
From: Sam Halliday @ 2015-03-12 15:16 UTC (permalink / raw)
To: help-gnu-emacs
Hi all,
I installed Debian Jessie over Ubuntu Vervet following a kernel update disaster.
However, following the change emacs (both 24.4) is unable to make use of my proxy.
I have a CNTLM proxy on localhost which does not require additional authentication, e.g.
export http_proxy=http://localhost:3128/
export https_proxy=https://localhost:3128/
export no_proxy="localhost,*.my-company.com"
export ftp_proxy=${http_proxy}
which is picked up by the X environment, and emacs appears to use it automatically because issuing a `(package-refresh-contents)` gives
Importing package-keyring.gpg...done
Using a proxy for http...
Contacting host: localhost:3128
Failed to download `gnu' archive.
Failed to download `melpa' archive.
nil
However I can't get any more debugging information than this, despite turning on (setq debug-on-error t). I'd like to know *why* it is failing so that I can fix it.
I also tried running url-copy-file:
(url-copy-file "http://google.com/" "google.html")
but this simply creates an empty file.
The proxy is working fine for everything else on the system (and, except for a few special cases, everything picks up the envvars).
I've even tried this (which is pretty pointless, because emacs is clearly using the correct proxy):
(setq url-proxy-services
'(("no_proxy" . "^\\(localhost\\|10.*\\)")
("http" . "localhost:3128")
("https" . "localhost:3128")))
as expected, it changes nothing.
Is there something else I'm missing?
Best regards,
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: proxy returning empty hits only in emacs
2015-03-12 15:16 proxy returning empty hits only in emacs Sam Halliday
@ 2015-03-12 15:22 ` Sam Halliday
2015-03-12 16:23 ` Sam Halliday
0 siblings, 1 reply; 3+ messages in thread
From: Sam Halliday @ 2015-03-12 15:22 UTC (permalink / raw)
To: help-gnu-emacs
Updated with more info below...
On Thursday, 12 March 2015 15:17:01 UTC, Sam Halliday wrote:
> Hi all,
>
> I installed Debian Jessie over Ubuntu Vervet following a kernel update disaster.
>
> However, following the change emacs (both 24.4) is unable to make use of my proxy.
>
> I have a CNTLM proxy on localhost which does not require additional authentication, e.g.
>
> export http_proxy=http://localhost:3128/
> export https_proxy=https://localhost:3128/
> export no_proxy="localhost,*.my-company.com"
> export ftp_proxy=${http_proxy}
>
> which is picked up by the X environment, and emacs appears to use it automatically because issuing a `(package-refresh-contents)` gives
>
> Importing package-keyring.gpg...done
> Using a proxy for http...
> Contacting host: localhost:3128
> Failed to download `gnu' archive.
> Failed to download `melpa' archive.
> nil
>
> However I can't get any more debugging information than this, despite turning on (setq debug-on-error t). I'd like to know *why* it is failing so that I can fix it.
>
> I also tried running url-copy-file:
>
> (url-copy-file "http://google.com/" "google.html")
>
> but this simply creates an empty file.
>
> The proxy is working fine for everything else on the system (and, except for a few special cases, everything picks up the envvars).
>
> I've even tried this (which is pretty pointless, because emacs is clearly using the correct proxy):
>
> (setq url-proxy-services
> '(("no_proxy" . "^\\(localhost\\|10.*\\)")
> ("http" . "localhost:3128")
> ("https" . "localhost:3128")))
>
> as expected, it changes nothing.
>
> Is there something else I'm missing?
>
> Best regards,
> Sam
Using
(defun print-url (url)
(url-retrieve url (lambda (a) (print a))))
(print-url "http://google.com")
I get the error
Contacting host: localhost:3128
#<buffer *http localhost:3128*-981030>
(:error (error connection-failed "failed with code 111
" :host "localhost" :service 3128))
but a telnet session to localhost:3128 is perfectly fine.
Very bizarre! Ideas welcome.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: proxy returning empty hits only in emacs
2015-03-12 15:22 ` Sam Halliday
@ 2015-03-12 16:23 ` Sam Halliday
0 siblings, 0 replies; 3+ messages in thread
From: Sam Halliday @ 2015-03-12 16:23 UTC (permalink / raw)
To: help-gnu-emacs
Argh! 'twas emacs bug #17976
Debian defines ::1 as localhost and the ip6 equivalents. Emacs (in particular) doesn't like this, but everything else is ok with it.
Workaround is to remove the mapping in /etc/hosts
On Thursday, 12 March 2015 15:22:30 UTC, Sam Halliday wrote:
> Updated with more info below...
>
> On Thursday, 12 March 2015 15:17:01 UTC, Sam Halliday wrote:
> > Hi all,
> >
> > I installed Debian Jessie over Ubuntu Vervet following a kernel update disaster.
> >
> > However, following the change emacs (both 24.4) is unable to make use of my proxy.
> >
> > I have a CNTLM proxy on localhost which does not require additional authentication, e.g.
> >
> > export http_proxy=http://localhost:3128/
> > export https_proxy=https://localhost:3128/
> > export no_proxy="localhost,*.my-company.com"
> > export ftp_proxy=${http_proxy}
> >
> > which is picked up by the X environment, and emacs appears to use it automatically because issuing a `(package-refresh-contents)` gives
> >
> > Importing package-keyring.gpg...done
> > Using a proxy for http...
> > Contacting host: localhost:3128
> > Failed to download `gnu' archive.
> > Failed to download `melpa' archive.
> > nil
> >
> > However I can't get any more debugging information than this, despite turning on (setq debug-on-error t). I'd like to know *why* it is failing so that I can fix it.
> >
> > I also tried running url-copy-file:
> >
> > (url-copy-file "http://google.com/" "google.html")
> >
> > but this simply creates an empty file.
> >
> > The proxy is working fine for everything else on the system (and, except for a few special cases, everything picks up the envvars).
> >
> > I've even tried this (which is pretty pointless, because emacs is clearly using the correct proxy):
> >
> > (setq url-proxy-services
> > '(("no_proxy" . "^\\(localhost\\|10.*\\)")
> > ("http" . "localhost:3128")
> > ("https" . "localhost:3128")))
> >
> > as expected, it changes nothing.
> >
> > Is there something else I'm missing?
> >
> > Best regards,
> > Sam
>
>
> Using
>
> (defun print-url (url)
> (url-retrieve url (lambda (a) (print a))))
>
> (print-url "http://google.com")
>
> I get the error
>
> Contacting host: localhost:3128
> #<buffer *http localhost:3128*-981030>
> (:error (error connection-failed "failed with code 111
> " :host "localhost" :service 3128))
>
> but a telnet session to localhost:3128 is perfectly fine.
>
> Very bizarre! Ideas welcome.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-12 16:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-12 15:16 proxy returning empty hits only in emacs Sam Halliday
2015-03-12 15:22 ` Sam Halliday
2015-03-12 16:23 ` Sam Halliday
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).