Can not convert 'object' into 'string'

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')

filebeat.prospectors:
  • input_type: log
    paths:
    • /var/log/httpd/*log
    • /var/log/secure
    • /var/log/messages

#----------------------------- Logstash output --------------------------------
output.logstash:

The Logstash hosts

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

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

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 https://www.elastic.co/guide/en/beats/filebeat/current/configuration-output-ssl.html

1 Like

So on filebeat I only need the certificate, right?

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.

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

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

For anyone else this was my final config

1 Like

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