Bug Error opening database file

Status
Not open for further replies.

IFireflyl

Customer
Hello. I am getting the following server log ever every 10 minutes or so after installing the latest Member Map (2.3.8):

Code:
MaxMind\Db\Reader\InvalidDatabaseException: [MemberMap] Invalid GeoIp2 database: Error opening database file (/home/lionhea3/forums.lionheartforums.net/internal_data/code_cache/dbtechMemberMap/GeoLite2-City.mmdb). Is this a valid MaxMind DB file? src/addons/DBTech/MemberMap/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php:281
Generated by: IFireflyl Feb 4, 2020 at 10:13 AM

#0 src/addons/DBTech/MemberMap/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php(69): MaxMind\Db\Reader->findMetadataStart('/home/lionhea3/...')
#1 src/addons/DBTech/MemberMap/vendor/geoip2/geoip2/src/Database/Reader.php(54): MaxMind\Db\Reader->__construct('/home/lionhea3/...')
#2 src/addons/DBTech/MemberMap/Service/GeoLocate.php(48): GeoIp2\Database\Reader->__construct('/home/lionhea3/...')
#3 src/XF/Container.php(270): DBTech\MemberMap\Service\GeoLocate->__construct(Object(XF\Admin\App))
#4 src/XF/App.php(1570): XF\Container->createObject('DBTech\\MemberMa...', Array)
#5 src/XF/Container.php(228): XF\App->XF\{closure}('DBTech\\MemberMa...', Array, Object(XF\Container))
#6 src/XF/App.php(2776): XF\Container->create('service', 'DBTech\\MemberMa...', Array)
#7 src/addons/DBTech/MemberMap/Repository/GeoIp.php(76): XF\App->service('DBTech\\MemberMa...')
#8 src/addons/DBTech/MemberMap/Cron/GeoIp.php(23): DBTech\MemberMap\Repository\GeoIp->scanUsers()
#9 [internal function]: DBTech\MemberMap\Cron\GeoIp::scanIps(Array)
#10 src/XF/Admin/Controller/CronEntry.php(112): call_user_func(Array, Array)
#11 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\CronEntry->actionRun(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:CronEntry', 'Run', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\CronEntry), NULL)
#13 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\CronEntry), NULL)
#14 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#16 src/XF.php(391): XF\App->run()
#17 admin.php(13): XF::runApp('XF\\Admin\\App')
#18 {main}

Any thoughts on what the issue could be? The DB exists, so I'm not sure why it wouldn't be able to be opened.
 
Make sure you have filled out the MaxMind API key, then re-run the cron job that updates the GeoIP database.
 
I have done that. The key is populated, and it's been several hours so it's not the issue where it needs 5 minutes to update on the MaxMind side. I've sent you photos of my settings via PM. I'm sure you aren't going to try to do anything unscrupulous with the info. :D
 
Have you had any luck looking into this? I tried uninstalling the Member Map, deleting the internal_data/code_cache/dbtechMemberMap folder, and then re-installing the Member Map. I still get the same error when I re-install, set up my Google Maps and Max Mind license keys, and then run the CRON job. It seems to be having a problem with that GeoLite2-City.mmdb file, but I'm not sure why. Maybe my permissions didn't get set up properly? What permissions level should that file have?
 
If you open the mmdb file yourself after running the cron, what does it say? I’m assuming the file is actually only 4kb or so instead of the full ~70 MB a normal file would be, and contains an error message.
 
"Invalid license key" is the only thing the file says. And it's only 20 bytes.

Which doesn't make sense because I've copied the license key directly from the Max Mind site and saved it in a text file. It's the same key that Max Mind generated for me.
 
Then there’s nothing more I can do at this time - assuming you haven’t customised any of the MemberMap files (meaning the upgrade didn’t overwrite that file).

The only thing I can think of is that a space or other control character snuck into the setting somehow and is causing issues.
 
The issue was apparently with old Member Map files. When I uninstalled the addon before, I only did so through my forum itself by clicking Uninstall. I then deleted the internal_data/code_cache/dbtechMemberMap folder, but I didn't delete any of the other folders (js/DBTech/MemberMap, or src/addons/DBTech/MemberMap, or styles/DBTech/MemberMap). This time I completely uninstalled and deleted all folders. Then I reinstalled from archive (using the .zip file), I filled out the Google and Max Mind keys with the same keys I've had, and viola. It works. I'm not sure what was happening, but it SEEMS like something with the old files was interfering. Either way, it is fixed now. Thanks for talking me through this.
 
Hello @IFireflyl,

We hope your ticket regarding DragonByte Member Map has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

DragonByte Member Map

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
1,665
Customer rating
5.00 star(s) 1 ratings
Back
Top