All Apps and Add-ons

Auto Update MaxMind Database - Unable to perform file operations on MaxMind database file. [Errno 20] Not a directory: '

rayar
Contributor

we have installed the Auto Update MaxMind Database

https://splunkbase.splunk.com/app/5482/

 

[splunk@ilissplsh01 splunk]$ /opt/splunk/bin/splunk btool limits list --debug | grep "db_path ="
/opt/splunk/etc/apps/AM_all_sh_tuning/local/limits.conf db_path = /opt/splunk/etc/apps/splunk_maxmind_db_auto_update/local/mmdb/GeoLite2-City.mmdb
[splunk@ilissplsh01 splunk]$

the update is failing with the below error 

Unable to perform file operations on MaxMind database file. [Errno 20] Not a directory: '/opt/splunk/etc/apps/splunk_maxmind_db_auto_update/local/mmdb/GeoLite2-City.mmdb'

the process is working only in case I remove the /opt/splunk/etc/apps/splunk_maxmind_db_auto_update/local/mmdb/GeoLite2-City.mmdb file manually

how I can automate it  ?  

Labels (2)

Canacker
Engager

The problem is at line 96 of maxmind_db_update_command.py

When the script is trying to look for the tar folder it looks for GeoLite2*

which means it will find the file and the directory. It blocks when it finds the file. Adding an _ after makes sure it finds the directory of the archive.

Canacker_2-1622552843812.png

 

Canacker_1-1622552690060.jpeg

 

# Solution

Fix for line 96 :

                    if filedir.startswith("GeoLite2-City_"):

We will eventually push this modification to the official github repo hopefully they will use this modification for splunkbase.

Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...