allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
18.38k stars 1.11k forks source link

What means "Failed to mmap" #2143

Open unclesamwk opened 3 years ago

unclesamwk commented 3 years ago

Hey,

what means this error message, because what can i do to fixit?

goaccess 1.5.1

/usr/local/bin/goaccess /logs/archive/2021_07_05-access.log -a --no-parsing-spinner --no-global-config --log-format COMBINED --date-spec=2 --date-spec=4 --date-spec=6 --date-spec=12 --db-path /logs/.goaccess/DB/GA_DB_WHOLE --restore --persist

Failed to mmap /logs/.goaccess/DB/GA_DB_WHOLE/IS32_REQUESTS_MTRC_DATAMAP.db: Invalid argument
tpl_load failed for file /logs/.goaccess/DB/GA_DB_WHOLE/IS32_REQUESTS_MTRC_DATAMAP.db

greetings sam

allinurl commented 3 years ago

Does /logs/.goaccess/DB/GA_DB_WHOLE/ exist? Please make sure it has been previously created and it's writable. e.g.,

# mkdir -p /logs/.goaccess/DB/GA_DB_WHOLE/
unclesamwk commented 3 years ago

Yes folder exist, and the file too!

allinurl commented 3 years ago

Was that the first run and no db files existed before on that folder? also are you getting this error after successfully parsing your log and exiting from the terminal interface or as soon as you run goaccess (before parsing anything)? finally can you please post the output after running goaccess through strace?

strace /usr/local/bin/goaccess /logs/archive/2021_07_05-access.log -a --no-parsing-spinner --no-global-config --log-format COMBINED --date-spec=2 --date-spec=4 --date-spec=6 --date-spec=12 --db-path /logs/.goaccess/DB/GA_DB_WHOLE --restore --persist