wget 无法找到在线项目

wget 无法找到在线项目

我目前正在制作一个 ELK 堆栈,但是当我按照这些步骤我得到了 404 错误。如果我在任何浏览器中输入链接,我可以手动下载文件,甚至可以在 GUI 中读取文件,但不能在命令提示符中读取文件。发送 HTTP 请求后,它似乎失败了。具体来说,我正在运行以下命令:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.2.tar.gz

在前面添加sudo不会改变任何东西。如果没有其他操作,我是否只需要手动复制每个文件夹(lib、var 等)?

快速调试的结果:

sudo wget --debug -S https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.2.tar.gz
Setting --server-response (serverresponse) to 1
DEBUG output created by Wget 1.17.1 on linux-gnu.

Reading HSTS entries from /home/login/.wget-hsts
URI encoding = ‘UTF-8’
--2018-02-26 12:42:40--  https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.2.tar.gz
Resolving artifacts.elastic.co (artifacts.elastic.co)... 23.23.109.100, 184.73.156.41, 23.21.67.46, ...
Caching artifacts.elastic.co => 23.23.109.100 184.73.156.41 23.21.67.46 54.225.188.6 184.73.245.233 54.235.82.130 184.72.218.26 184.72.242.47 2406:da00:ff00::b849:f5e9 2406:da00:ff00::1715:432e 2406:da00:ff00::b848:da1a 2406:da00:ff00::ae81:1d9 2406:da00:ff00::36e1:bc06 2406:da00:ff00::1717:6d64 2406:da00:ff00::b849:9c29 2406:da00:ff00::b848:f22f
Connecting to artifacts.elastic.co (artifacts.elastic.co)|23.23.109.100|:443... connected.
Created socket 3.
Releasing 0x00005573f67f3fe0 (new refcount 1).
Initiating SSL handshake.
Handshake successful; connected socket 3 to SSL handle 0x00005573f67f4560
certificate:
  subject: CN=*.elastic.co,O=Elasticsearch\\, Inc.,L=Mountain View,ST=California,C=US
  issuer:  CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US
X509 certificate successfully verified and matches host artifacts.elastic.co

**---request begin---**
GET /downloads/elasticsearch/elasticsearch-6.6.2.tar.gz HTTP/1.1
User-Agent: Wget/1.17.1 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: artifacts.elastic.co
Connection: Keep-Alive

**---request end---**
HTTP request sent, awaiting response... 
**---response begin---**
HTTP/1.1 404 Not Found
Content-Type: application/xml
Date: Mon, 26 Feb 2018 20:42:43 GMT
Server: nginx/1.4.6 (Ubuntu)
x-amz-id-2: amJi77MSQhFIYjeVp/GRn+Uo3pk/whLWxkRzu33+1evI7pdgK2V33fFRgt+xJDfOxy8HHDVwONY=
x-amz-request-id: C09CB1B31B2B1951
Content-Length: 321
Connection: keep-alive

**---response end---**

  HTTP/1.1 404 Not Found
  Content-Type: application/xml
  Date: Mon, 26 Feb 2018 20:42:43 GMT
  Server: nginx/1.4.6 (Ubuntu)
  x-amz-id-2: amJi77MSQhFIYjeVp/GRn+Uo3pk/whLWxkRzu33+1evI7pdgK2V33fFRgt+xJDfOxy8HHDVwONY=
  x-amz-request-id: C09CB1B31B2B1951
  Content-Length: 321
  Connection: keep-alive
Registered socket 3 for persistent reuse.
Skipping 321 bytes of body: [<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>downloads/elasticsearch/elasticsearch-6.6.2.tar.gz</Key><RequestId>C09CB1B31B2B1951</RequestId><HostId>amJi77MSQhFIYjeVp/GRn+Uo3pk/whLWxkRzu33+1evI7pdgK2V33fFRgt+xJDfOxy8HHDVwONY=</HostId></Error>] done.
2018-02-26 12:42:43 ERROR 404: Not Found.

Saving HSTS entries to /home/login/.wget-hsts

答案1

根据您的调试输出,您输入了错误。考虑输出:

**---request begin---**
GET /downloads/elasticsearch/elasticsearch-6.6.2.tar.gz HTTP/1.1
User-Agent: Wget/1.17.1 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: artifacts.elastic.co
Connection: Keep-Alive

显然你指的是 6.2.2,而不是 6.6.2

来源:

https://www.elastic.co/downloads/elasticsearch

相关内容