[ERROR][logstash.agent] "Expected one of [ \\t\\r\\n], \"#\", \"input\", \"filter\", \"output\" at line 1, column 1 (byte 1)"

How are you setting path.config and what is its value?

It could be your configuration file has a byte-order-mark as the first byte.

If you are pointing path.config at a directory then logstash will concatenate every file in the directory. If the first file (alphabetically) is not a configuration file it could cause this error.