codeship / scripts

Scripts for use on Codeship Basic
https://codeship.com
MIT License
217 stars 172 forks source link

Elasticsearch updates #273

Closed joesiewert closed 3 years ago

aandis commented 3 years ago

hi @joesiewert I see some elasticsearch 2.x download failures at https://github.com/codeship/scripts/pull/273/files#diff-ddde536508ec314b3aba88693add786ccd3426b8b35bbda2ccc8064bb1bda514L47. Here's an example -

--2021-02-03 05:36:27-- https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.6/elasticsearch-2.4.6.tar.gz Resolving download.elastic.co (download.elastic.co)... 34.120.127.130, 2600:1901:0:1d7:: Connecting to download.elastic.co (download.elastic.co)|34.120.127.130|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2021-02-03 05:36:27 ERROR 404: Not Found.

The download works on my local though. Can you help figure out what's wrong here?

aandis commented 3 years ago

rof@bionic_30d29633-2e49-4671-ae2b-043d56b510b7_896de47dc246:~$ curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/elasticsearch.sh | bash -s --2021-02-03 06:32:48-- https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.6/elasticsearch-2.4.6.tar.gz Resolving download.elastic.co (download.elastic.co)... 34.120.127.130, 2600:1901:0:1d7:: Connecting to download.elastic.co (download.elastic.co)|34.120.127.130|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2021-02-03 06:32:48 ERROR 404: Not Found.

rof@bionic_30d29633-2e49-4671-ae2b-043d56b510b7_896de47dc246:~$ curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/elasticsearch.sh | bash -s --2021-02-03 06:32:54-- https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.6/elasticsearch-2.4.6.tar.gz Resolving download.elastic.co (download.elastic.co)... 34.120.127.130, 2600:1901:0:1d7:: Connecting to download.elastic.co (download.elastic.co)|34.120.127.130|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2021-02-03 06:32:55 ERROR 404: Not Found.

rof@bionic_30d29633-2e49-4671-ae2b-043d56b510b7_896de47dc246:~$ curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/elasticsearch.sh | bash -s --2021-02-03 06:32:56-- https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.6/elasticsearch-2.4.6.tar.gz Resolving download.elastic.co (download.elastic.co)... 34.120.127.130, 2600:1901:0:1d7:: Connecting to download.elastic.co (download.elastic.co)|34.120.127.130|:443... connected. HTTP request sent, awaiting response... 416 Requested range not satisfiable

The file is already fully retrieved; nothing to do. { "name" : "Tom Thumb", "cluster_name" : "elasticsearch", "cluster_uuid" : "b8_csOCfTmWsUc69Ug_rnw", "version" : { "number" : "2.4.6", "build_hash" : "5376dca9f70f3abef96a77f4bb22720ace8240fd", "build_timestamp" : "2017-07-18T12:17:44Z", "build_snapshot" : false, "lucene_version" : "5.5.4" }, "tagline" : "You Know, for Search" } 2021-02-03 06:32:56 URL:http://localhost:9200/ [363/363] -> "-" [1] rof@bionic_30d29633-2e49-4671-ae2b-043d56b510b7_896de47dc246:~$ curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/elasticsearch.sh | bash -s --2021-02-03 06:33:10-- https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.6/elasticsearch-2.4.6.tar.gz Resolving download.elastic.co (download.elastic.co)... 34.120.127.130, 2600:1901:0:1d7:: Connecting to download.elastic.co (download.elastic.co)|34.120.127.130|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2021-02-03 06:33:11 ERROR 404: Not Found.

joesiewert commented 3 years ago

Possibly rate limiting on Elastic's end. Recommend downloading the file from them and hosting on your own to use in your builds.

aandis commented 3 years ago

would it be possible to modify the script to accept a ELASTICSEARCH_DL_URL env var to use so I can continue using this script?

aandis commented 3 years ago

@joesiewert never mind. The better fix is to wget -nc since the file is already cached.

aandis commented 3 years ago

@joesiewert https://github.com/codeship/scripts/pull/274

denis-chmel commented 3 years ago

Please consider #275 instead