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

Getting 'Fatal error has occurred' while running goaccess via logrotate #2508

Open
alexander-beck opened this issue May 3, 2023 · 0 comments

Comments

@alexander-beck
Copy link

Hi,

The following error occurred while running goaccess via a logrotate postrotate script

GoAccess - version 1.7.2 - May  2 2023 06:21:09
Config file: /usr/local/goaccess/etc/goaccess/goaccess.conf

Fatal error has occurred
Error occurred at: src/goaccess.c - initializer - 1475
No input data was provided nor there's data to restore.
filename=$(ls -1t /var/log/nginx/access.log-* | head -1)
result=$(echo $filename | head -1 | xargs cat | grep -v stub_status | /usr/local/goaccess/bin/goaccess \
--html-custom-css=/archive.css \
--html-custom-js=/archive.js  \
--html-report-title=${HTML_REPORT_TITLE} \
-o ${OUTPUT} 2>&1)

Running the same script via console works perfectly fine.
Do you have any idea what could go wrong in our use case?

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

2 participants