Git Product home page Git Product logo

Comments (12)

jordansissel avatar jordansissel commented on June 12, 2024

lumberjack is working fine for me in 160 production devices, probably going to need some more information about what you're seeing before I can figure out what's wrong ;)

from logstash-forwarder.

jordansissel avatar jordansissel commented on June 12, 2024

Also, there's a test suite to verify functionality of lumberjack - what happens if you run 'rspec' (you'll probably need to do 'bundle install' first)

from logstash-forwarder.

jordansissel avatar jordansissel commented on June 12, 2024

And lastly, how are you running lumberjack? With the lumberjack.sh? or directly as lumberjack?

from logstash-forwarder.

jbussdieker avatar jbussdieker commented on June 12, 2024

I get the following output when I run rspec. In my other tests I tried both lumberjack and the wrapper. Same result.

Generating RSA private key, 1024 bit long modulus
..++++++
..............................................................++++++
e is 65537 (0x10001)
Signature ok
subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
Getting Private key

An error occurred in an after hook
  NoMethodError: undefined method `pid' for nil:NilClass
  occurred at /home/jbussdieker/Desktop/lumberjack/spec/lumberjack_spec.rb:42:in `block (2 levels) in <top (required)>'

FGenerating RSA private key, 1024 bit long modulus
.........++++++
..++++++
e is 65537 (0x10001)
Signature ok
subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
Getting Private key

An error occurred in an after hook
  NoMethodError: undefined method `pid' for nil:NilClass
  occurred at /home/jbussdieker/Desktop/lumberjack/spec/lumberjack_spec.rb:42:in `block (2 levels) in <top (required)>'

FGenerating RSA private key, 1024 bit long modulus
..................................................++++++
.....++++++
e is 65537 (0x10001)
Signature ok
subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
Getting Private key

An error occurred in an after hook
  NoMethodError: undefined method `pid' for nil:NilClass
  occurred at /home/jbussdieker/Desktop/lumberjack/spec/longrun_spec.rb:40:in `block (2 levels) in <top (required)>'

F

Failures:

  1) lumberjack should follow a file and emit lines as events
     Failure/Error: @lumberjack = IO.popen("build/bin/lumberjack --host localhost " \
     Errno::ENOENT:
       No such file or directory - build/bin/lumberjack --host localhost --port 50642 --ssl-ca-path /tmp/lumberjack-test-file20121005-22917-1f994we /tmp/lumberjack-test-file20121005-22917-x9tf19
     # ./spec/lumberjack_spec.rb:24:in `popen'
     # ./spec/lumberjack_spec.rb:24:in `block (2 levels) in <top (required)>'

  2) lumberjack should follow a slowly-updating file and emit lines as events
     Failure/Error: @lumberjack = IO.popen("build/bin/lumberjack --host localhost " \
     Errno::ENOENT:
       No such file or directory - build/bin/lumberjack --host localhost --port 56119 --ssl-ca-path /tmp/lumberjack-test-file20121005-22917-7ey9ib /tmp/lumberjack-test-file20121005-22917-13j6csz
     # ./spec/lumberjack_spec.rb:24:in `popen'
     # ./spec/lumberjack_spec.rb:24:in `block (2 levels) in <top (required)>'

  3) lumberjack should follow stdin
     Failure/Error: @lumberjack = IO.popen("build/bin/lumberjack --host localhost " \
     Errno::ENOENT:
       No such file or directory - build/bin/lumberjack --host localhost --port 58699 --ssl-ca-path /tmp/lumberjack-test-file20121005-22917-smxnl4 -
     # ./spec/longrun_spec.rb:23:in `popen'
     # ./spec/longrun_spec.rb:23:in `block (2 levels) in <top (required)>'

Finished in 0.18475 seconds
3 examples, 3 failures

Failed examples:

rspec ./spec/lumberjack_spec.rb:46 # lumberjack should follow a file and emit lines as events
rspec ./spec/lumberjack_spec.rb:71 # lumberjack should follow a slowly-updating file and emit lines as events
rspec ./spec/longrun_spec.rb:44 # lumberjack should follow stdin

from logstash-forwarder.

jordansissel avatar jordansissel commented on June 12, 2024

Ahh, so the unit tests at least confirm what you are seeing.

from logstash-forwarder.

jordansissel avatar jordansissel commented on June 12, 2024

what does 'ldd build/bin/lumberjack' output?

from logstash-forwarder.

jordansissel avatar jordansissel commented on June 12, 2024

And what platform/os is this?

from logstash-forwarder.

jbussdieker avatar jbussdieker commented on June 12, 2024
~/Desktop/lumberjack
$ ldd build/bin/lumberjack
    linux-vdso.so.1 =>  (0x00007fff3dbfb000)
    libzmq.so.1 => /home/jbussdieker/Desktop/lumberjack/build/bin/../lib/libzmq.so.1 (0x00007fd89bd53000)
    libjemalloc.so.1 => /home/jbussdieker/Desktop/lumberjack/build/bin/../lib/libjemalloc.so.1 (0x00007fd89bb07000)
    libssl.so.1.0.0 => /home/jbussdieker/Desktop/lumberjack/build/bin/../lib/libssl.so.1.0.0 (0x00007fd89b89f000)
    libcrypto.so.1.0.0 => /home/jbussdieker/Desktop/lumberjack/build/bin/../lib/libcrypto.so.1.0.0 (0x00007fd89b4c5000)
    libz.so.1 => /home/jbussdieker/Desktop/lumberjack/build/bin/../lib/libz.so.1 (0x00007fd89b2ae000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd89b083000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd89ae66000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd89aaa7000)
    libuuid.so.1 => /home/jbussdieker/Desktop/lumberjack/build/bin/../lib/libuuid.so.1 (0x00007fd89a8a1000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd89a5a1000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd89a38b000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fd89bfd4000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd89a186000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd899e8c000)
$ uname -a
Linux hostname 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

from logstash-forwarder.

jbussdieker avatar jbussdieker commented on June 12, 2024

Ubuntu 12.04 Precise

from logstash-forwarder.

jbussdieker avatar jbussdieker commented on June 12, 2024
diff --git a/proto.c b/proto.c
index 55008d2..a06da0f 100644
--- a/proto.c
+++ b/proto.c
@@ -433,6 +433,7 @@ static int lumberjack_read_ack(struct lumberjack *lumberjack, uint32_t *sequence

 int lumberjack_send_data(struct lumberjack *lumberjack, const char *payload,
                          size_t payload_len) {
+  printf("%*s\n", (int)payload_len, payload);
   /* TODO(sissel): support a 'free' function to free the payload when it's done */
                          //void (*free_func)(void *payload, void *hint()))
   struct str *frame = str_new_size(sizeof(uint32_t) + payload_len);

This exposes it :(. Size is right but string is zeroed.

from logstash-forwarder.

jbussdieker avatar jbussdieker commented on June 12, 2024

Oh nm I guess the empty message is my poor debugging. I didn't realize the structure of const char _payload was more complicated than I thought.
printf("%_s\n", (int)payload_len, payload);

from logstash-forwarder.

jordansissel avatar jordansissel commented on June 12, 2024

hah, yeah, the first 4 bytes is an int, usually small, so first few bytes are usually zero. Still, the unit tests should pass for you.

from logstash-forwarder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.