logstash icon indicating copy to clipboard operation
logstash copied to clipboard

Colon ':' char in install path causes load error

Open Vlad777 opened this issue 11 years ago • 4 comments

We are trying to run logstash in Mesos sandbox, which creates paths with colon (:) character, which cause the following error on starting logstash:

Error: Could not find or load main class org.jruby.Main

Vlad777 avatar Jan 13 '15 01:01 Vlad777

Hmm weird. can you provide your logstash command line and config?

On Monday, January 12, 2015, Vlad777 [email protected] wrote:

We are trying to run logstash in Mesos sandbox, which creates paths with colon (:) character, which cause the following error on starting logstash:

Error: Could not find or load main class org.jruby.Main

— Reply to this email directly or view it on GitHub https://github.com/elasticsearch/logstash/issues/2346.

jordansissel avatar Jan 13 '15 03:01 jordansissel

I replicated this scenario with logstgash 1.4.2 with the simplest config (which doesn't matter, since it fails before even starting Jruby). I just renamed by install folder path to include a colon (:) character.

mv logstash-1.4.2 logstash:1.4.2 cd logstash:1.4.2 echo "input { stdin {} } output { stdout {} }" > std.conf bin/logstash -f std.conf Error: Could not find or load main class org.jruby.Main

Here is the expanded command line being executed within bin/logstash:

/usr/bin/java -Xmx4000m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -jar "/path:withcolon/logstash-1.4.2/vendor/jar/jruby-complete-1.7.11.jar" "-I/path:withcolon/logstash-1.4.2/lib" "/path:withcolon/logstash-1.4.2/lib/logstash/runner.rb" agent --debug -f std.conf

Vlad777 avatar Jan 13 '15 19:01 Vlad777

I am not completely familiar with mesos.. I assume this directory is automatically generated by mesos? And could it related to this mesos issue? https://issues.apache.org/jira/browse/MESOS-1128 last comment talk about path issues and jars.

ph avatar Jan 15 '15 00:01 ph

That mesos issue covers only the date formatting which was fixed, but there is another part of the path that uses colons as a separator.

It's an issue of the install path for logstash having a (:) character, which can happen without mesos and I've reproduced it easiliy without mesos. In fact, bin/elasticsearch has the same problem if it's installed in a path with a colon (:) character.

If it cannot be fixed, then perhaps this can go into the logstash README, such as "Do not install in a path with colon (:) characters in it."

Vlad777 avatar Jan 15 '15 18:01 Vlad777