Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'slice' of undefined #206

Open
madsbredholt opened this issue Mar 2, 2020 · 10 comments
Open

Cannot read property 'slice' of undefined #206

madsbredholt opened this issue Mar 2, 2020 · 10 comments
Assignees
Labels

Comments

@madsbredholt
Copy link

madsbredholt commented Mar 2, 2020

We get the following in our logs after having upgraded from 2.0.184 to 3.0.21.

2020-03-02T11:05:13.016Z v3.0.21 pid[6] Container 4c41c2667758bd56da960ff10957c6c4575e24591f2cb1edcf9b5aafb7215ce6 /tmp-xb-backup setting LOGSENE_ENABLED=true
Please contact [email protected] to report the error:
UncaughtException:TypeError: Cannot read property 'slice' of undefined
TypeError: Cannot read property 'slice' of undefined
at BufferList.shallowSlice (/usr/local/lib/node_modules/@sematext/logagent/node_modules/bl/bl.js:210:29)
at DestroyableTransform. (/usr/local/lib/node_modules/@sematext/logagent/node_modules/docker-loghose/lib/parser.js:77:37)
at Array.forEach ()
at DestroyableTransform.publish (/usr/local/lib/node_modules/@sematext/logagent/node_modules/docker-loghose/lib/parser.js:75:13)
at DestroyableTransform.parse [as _transform] (/usr/local/lib/node_modules/@sematext/logagent/node_modules/docker-loghose/lib/parser.js:67:10)
at DestroyableTransform.Transform._read (/usr/local/lib/node_modules/@sematext/logagent/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (/usr/local/lib/node_modules/@sematext/logagent/node_modules/readable-stream/lib/_stream_transform.js:172:83)
at doWrite (/usr/local/lib/node_modules/@sematext/logagent/node_modules/readable-stream/lib/_stream_writable.js:428:64)
at writeOrBuffer (/usr/local/lib/node_modules/@sematext/logagent/node_modules/readable-stream/lib/_stream_writable.js:417:5)
at DestroyableTransform.Writable.write (/usr/local/lib/node_modules/@sematext/logagent/node_modules/readable-stream/lib/_stream_writable.js:334:11)

@otisg otisg assigned otisg and adnanrahic and unassigned otisg Mar 2, 2020
@adnanrahic adnanrahic added the bug label Mar 3, 2020
@adnanrahic
Copy link
Contributor

Hey @madsbredholt! Thanks for letting us know about this. I'm debugging this issue right away. Can you let me know how to exactly replicate this bug? What did you do and what is your configuration when this started happening? Thanks! 😄

@madsbredholt
Copy link
Author

madsbredholt commented Mar 3, 2020 via email

@adnanrahic
Copy link
Contributor

Okay. I've tested the latest release with Docker Compose and running it with Docker from the command line. I'll take a look at your specific Docker Stack configuration, and get back to you.

adnanrahic pushed a commit that referenced this issue Mar 3, 2020
@adnanrahic
Copy link
Contributor

Hey @madsbredholt. I've tested every single case with your specific configuration and did not manage to reproduce the issue.

However, I did manage to find the reason why your configuration was not shipping parsed files from the host. PR #207 fixes it. I'll let you know once the fix is released.

@megastef
Copy link
Contributor

megastef commented Mar 3, 2020

@adnanrahic the original error is probably a problem reading the log data from docker socket. ‘docker-loghose/lib/parser.js:77:37’ - Did it happen while ‘dockerd’ service made a restart? Try to restart dockerd to reproduce it.

@madsbredholt
Copy link
Author

madsbredholt commented Mar 4, 2020 via email

@madsbredholt
Copy link
Author

madsbredholt commented Mar 4, 2020 via email

@adnanrahic
Copy link
Contributor

Sure, I'll wait for that. In the meantime, I've pushed version 3.0.22 that fixes your other issue, mentioned through email. 😄

@otisg
Copy link
Member

otisg commented May 5, 2020

@madsbredholt can we assume this is no longer an issue for you?

@madsbredholt
Copy link
Author

madsbredholt commented May 6, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants