logstash icon indicating copy to clipboard operation
logstash copied to clipboard

Its buggy all over. Get your QA team find bugs and make it stable. I wasted so much time!

Open anandnsingh opened this issue 10 years ago • 8 comments

I started with latest version of ES and logsatsh in mac os ( yasomite ) env. i) logstash 1.x series starts but only if I reset my JAVA_OPTS env to whatever it wants . The 2.x won't start even - spews out java related warning. Starts only when I unset the pre existing java_opts env var. ii) Example code won't work - the one that is supposed to index to elastic search whatever is typed on console. Had to delete logstash template to make it work.. iii) Expected and error when I gave a wrong file name . see below . The file foo.log2 is non existent.non - existent. Registering file input {:path=>["/pss/server/handheld_correlated.log2"], :level=>:info} No sincedb_path set, generating one based on the file path {:sincedb_path=>"/Users/asingh/.sincedb_f1c910074d207abb910e8fb33532f556", :path=>["/pss/server/foo.log2"], :level=>:info} Pipeline started {:level=>:info} Logstash startup completed

iv). I hit trouble wherever I lay hand on the logstah 4.x + ES 2.x combo.

anandnsingh avatar Jan 09 '16 21:01 anandnsingh

While I appreciate your frustration, you haven't really provided a great deal of information to help us fix this. Can you elaborate on your points?

ie, for i - what JAVA_OPS did you have set locally? What did you change it to? ii - Which example codr are you referring to? iii - That's a fair point, but can we see your config? iv - there is no Logstash 4.X?

markwalkom avatar Jan 09 '16 22:01 markwalkom

@anandnsingh we are here to help, and we want to better our getting started experience. Your input is valuable.

In addition to questions that @markwalkom asked: What is your java version? And what is the exact version of Logstash you downloaded?

suyograo avatar Jan 11 '16 00:01 suyograo

Sorry for this late reply, somehow I missed the posts . Yes part it was frustration as I was new and eager to see some quick result s. Probably had a longer learning curve than expected. My java version is 1.8.

Fast forward. Overall works great now. My logstash version 2.1.1. But yes I have to unset the globally set java_opts otherwise I see the reported error, The pre set value is -Xmx1024m -Xms512m. So I unset the java_opts , start logstash and then again set the java_opts back to original. As below .

echo "starting logstash..."

JOPTS=$JAVA_OPTS

unset JAVA_OPTS

nohup $LOGSTASH_HOME/bin/logstash -f $LOGGING_SERVICE_HOME/config/site-A-log.conf >> $ELK_HOME/loggingSvc/logs/logstash.log &

echo "logstash started."

set it back

set JAVA_OPTS=$JOPTS

On Sun, Jan 10, 2016 at 4:41 PM, Suyog Rao [email protected] wrote:

@anandnsingh https://github.com/anandnsingh we are here to help, and we want to better our getting started experience. Your input is valuable.

In addition to questions that @markwalkom https://github.com/markwalkom asked: What is your java version? And what is the exact version of Logstash you downloaded?

— Reply to this email directly or view it on GitHub https://github.com/elastic/logstash/issues/4441#issuecomment-170410507.

anandnsingh avatar Apr 07 '16 15:04 anandnsingh

Similar issue to what @anandnsingh reported above with the JAVA_OPTS override not working. Here's a breakdown of what I am seeing and the environment I'm running.

OS - ubuntu 12.04 JAVA_VERSION = java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) LOGSTASH_VERSION = 2.3.4

We are in the middle of trying to upgrade from 1.5.5 to 2.3.4 and have run into some issues getting logstash to start with 2.3.4. We had been running 1.5.5 for quite some time before, around 2 years, without issue.

Here's what I get when I set the JAVA_OPTS environment variable to just -server (for testing the issue we dlaled back the options we were trying to pass to it) -

ubuntu@indexer-ubuntu:/opt/logstash/server/bin$ ./logstash agent -f /opt/logstash/server/etc/conf.d/ -l /opt/logstash/server/log/logstash.log -w 1
WARNING: Default JAVA_OPTS will be overridden by the JAVA_OPTS defined in the environment. Environment JAVA_OPTS are -server
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32      use a 32-bit data model if available
    -d64      use a 64-bit data model if available
    -server   to select the "server" VM
                  The default VM is server,
                  because you are running on a server-class machine.


    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image

When I unset the JAVA_OPTS env var logstash seems to start up just fine with the predefined options from the logstash.lib.sh script.

Setting the DEBUG env var to 1 to get some more information I see that it looks like it's trying to pass in a blank option with the -J prefix to jruby.

DEBUG: exec /opt/logstash/server/vendor/jruby/bin/jruby --1.9 -J-server -J-Xmx1g -J /opt/logstash/server/lib/bootstrap/environment.rb l

it's specifically passing in two options that I didn't specify in my JAVA_OPTS env var - -J-Xmx1g and just -J....pretty sure that's why I'm getting that complain from java when it tries to start up.

for now I'm able to just use the LS_JAVA_OPTS env var to pass in the options I need, along with the predefined ones from the script.

PurrBiscuit avatar Jul 14 '16 16:07 PurrBiscuit

This is already fixed by way of the jvm.options file in the master and 5.0 branches

untergeek avatar Jul 14 '16 16:07 untergeek

@untergeek do you know when this fix is going to be making it out in a release?

PurrBiscuit avatar Jul 14 '16 17:07 PurrBiscuit

5.0 is in alpha right now. Beta will be soon. Release will be later this year

untergeek avatar Jul 14 '16 17:07 untergeek

@anandnsingh thanks for getting back to us and telling us it works well now. Please open a new issue to document what your learning curve was. We would love to improve the first user experience, and we care about it deeply.

I am going to close this issue. Please open new issues for any JVM options issues.

suyograo avatar Jul 14 '16 17:07 suyograo