2

When I run GET http://localhost/ with restclient.el, I get the following error in the *Messages* buffer:

GET http://localhost:80/]
Contacting host: localhost:80
error in process sentinel: restclient-http-handle-response: peculiar error: "failed with code 111
", :host, "localhost", :service, 80
error in process sentinel: peculiar error: "failed with code 111
", :host, "localhost", :service, 80

Note the repeated error on the single invocation.

When I run (setq debug-on-message "failed with code 111") I get the following backtrace:

Debugger entered--Lisp error: "error in process sentinel: peculiar error: \"failed with code 111
\", :host, \"localhost\", :service, 80"
  recursive-edit()
  debug(error "error in process sentinel: peculiar error: \"failed with code 111\n\", :host, \"localhost\", :service, 80")

What is code 111, and how can I fix the failure?

Constantine
  • 9,072
  • 1
  • 34
  • 49
Matthew Piziak
  • 5,958
  • 3
  • 29
  • 77

1 Answers1

3

Error 111 refers to Linux system error ECONNREFUSED (connection refused), defined in errno.h.

This is not a problem with Emacs. Rather, the socket at localhost:80 is refusing the connection, possibly because no web server is running.

Matthew Piziak
  • 5,958
  • 3
  • 29
  • 77