Ubuntu 18.04.2 LTS 上的 Elasticsearch:没有发布文件
Elasticsearch on Ubuntu 18.04.2 LTS: does not have a Release file
我正在尝试按照官方documentation安装ELK。我在公司防火墙后面使用它自己的证书。因此,在第一步中,我使用 wget 的 --no-check-certificate
选项添加 public 键。
但是,将存储库添加到 /etc/apt/sources.list.d/elastic-7.x.list
后,我收到以下错误 运行 #apt-get update
:
root@ubuntu:~# sudo apt-get update && sudo apt-get install elasticsearch
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Err:5 https://artifacts.elastic.co/packages/7.x/apt stable Release
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.14.222 443]
Reading package lists... Done
E: The repository 'https://artifacts.elastic.co/packages/7.x/apt stable Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
我尝试将 [trusted=yes]
添加到 .list
文件:
deb [trusted=yes] https://artifacts.elastic.co/packages/7.x/apt stable main
然而,这会在尝试更新 apt 时导致更多错误:
Ign:1 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Ign:2 https://artifacts.elastic.co/packages/7.x/apt stable Release
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Hit:5 http://archive.ubuntu.com/ubuntu bionic InRelease
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Hit:8 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Hit:11 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Err:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.14.222 443]
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Reading package lists... Done
E: Failed to fetch https://artifacts.elastic.co/packages/7.x/apt/dists/stable/main/binary-amd64/Packages Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.14.222 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
我知道怎么做了:通过提取公司防火墙强加的 SSL 证书并将其添加到受信任的证书列表中,我解决了这个问题:
echo -n | openssl s_client -showcerts -servername -connect github.com:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >> $(curl-config --ca)
我通过更改 /etc/ssl
中的权限,使用导致大致
的命令对自己造成了这种情况
chmod 710 /etc/ssl/*/
chmod 400 /etc/ssl/private/*
调试起来很不方便,希望对以后的胖友有所帮助
我正在尝试按照官方documentation安装ELK。我在公司防火墙后面使用它自己的证书。因此,在第一步中,我使用 wget 的 --no-check-certificate
选项添加 public 键。
但是,将存储库添加到 /etc/apt/sources.list.d/elastic-7.x.list
后,我收到以下错误 运行 #apt-get update
:
root@ubuntu:~# sudo apt-get update && sudo apt-get install elasticsearch
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Err:5 https://artifacts.elastic.co/packages/7.x/apt stable Release
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.14.222 443]
Reading package lists... Done
E: The repository 'https://artifacts.elastic.co/packages/7.x/apt stable Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
我尝试将 [trusted=yes]
添加到 .list
文件:
deb [trusted=yes] https://artifacts.elastic.co/packages/7.x/apt stable main
然而,这会在尝试更新 apt 时导致更多错误:
Ign:1 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Ign:2 https://artifacts.elastic.co/packages/7.x/apt stable Release
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Hit:5 http://archive.ubuntu.com/ubuntu bionic InRelease
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Hit:8 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Hit:11 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Ign:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Ign:3 https://artifacts.elastic.co/packages/7.x/apt stable/main all Packages
Err:4 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 Packages
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.14.222 443]
Ign:6 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en_US
Ign:7 https://artifacts.elastic.co/packages/7.x/apt stable/main Translation-en
Ign:9 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 c-n-f Metadata
Ign:10 https://artifacts.elastic.co/packages/7.x/apt stable/main all c-n-f Metadata
Reading package lists... Done
E: Failed to fetch https://artifacts.elastic.co/packages/7.x/apt/dists/stable/main/binary-amd64/Packages Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.14.222 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
我知道怎么做了:通过提取公司防火墙强加的 SSL 证书并将其添加到受信任的证书列表中,我解决了这个问题:
echo -n | openssl s_client -showcerts -servername -connect github.com:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >> $(curl-config --ca)
我通过更改 /etc/ssl
中的权限,使用导致大致
chmod 710 /etc/ssl/*/
chmod 400 /etc/ssl/private/*
调试起来很不方便,希望对以后的胖友有所帮助