Logstash Issue

Starting Logstash for the first time in linux machine

There was an error while loading `logstash-core-plugin-api.gemspec`: load error: psych -- java.lang.RuntimeException: BUG: we can not copy embedded jar to temp directory.

Should I create any temp directory or copy any specific jar in the directory?

You don't have to manually create or place any jar file. Logstash will automatically create all those necessary things.
Check if the user(where logstash is hosted) has permission to access temp folder, if yes you can check the space in the temp storage, that might be causing the issue.

Yes, I have changed Logstash to different user which has root access and it started without any error. Thanks