Elastic 7.6.1: 503 Service Unavailable (fresh install)

I've installed eleasticsearch according to the manual provided on https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html

After starting elastic I tried to check the service:

$ curl -X GET "http://127.0.0.1:9200/?pretty"
<HTML><TITLE>503 Service Unavailable</TITLE>
<H1>503 Service Unavailable</H1>
Failed to connect to server <B>127.0.0.1</B></HTML>

But the service is running:

$  systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-03-26 13:40:05 CET; 1h 10min ago
     Docs: http://www.elastic.co
 Main PID: 14758 (java)
    Tasks: 41 (limit: 4915)
   Memory: 4.2G
.
.

The listerner is active:

$ netstat -ntl |grep ':9'
tcp        0      0 127.0.0.1:9200          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:9300          0.0.0.0:*               LISTEN

Elastic log:

[2020-03-27T09:11:09,276][INFO ][o.e.n.Node               ] [elk] closing ...
[2020-03-27T09:11:09,284][INFO ][o.e.n.Node               ] [elk] closed
[2020-03-27T09:11:11,605][INFO ][o.e.e.NodeEnvironment    ] [elk] using [1] data paths, mounts [[/ (/dev/mapper/rootvg-rootlv)]], net usable_space [
54.8gb], net total_space [63.9gb], types [btrfs]
[2020-03-27T09:11:11,609][INFO ][o.e.e.NodeEnvironment    ] [elk] heap size [3.9gb], compressed ordinary object pointers [true]
[2020-03-27T09:11:11,714][INFO ][o.e.n.Node               ] [elk] node name [elk], node ID [5LcoVEjjSXmeSUTQCnQcQw], cluster name [elasticsearch]
[2020-03-27T09:11:11,715][INFO ][o.e.n.Node               ] [elk] version[7.6.1], pid[17656], build[oss/deb/aa751e09be0a5072e8570670309b1f12348f023b
/2020-02-29T00:15:25.529771Z], OS[Linux/4.19.0-8-amd64/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/13.0.2/13.0.2+8]
[2020-03-27T09:11:11,715][INFO ][o.e.n.Node               ] [elk] JVM home [/usr/share/elasticsearch/jdk]
[2020-03-27T09:11:11,716][INFO ][o.e.n.Node               ] [elk] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negativ
e.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, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.sh
utdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Xms4g, -Xmx4g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupa
ncyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/tmp/elasticsearch-2293679446423313435, -XX:+HeapDumpOnOutOfMemoryError, -XX:He
apDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -XX:MaxDirectMemorySize=2147483648, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=oss, -Des.distribution.type=deb, -Des.bundled_jdk=true]
[2020-03-27T09:11:12,268][INFO ][o.e.p.PluginsService     ] [elk] loaded module [aggs-matrix-stats]
[2020-03-27T09:11:12,269][INFO ][o.e.p.PluginsService     ] [elk] loaded module [analysis-common]
[2020-03-27T09:11:12,269][INFO ][o.e.p.PluginsService     ] [elk] loaded module [ingest-common]
[2020-03-27T09:11:12,269][INFO ][o.e.p.PluginsService     ] [elk] loaded module [ingest-geoip]
[2020-03-27T09:11:12,269][INFO ][o.e.p.PluginsService     ] [elk] loaded module [ingest-user-agent]
[2020-03-27T09:11:12,270][INFO ][o.e.p.PluginsService     ] [elk] loaded module [lang-expression]
[2020-03-27T09:11:12,270][INFO ][o.e.p.PluginsService     ] [elk] loaded module [lang-mustache]
[2020-03-27T09:11:12,270][INFO ][o.e.p.PluginsService     ] [elk] loaded module [lang-painless]
[2020-03-27T09:11:12,270][INFO ][o.e.p.PluginsService     ] [elk] loaded module [mapper-extras]
[2020-03-27T09:11:12,270][INFO ][o.e.p.PluginsService     ] [elk] loaded module [parent-join]
[2020-03-27T09:11:12,271][INFO ][o.e.p.PluginsService     ] [elk] loaded module [percolator]
[2020-03-27T09:11:12,271][INFO ][o.e.p.PluginsService     ] [elk] loaded module [rank-eval]
[2020-03-27T09:11:12,271][INFO ][o.e.p.PluginsService     ] [elk] loaded module [reindex]
[2020-03-27T09:11:12,271][INFO ][o.e.p.PluginsService     ] [elk] loaded module [repository-url]
[2020-03-27T09:11:12,271][INFO ][o.e.p.PluginsService     ] [elk] loaded module [systemd]
[2020-03-27T09:11:12,271][INFO ][o.e.p.PluginsService     ] [elk] loaded module [transport-netty4]
[2020-03-27T09:11:12,272][INFO ][o.e.p.PluginsService     ] [elk] no plugins loaded
[2020-03-27T09:11:14,527][INFO ][o.e.d.DiscoveryModule    ] [elk] using discovery type [zen] and seed hosts providers [settings]
[2020-03-27T09:11:14,831][INFO ][o.e.n.Node               ] [elk] initialized
[2020-03-27T09:11:14,832][INFO ][o.e.n.Node               ] [elk] starting ...
[2020-03-27T09:11:14,939][INFO ][o.e.t.TransportService   ] [elk] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2020-03-27T09:11:15,125][WARN ][o.e.b.BootstrapChecks    ] [elk] the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
[2020-03-27T09:11:15,127][INFO ][o.e.c.c.Coordinator      ] [elk] cluster UUID [P6tiAKqPRDeGZ4YIzbFUOA]
[2020-03-27T09:11:15,135][INFO ][o.e.c.c.ClusterBootstrapService] [elk] no discovery configuration found, will perform best-effort cluster bootstrapping after [3s] unless existing master is discovered
[2020-03-27T09:11:15,228][INFO ][o.e.c.s.MasterService    ] [elk] elected-as-master ([1] nodes joined)[{elk}{5LcoVEjjSXmeSUTQCnQcQw}{zTlKOSJjTPepvoecwk6otw}{127.0.0.1}{127.0.0.1:9300}{dim} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 23, version: 82, delta: master node changed {previous [], current [{elk}{5LcoVEjjSXmeSUTQCnQcQw}{zTlKOSJjTPepvoecwk6otw}{127.0.0.1}{127.0.0.1:9300}{dim}]}
[2020-03-27T09:11:15,279][INFO ][o.e.c.s.ClusterApplierService] [elk] master node changed {previous [], current [{elk}{5LcoVEjjSXmeSUTQCnQcQw}{zTlKOSJjTPepvoecwk6otw}{127.0.0.1}{127.0.0.1:9300}{dim}]}, term: 23, version: 82, reason: Publication{term=23, version=82}
[2020-03-27T09:11:15,400][INFO ][o.e.h.AbstractHttpServerTransport] [elk] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
[2020-03-27T09:11:15,401][INFO ][o.e.n.Node               ] [elk] started
[2020-03-27T09:11:15,535][INFO ][o.e.g.GatewayService     ] [elk] recovered [2] indices into cluster_state
[2020-03-27T09:11:15,870][INFO ][o.e.c.r.a.AllocationService] [elk] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[.apm-agent-configuration][0]]]).

OS: Debian 10 Buster
Java: openjdk-11-jdk

What's wrong ?

Thanks a lot for your assistance !

Greetings

Michael

I have not seen that response before. Do you have a proxy in front of Elasticsearch?

As you can see, the curl command has been executed locally. No proxy.

Christian, your are right !

The setting

no_proxy=127.0.0.1

was missing in /etc/environment.

Thanks a lot !

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