Connection to 127.0.0.1 Failed

hello guys, i'm getting this error when i try the curl -X GET "localhost:9200/" on Centos.
i'm using a proxy.

# curl -X GET "localhost:9200"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to retrieve the URL:
<A HREF="http://localhost:9200/">http://localhost:9200/</A>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Connection to 127.0.0.1 Failed
</STRONG>
</UL>

<P>
The system returned:
<PRE><I>    (111) Connection refused</I></PRE>

<P>
The remote host or network may be down.  Please try the request again.
<P>Your cache administrator is <A HREF="mailto:root">root</A>.

<BR clear="all">
<HR noshade size="1px">
<ADDRESS>
Generated Wed, 15 May 2019 13:57:17 GMT by rctformhttp2 (squid/2.6.STABLE21)
</ADDRESS>

and this is the log file content /var/log/elasticsearch/elasticsearch.log

[2019-05-15T14:44:40,753][INFO ][o.e.e.NodeEnvironment    ] [rpA3fKQ] using [1] data paths, mounts [[/var (/dev/mapper/centos-var)]], net usable_space [756.5mb], net total_space [1014mb], types [xfs]
[2019-05-15T14:44:40,757][INFO ][o.e.e.NodeEnvironment    ] [rpA3fKQ] heap size [1007.3mb], compressed ordinary object pointers [true]
[2019-05-15T14:44:40,764][INFO ][o.e.n.Node               ] [rpA3fKQ] node name derived from node ID [rpA3fKQ7QWa7rCEtHV875w]; set [node.name] to override
[2019-05-15T14:44:40,765][INFO ][o.e.n.Node               ] [rpA3fKQ] version[6.7.2], pid[30887], build[default/rpm/56c6e48/2019-04-29T09:05:50.290371Z], OS[Linux/3.10.0-957.12.1.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_212/25.212-b04]
[2019-05-15T14:44:40,765][INFO ][o.e.n.Node               ] [rpA3fKQ] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-4871825112839890000, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:/var/log/elasticsearch/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=rpm]
[2019-05-15T14:44:44,476][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] loaded module [aggs-matrix-stats]
[2019-05-15T14:44:44,476][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] loaded module [analysis-common]
[2019-05-15T14:44:44,478][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] loaded module [x-pack-ml]
[2019-05-15T14:44:44,478][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] loaded module [x-pack-monitoring]
[2019-05-15T14:44:44,479][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] loaded module [x-pack-rollup]
[2019-05-15T14:44:44,479][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] loaded module [x-pack-security]
[2019-05-15T14:44:44,479][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] loaded module [x-pack-sql]
[2019-05-15T14:44:44,479][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] loaded module [x-pack-upgrade]
[2019-05-15T14:44:44,479][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] loaded module [x-pack-watcher]
[2019-05-15T14:44:44,479][INFO ][o.e.p.PluginsService     ] [rpA3fKQ] no plugins loaded
[2019-05-15T14:44:51,559][INFO ][o.e.x.s.a.s.FileRolesStore] [rpA3fKQ] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2019-05-15T14:44:53,218][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [rpA3fKQ] [controller/30952] [Main.cc@109] controller (64 bit): Version 6.7.2 (Build f688467e0867ca) Copyright (c) 2019 Elasticsearch BV
[2019-05-15T14:44:54,220][DEBUG][o.e.a.ActionModule       ] [rpA3fKQ] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-05-15T14:44:54,639][INFO ][o.e.d.DiscoveryModule    ] [rpA3fKQ] using discovery type [single-node] and host providers [settings]
[2019-05-15T14:44:55,870][INFO ][o.e.n.Node               ] [rpA3fKQ] initialized
[2019-05-15T14:44:55,871][INFO ][o.e.n.Node               ] [rpA3fKQ] starting ...
[2019-05-15T14:44:56,108][INFO ][o.e.t.TransportService   ] [rpA3fKQ] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
[2019-05-15T14:44:56,375][INFO ][o.e.h.n.Netty4HttpServerTransport] [rpA3fKQ] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
[2019-05-15T14:44:56,375][INFO ][o.e.n.Node               ] [rpA3fKQ] started
[2019-05-15T14:44:56,849][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [rpA3fKQ] Failed to clear cache for realms [[]]
[2019-05-15T14:44:56,936][INFO ][o.e.l.LicenseService     ] [rpA3fKQ] license [ff34bbe3-a17f-4754-a6ec-1fe1d52e93f1] mode [basic] - valid
[2019-05-15T14:44:56,953][INFO ][o.e.g.GatewayService     ] [rpA3fKQ] recovered [0] indices into cluster_state
[2019-05-15T14:45:25,528][INFO ][o.e.n.Node               ] [rpA3fKQ] stopping ...
[2019-05-15T14:45:25,539][INFO ][o.e.x.w.WatcherService   ] [rpA3fKQ] stopping watch service, reason [shutdown initiated]
[2019-05-15T14:45:25,580][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [rpA3fKQ] [controller/30952] [Main.cc@148] Ml controller exiting
[2019-05-15T14:45:25,581][INFO ][o.e.x.m.p.NativeController] [rpA3fKQ] Native controller process has stopped - no new native processes can be started
[2019-05-15T14:45:25,601][INFO ][o.e.n.Node               ] [rpA3fKQ] stopped
[2019-05-15T14:45:25,601][INFO ][o.e.n.Node               ] [rpA3fKQ] closing ...
[2019-05-15T14:45:25,625][INFO ][o.e.n.Node               ] [rpA3fKQ] closed

i disabled the proxy for 127.0.0.1,localhost with :
]# no_proxy=127.0.0.1,localhost
Export no_proxy
and it works.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.