No such file or directory - No such directory?


(Samfukuda) #1

Guys,

I've faced something an ambiguous as below. logstash is telling me no such file, but it exists.
would you someone point me how I could fix this out ?

C:\logstash>bin\logstash agent -f conf\sample05.conf
io/console not supported; tty will not be manipulated
Logstash startup completed
e[31mNo such file or directory - No such directory: c:\logstash\conf\jmx.conf {:
level=>:error}e[0m
e[31morg/jruby/RubyDir.java:159:in `initialize'
org/jruby/RubyDir.java:409:in `foreach'
C:/logstash/vendor/bundle/jruby/1.9/gems/logstash-input-jmx-0.1.5/lib/logstash/i
nputs/jmx.rb:321:in `run'
C:/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.4-java/lib/logstash/p
ipeline.rb:177:in `inputworker'
C:/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.4-java/lib/logstash/p
ipeline.rb:171:in `start_input' {:level=>:error}e[0m
Logstash shutdown completed

C:\logstash>type c:\logstash\conf\jmx.conf
{
  "host" : "127.0.0.1",
  "port" : 9010,
  "alias" : "test.homeserver.elasticsearch",
  "queries" : [
  {
    "object_name" : "java.lang:type=Memory",
    "object_alias" : "Memory"
  }, {
    "object_name" : "java.lang:type=Runtime",
    "attributes" : [ "Uptime", "StartTime" ],
    "object_alias" : "Runtime"
  }, {
    "object_name" : "java.lang:type=GarbageCollector,name=*",
    "attributes" : [ "CollectionCount", "CollectionTime" ],
    "object_alias" : "${type}.${name}"
  }, {
    "object_name" : "java.nio:type=BufferPool,name=*",
    "object_alias" : "${type}.${name}"
  } ]
}
C:\logstash>type conf\sample05.conf
input {
  jmx {
    path => "c:\logstash\conf\jmx.conf"
    polling_frequency => 60
    type => "jmx"
    nb_thread => 4
  }
}

output {
  stdout {
    codec => rubydebug
  }
}

C:\logstash>

(Magnus B├Ąck) #2

Have you tried using forward slashes in the Logstash configuration, i.e. c:/logstash/conf/jmx.conf instead of c:\logstash\conf\jmx.conf?


(Samfukuda) #3

Thanks for your reply, Magnus.

Yes, I did. both of them are telling same.

and just tried to seek out something /w --debug.
in case of \ tells me - config LogStash::Inputs::Jmx/@path = "c:\logstash\conf\jmx.conf"
in case of / tells me - config LogStash::Inputs::Jmx/@path = "c:/logstash/conf/jmx.conf"

yap, there's still nothing...


(Samfukuda) #4

resolved by myself.

logstash-input-jmx is requring path name and no acceptable file name...yap, that's my fault.
I've verified it works when I create the path as c:\logstash\conf\jmx and moved a file jmx.conf to.

logstash\vendor\bundle\jruby\1.9\gems\logstash-input-jmx-0.1.5\lib\logstash\inputs\jmx.rb told me what I made.....

ciao,
-susumu


(system) #5