我正在尝试设置logstash转发器,但是在建立适当的安全通道时遇到了问题。尝试使用在virtualbox中运行的两台ubuntu(服务器14.04)计算机进行配置。它们是100%干净的(用于logstash的主机文件不受影响或未安装任何其他软件包,除了必需的Java,ngix,elastisearch等)
我不认为这是logstash问题,但证书的处理不当或在logstash ubuntu或转发器计算机上未正确设置的问题。
我生成了密钥:
sudo openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout private/logstash-forwarder.key -out certs/logstash-forwarder.crt
我在logstash服务器上的输入conf:
input {
lumberjack {
port => 5000
type => "logs"
ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"
ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"
}
}
密钥已复制到具有以下配置的转发器主机。
{
"network": {
"servers": [ "192.168.2.107:5000" ],
"timeout": 15,
"ssl ca": "/etc/pki/tls/certs/logstash-forwarder.crt"
"ssl key": "/etc/pki/tls/certs/logstash-forwarder.key"
},
"files": [
{
"paths": [
"/var/log/syslog",
"/var/log/auth.log"
],
"fields": { "type": "syslog" }
}
]
}
运行logstash服务器后,我在转发器计算机上“ sudo服务logstash-转发器启动”,给我以下重复错误:
Jul 9 05:06:21 ubuntu logstash-forwarder[1374]: 2014/07/09 05:06:21.589762 Connecting to [192.168.2.107]:5000 (192.168.2.107)
Jul 9 05:06:21 ubuntu logstash-forwarder[1374]: 2014/07/09 05:06:21.595105 Failed to tls handshake with 192.168.2.107 x509: cannot validate certificate for 192.168.2.107 because it doesn't contain any IP SANs
Jul 9 05:06:22 ubuntu logstash-forwarder[1374]: 2014/07/09 05:06:22.595971 Connecting to [192.168.2.107]:5000 (192.168.2.107)
Jul 9 05:06:22 ubuntu logstash-forwarder[1374]: 2014/07/09 05:06:22.602024 Failed to tls handshake with 192.168.2.107 x509: cannot validate certificate for 192.168.2.107 because it doesn't contain any IP SANs
如前所述,我认为这不是logstash问题,而是证书/机器配置问题。问题是,我似乎无法解决。希望这里有一些聪明的人可以帮助我?
谢谢