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

nsq_to_file: malformed gzip data #716

Closed
mreiferson opened this issue Jan 24, 2016 · 7 comments
Closed

nsq_to_file: malformed gzip data #716

mreiferson opened this issue Jan 24, 2016 · 7 comments

Comments

@mreiferson
Copy link
Member

nsq_to_file can corrupt output files when gzip is enabled.

See #677

@arduanov
Copy link

arduanov commented Aug 25, 2017

I'm affected this bug, about once a day nsq_to_file produces malformed gzip file.
Start parameters:

nsq_to_file --filename-format="<TOPIC>/<DATETIME>/data<REV>.json.gz" -datetime-format "ds=%d-%H-%M"  --skip-empty-files=true -gzip

@mreiferson
Copy link
Member Author

@arduanov can you provide any additional information beyond what's already been discussed in #677?

@arduanov
Copy link

arduanov commented Sep 4, 2017

I found the cause of the bug. Service falling due to an error and the gzip files becomes unreadable

ERR    7 [***/nsq_to_file] error querying nsqlookupd (http://127.0.0.1:4161/lookup?topic=***) - Get http://127.0.0.1:4161/lookup?topic=***: dial tcp 127.0.0.1:4161: socket: too many open files

@ploxiln
Copy link
Member

ploxiln commented Sep 4, 2017

That could be fixed in #935

@mreiferson
Copy link
Member Author

@arduanov thanks, can you share more of the logs?

@arduanov
Copy link

arduanov commented Sep 4, 2017

Here

Sep 03 12:39:38 srv nsq_to_file[64971]: 2017/09/03 12:39:38 INF   11 [***/nsq_to_file] querying nsqlookupd http://127.0.0.1:4161/lookup?topic=***
Sep 03 12:39:37 srv nsq_to_file[64971]: 2017/09/03 12:39:37 ERR    7 [***/nsq_to_file] error querying nsqlookupd (http://127.0.0.1:4161/lookup?topic=***) - Get http://127.0.0.1:4161/lookup?topic=***: dial tcp 127.0.0.1:4161: socket: too many open files
Sep 03 12:39:37 srv nsq_to_file[64971]: 2017/09/03 12:39:37 INF    7 [***/nsq_to_file] querying nsqlookupd http://127.0.0.1:4161/lookup?topic=***
Sep 03 12:39:37 srv nsq_to_file[64971]: 2017/09/03 12:39:37 ERROR: could not retrieve topic list: Failed to query any nsqlookupd: Get http://127.0.0.1:4161/topics: dial tcp 127.0.0.1:4161: socket: too many open files
Sep 03 12:39:37 srv nsq_to_file[64971]: 2017/09/03 12:39:37 syncing 65 records to disk

@mreiferson
Copy link
Member Author

Now that #935 and #1110 have landed, and the fact that we f.Sync() before responding FIN to messages, I'm going to consider this (and the original issue) resolved.

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

No branches or pull requests

3 participants