Can not convert 'object' into 'string'

(Prophoto) #1

Getting these errors, did a ton of searching around but no luck. Running bitnam elki vm on debian. and filebeat on centos7.

2017-08-14T21:44:38Z INFO Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]
2017-08-14T21:44:38Z INFO Setup Beat: filebeat; Version: 5.5.1
2017-08-14T21:44:38Z ERR failed to initialize logstash plugin as output: can not convert 'object' into 'string' accessing 'output.logstash.ssl.certificate' (source:'/etc/filebeat/filebeat.yml')
2017-08-14T21:44:38Z CRIT Exiting: error initializing publisher: can not convert 'object' into 'string' accessing 'output.logstash.ssl.certificate' (source:'/etc/filebeat/filebeat.yml')

  • input_type: log
    • /var/log/httpd/*log
    • /var/log/secure
    • /var/log/messages

#----------------------------- Logstash output --------------------------------

The Logstash hosts

hosts: [""]
bulk_max_size: 1024
ssl.certificate: ["/mypath/logstash-forwarder.crt"]
ssl.key: ["/mypath/logstash-forwarder.key"]

(Prophoto) #2

When setup without ssl on filebeat/logstash I get this error on filebeat.

ERR Connecting error publishing events (retrying): dial tcp my.ip.addr.ess:5044: i/o timeout

(Carlos Pérez Aradros) #3

Hi @prophoto,

The problem is that you are setting an array as value for ssl.certificate, while Filebeat expects just a string. For details on how SSL is configured (across all beats), check

(Prophoto) #4

So on filebeat I only need the certificate, right?

(Prophoto) #5

OK so three more hours later all I had to do was remove the [] around the key and crt paths. Now Im getting ERR Connecting error publishing events (retrying): x509: certificate signed by unknown authority, help! Using self signed cert.

(Carlos Pérez Aradros) #6

Try by adding the cert to certificate_authorities, or marking it as trusted in your system

(Prophoto) #7

Working! On to the next step to get elk working as we need it to. Thanks

For anyone else this was my final config

(system) #8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.