sematext / logagent-js

Extensible log shipper with input/output plugins, buffering, parsing, data masking, and small memory/CPU footprint
https://sematext.com/logagent
Apache License 2.0
389 stars 79 forks source link

pipe and redirect hangs #210

Open madsbredholt opened 4 years ago

madsbredholt commented 4 years ago

We are unable to pipe and redirect,(stdout, stderr hangs) data out of docker, due to chances done in the sematext logagent.

This became an issue for us after upgrading the logagent from version 2.0.184 to 3.0.18, 3.0.21

The following can be done to recreate the problem locally.

The following is an example that hangs on ouput.

docker run -i --rm -e LOGSENE_ENABLED=false --log-driver none mysql:5.7.27 sh -c ”mysqldump ...” > dump.sql 2> dump_err.log

Our environment details:

AWS CentOs 7 AMI

Docker Engine 19.03.1 and 19.03.5

megastef commented 4 years ago

Hi, when you use no log diver, or any other log driver than json-file or journald, you probably don't need to set LOGSENE_ENABLED=false.

Please try:

docker run -i --rm --log-driver none mysql:5.7.27 sh -c ”mysqldump ...” > dump.sql 2> dump_err.log

I assume Logagent will not collect the output, and will not make a detach API call for the container.

madsbredholt commented 4 years ago

Hi

We will git it a try and get back to you.

Regards Mads


Fra: Megastef notifications@github.com Sendt: fredag 6. mars 2020 01:56 Til: sematext/logagent-js logagent-js@noreply.github.com Kopi: Mads bredholt mads.bredholt@staminagroup.no; Author author@noreply.github.com Emne: Re: [sematext/logagent-js] pipe and redirect hangs (#210)

Hi, when you use no log diver, or any other log driver than json-file or journald, you probably don't need to set LOGSENE_ENABLED=false.

Please try:

docker run -i --rm --log-driver none mysql:5.7.27 sh -c ”mysqldump ...” > dump.sql 2> dump_err.log

I assume Logagent will not collect the output, and will not make a detach API call for the container.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sematext/logagent-js/issues/210?email_source=notifications&email_token=AB47WFDGNVDKLCVRGJITL5TRGBC4FA5CNFSM4LCG7BD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7PB4I#issuecomment-595521777, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB47WFCA33VL63VAC2WWWQDRGBC4FANCNFSM4LCG7BDQ.

otisg commented 4 years ago

Any luck with this @madsbredholt ?

madsbredholt commented 4 years ago

Hi We have'nt had time to look at this yet. I'll get back to you as soon as we have had a chance to it.

Regards Mads

Get Outlook for Androidhttps://aka.ms/ghei36


From: Otis Gospodnetić notifications@github.com Sent: Monday, March 16, 2020 10:13:26 PM To: sematext/logagent-js logagent-js@noreply.github.com Cc: Mads bredholt mads.bredholt@staminagroup.no; Mention mention@noreply.github.com Subject: Re: [sematext/logagent-js] pipe and redirect hangs (#210)

Any luck with this @madsbredholthttps://github.com/madsbredholt ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/sematext/logagent-js/issues/210#issuecomment-599760875, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB47WFCWCS5QYJNSZI2Z5ODRH2I7NANCNFSM4LCG7BDQ.