I tried to configure logstash-forwarder by guide at
https://github.com/elasticsearch/logstash-forwarder.
but I met the errors in connecting with logstash.
Error message said "this certification is not for this server". So I checked the cert file. All fields of it are just example values. I googled. I changed option and logstash-forwarder is working.
Original guide:
$ openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout logstash-forwarder.key -out logstash-forwarder.crt -days 365
$ openssl req -x509-batch -nodes -newkey rsa:2048 -keyout logstash-forwarder.key -out logstash-forwarder.crt -days 365
when this option is removed, openssl asks all fields which are needed.
Important field is Common Name. you must type servername. I typed localhost in my case. ( I tried to connect in local Logstash instance.)
======
openssl req -x509 -nodes -newkey rsa:2048 -keyout logstash-forwarder.key -out logstash-forwarder.crt -days 365 Generating a 2048 bit RSA private key
.............................................+++
..............................................................+++
unable to write 'random state'
writing new private key to 'logstash-forwarder.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:KR
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:MyCompany
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:localhost
Email Address []:
https://github.com/elasticsearch/logstash-forwarder.
but I met the errors in connecting with logstash.
Error message said "this certification is not for this server". So I checked the cert file. All fields of it are just example values. I googled. I changed option and logstash-forwarder is working.
Original guide:
$ openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout logstash-forwarder.key -out logstash-forwarder.crt -days 365
Fiexed : ( just -batch option is removed)
$ openssl req -x509
when this option is removed, openssl asks all fields which are needed.
Important field is Common Name. you must type servername. I typed localhost in my case. ( I tried to connect in local Logstash instance.)
======
openssl req -x509 -nodes -newkey rsa:2048 -keyout logstash-forwarder.key -out logstash-forwarder.crt -days 365 Generating a 2048 bit RSA private key
.............................................+++
..............................................................+++
unable to write 'random state'
writing new private key to 'logstash-forwarder.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:KR
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:MyCompany
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:localhost
Email Address []: