Comments (12)
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.
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.
And lastly, how are you running lumberjack? With the lumberjack.sh? or directly as lumberjack?
from logstash-forwarder.
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.
Ahh, so the unit tests at least confirm what you are seeing.
from logstash-forwarder.
what does 'ldd build/bin/lumberjack' output?
from logstash-forwarder.
And what platform/os is this?
from logstash-forwarder.
~/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.
Ubuntu 12.04 Precise
from logstash-forwarder.
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.
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.
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)
- Logstash Forwarder Keeps Rotated Files Open HOT 5
- Beta4 -> RC1, send fail
- logstash-forwarder tcp input HOT 4
- rotate logstash forwarder's log HOT 4
- Logstash-forwarder cannot get data from the beginning. HOT 2
- way to override 24hr inactivity in a file harvester? HOT 2
- logstash forwarder HOT 1
- how to exclude files using pattern HOT 1
- tailing log file not registering events (logstash forwarder with -tail=true) HOT 1
- Make offset field in LSF optional HOT 1
- Filebeat - transport.go:125: SSL client failed to connect with: read tcp connection reset by peer HOT 1
- logstash multiline codec not working as expected
- how to set logstash-forward encoding HOT 1
- Received fatal alert: bad_certificate HOT 2
- Minor miss in lumberjack documentation HOT 2
- Logstash-forwarder exclude gzip files HOT 7
- c HOT 1
- Run on the ARM (RaspberryPi) HOT 1
- Update Lumberjack documentation to latest
- How to update logstash 8.9.1 to 8.12.02
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logstash-forwarder.