My name is José Manuel and I am trying to make a back from elasticsearch 7.10.2, but show me the next error
# curl -X PUT localhost:9200/_snapshot/my_backup?pretty -H 'Content-Type: application/json' -d '{ "type": "fs", "settings": { "location": "/backup" } }'
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Access Denied (authentication_failed)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
This is typically caused by an incorrect username and/or password, but could also be caused by network problems.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=2>
<BR>
For assistance, contact your network support team.
</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>
It looks like you are missing credentials in your request. Can you try adding credentials similar to the curl example here in the documentation and see if that resolves your issue?
You need to use the snapshot/restore API to backup Elasticsearch, and this will require you to have direct access to Elasticsearch and also potentially to update the configuration files directly. At the moment you are not accessing Elasticsearch directly as the HTML formatted error is not generated by Elasticsearch.
You must have a proxy or third party plugin installed, which seems to be what is causing problems. Log into the host and check whether a proxy is in place and which interface and port Elasticsearch is configured to use.
I edited the elasticsearch.yml
this is the elasticsearch.yml file
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: graylog
#
#action.auto_create_index: false
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
path.repo: ["/backup"]
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 192.168.222.243
#
# Set a custom port for HTTP:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: elasticsearch.local
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
#action.auto_create_index: false
the result of the comand is the next:
root@GRAYLOGDEBIANSERVER:/var/log/graylog-server# curl -X GET "http://192.168.222.243:9200?pretty"
<HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (tcp_error)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
A communication error occurred: "Operation timed out"
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=2>
<BR>
For assistance, contact your network support team.
</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>
root@GRAYLOGDEBIANSERVER:/var/log/graylog-server#
I am executing all in the phisical machine whre is installed elasticsearch.
What is happening?
I suspect you may have some third-party security plugin installed as there does not seem to be any external proxy. Did you install Elasticsearch yourself or was this done through Graylog? If the latter you may need to contact them.
Hi again Mr Christian_Dahlqvist
The commando you send me doen´t work but systemctl status woks so here we go
root@GRAYLOGDEBIANSERVER:/etc/elasticsearch# netstat -pln | grep 9200
bash: netstat: command not found
root@GRAYLOGDEBIANSERVER:/etc/elasticsearch# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-05-08 10:18:27 CEST; 1h 56min ago
Docs: https://www.elastic.co
Main PID: 4441 (java)
Tasks: 68 (limit: 7071)
Memory: 1.2G
CPU: 1min 20.791s
CGroup: /system.slice/elasticsearch.service
├─4441 /usr/lib/jvm/java-17-openjdk-amd64/bin/java -Xshare:auto -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encod>
└─4631 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
May 08 10:18:17 GRAYLOGDEBIANSERVER systemd[1]: Starting Elasticsearch...
May 08 10:18:19 GRAYLOGDEBIANSERVER systemd-entrypoint[4441]: WARNING: A terminally deprecated method in java.lang.System has been called
May 08 10:18:19 GRAYLOGDEBIANSERVER systemd-entrypoint[4441]: WARNING: System::setSecurityManager has been called by org.elasticsearch.bootstrap.Elasticsearch (file:/usr/share/elasticsearch/lib/elasticsearch-7.9.3.ja>
May 08 10:18:19 GRAYLOGDEBIANSERVER systemd-entrypoint[4441]: WARNING: Please consider reporting this to the maintainers of org.elasticsearch.bootstrap.Elasticsearch
May 08 10:18:19 GRAYLOGDEBIANSERVER systemd-entrypoint[4441]: WARNING: System::setSecurityManager will be removed in a future release
May 08 10:18:20 GRAYLOGDEBIANSERVER systemd-entrypoint[4441]: WARNING: A terminally deprecated method in java.lang.System has been called
May 08 10:18:20 GRAYLOGDEBIANSERVER systemd-entrypoint[4441]: WARNING: System::setSecurityManager has been called by org.elasticsearch.bootstrap.Security (file:/usr/share/elasticsearch/lib/elasticsearch-7.9.3.jar)
May 08 10:18:20 GRAYLOGDEBIANSERVER systemd-entrypoint[4441]: WARNING: Please consider reporting this to the maintainers of org.elasticsearch.bootstrap.Security
May 08 10:18:20 GRAYLOGDEBIANSERVER systemd-entrypoint[4441]: WARNING: System::setSecurityManager will be removed in a future release
May 08 10:18:27 GRAYLOGDEBIANSERVER systemd[1]: Started Elasticsearch.
lines 1-22/22 (END)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.