Details
Description
When set, Moxi honors http_proxy when attempting to connect to 127.0.0.1:8091.
In the example below, 10.12.78.99 is the ip address of my http proxy, which I enabled to download and upgrade to CB 2.1.0. As it was still set at cluster start time, Moxi began attempting to honor it, consequently blocking all read and write attempts, even though the cluster was otherwise indicated to be healthy.
[pid 27410] socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 45
[pid 27410] setsockopt(45, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
[pid 27410] fcntl(45, F_GETFL) = 0x2 (flags O_RDWR)
[pid 27410] fcntl(45, F_SETFL, O_RDWR|O_NONBLOCK) = 0
[pid 27410] connect(45,
[pid 27410] poll([{fd=45, events=POLLOUT}], 1, 1000) = 1 ([{fd=45, revents=POLLOUT}])
[pid 27410] getsockopt(45, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
[pid 27410] getpeername(45, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("10.12.78.99")}
, [16]) = 0
[pid 27410] getsockname(45,
, [16]) = 0
[pid 27410] sendto(45, "GET http://127.0.0.1:8091/pools/"..., 171, MSG_NOSIGNAL, NULL, 0) = 171
[pid 27410] poll([
[pid 27410] poll([{fd=45, events=POLLIN|POLLPRI}
], 1, 0) = 0 (Timeout)
[pid 27410] poll([
[pid 27410] poll([{fd=45, events=POLLIN|POLLPRI}
], 1, 0) = 1 ([
{fd=45, revents=POLLIN}])
[pid 27410] recvfrom(45, "HTTP/1.0 504 Gateway Time-out\r\nS"..., 16384, 0, NULL, NULL) = 1616
Issuing 'unset http_proxy' and restarting the cluster / killing moxi corrects the issue.
The error is mentioned in the babysitter logs:
babysitter.1:[ns_server:info,2013-06-27T11:38:19.083,babysitter_of_ns_1@127.0.0.1:<0.91.0>:ns_port_server:log:168]
<0.91.0>: 2013-06-27 11:38:20: (agent_config.c.423) ERROR: parse JSON failed, from REST server: http://127.0.0.1:8091/pools/default/bucketsStreaming/Atlas, <!DOCTYPE html PUBLIC "//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta http-equiv="Content-Type" CONTENT="text/html; charset=utf-8"> <title>ERROR: The requested URL could not be retrieved</title> <style type="text/css"><!- %l body :lang(fa)
:lang(he)
{ direction: rtl; float: right; }--></style> </head><body> <div id="titles"> <h1>ERROR</h1> <h2>The requested URL could not be retrieved</h2> </div> <hr> <div id="content"> <p>The following error was encountered while trying to retrieve the URL: <a href="http://127.0.0.1:8091/pools/default/bucketsStreaming/Atlas">http://127.0.0.1:8091/pools/default/bucketsStreaming/Atlas</a></p> <blockquote id="error"> <p><b>Connection to 127.0.0.1 failed.</b></p> </blockquote>
I would suggest modifying moxi to never honor proxy settings, or to explicitly unset them at server start time.