Logstash Debugging


(James Farrington) #1

Hello,

I was wondering if anyone had a good way to debug with logstash. Currently, I am using the stdout with rubydebug. In my error file it shows an error name but won't give me any specific information, which makes the error message useless. How can I get the line number that an error is coming from?


(Magnus Bäck) #2

You probably can't, but what's the error message?


(James Farrington) #3

could not load : can't convert nil into string

Which, I assume comes from when I am loading in csv data and converting some of the columns into strings. However, I have tried removing all string conversions and even still got this error. Any thoughts?


(Magnus Bäck) #4

could not load : can’t convert nil into string

That's hardly the full error message, is it? Please post everything, and format it as preformatted text so it won't get mangled.

Seeing the configuration and sample input would also help.


(James Farrington) #5

That was the full error message we were getting, but it turns out the error was fixed, Logstash just didn't reflect this change for some reason.

Is there any reason why an older version of our logstash conf file would be used by other components of the ELK Stack? (i.e. we made updates to the conf file and restarted each service, but the output we got was from an older version of the conf file that no longer existed).

This caused the confusion about our error as it didn't make sense given the new version of the conf file we were using.


(Magnus Bäck) #6

Is there any reason why an older version of our logstash conf file would be used by other components of the ELK Stack?

Is your editor creating backup files? Logstash reads all files in the configuration directory (typically /etc/logstash/conf.d).


(James Farrington) #7

Ahhh, that makes a lot of sense. There was a backup file in the conf.d directory that was causing issue. Thank you for your help!


(system) #8

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