Bug [MemberMap] Invalid GeoIp2 database: Error opening database file

Status
Not open for further replies.

afflift

Customer
I upgraded to the most recent version and now we're getting the following error:

  • MaxMind\Db\Reader\InvalidDatabaseException: [MemberMap] Invalid GeoIp2 database: Error opening database file (/var/www/html/f/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
Stack trace
#0 src/addons/DBTech/MemberMap/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php(69): MaxMind\Db\Reader->findMetadataStart()
#1 src/addons/DBTech/MemberMap/Service/GeoLocate.php(48): MaxMind\Db\Reader->__construct()
#2 src/XF/Container.php(270): DBTech\MemberMap\Service\GeoLocate->__construct()
#3 src/XF/App.php(1570): XF\Container->createObject()
#4 src/XF/Container.php(228): XF\App->XF\{closure}()
#5 src/XF/App.php(2776): XF\Container->create()
#6 src/addons/DBTech/MemberMap/Repository/GeoIp.php(76): XF\App->service()
#7 src/addons/DBTech/MemberMap/Cron/GeoIp.php(23): DBTech\MemberMap\Repository\GeoIp->scanUsers()
#8 [internal function]: DBTech\MemberMap\Cron\GeoIp::scanIps()
#9 src/XF/Job/Cron.php(34): call_user_func()
#10 src/XF/Job/Manager.php(253): XF\Job\Cron->run()
#11 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal()
#12 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry()
#13 job.php(42): XF\Job\Manager->runQueue()
#14 {main}
 
Try manually running the cron job from Member Map that updates the GeoIP database. What's your max_execution_time set at? Any errors in the server error log from the upgrade?
 
Ah, another error from the cron I believe:

  • UnexpectedValueException: [MemberMap] Error updating GeoIP: internal corruption of phar "/var/www/html/f/internal_data/temp/GeoLite2-City.tar.gz" (__HALT_COMPILER(); not found)
  • src/addons/DBTech/MemberMap/Repository/GeoIp.php:134
Stack trace
#0 src/addons/DBTech/MemberMap/Repository/GeoIp.php(134): PharData->__construct()
#1 src/addons/DBTech/MemberMap/Cron/GeoIp.php(35): DBTech\MemberMap\Repository\GeoIp->geoIpUpdate()
#2 [internal function]: DBTech\MemberMap\Cron\GeoIp::geoIpUpdate()
#3 src/XF/Admin/Controller/CronEntry.php(112): call_user_func()
#4 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\CronEntry->actionRun()
#5 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass()
#6 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch()
#7 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop()
#8 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#9 src/XF.php(391): XF\App->run()
#10 admin.php(13): XF::runApp()
#11 {main}

Request state
array(4) {
["url"] => string(42) "/f/admin.php?cron/dbtechMemberMapGeoIp/run"
["referrer"] => string(37) "https://afflift.com/f/admin.php?cron/"
["_GET"] => array(1) {
["cron/dbtechMemberMapGeoIp/run"] => string(0) ""
}
["_POST"] => array(1) {
["_xfToken"] => string(8) "********"
}
}
 
This could be because of your max execution time. Double it to 60, restart Apache, then try again.
 
It is. A default key is provided during initial installation in order to ensure installation can proceed, but updates require your own key (it's free from MaxMind's site).

I have hotfixed the latest version with a new server error log entry for this situation, to avoid the issue of a corrupt MaxMind DB file.
 
I added the key, ran the cron, and this is the error:

  • UnexpectedValueException: [MemberMap] Error updating GeoIP: internal corruption of phar "/var/www/html/f/internal_data/temp/GeoLite2-City.tar.gz" (__HALT_COMPILER(); not found)
  • src/addons/DBTech/MemberMap/Repository/GeoIp.php:134
Stack trace
#0 src/addons/DBTech/MemberMap/Repository/GeoIp.php(134): PharData->__construct()
#1 src/addons/DBTech/MemberMap/Cron/GeoIp.php(35): DBTech\MemberMap\Repository\GeoIp->geoIpUpdate()
#2 [internal function]: DBTech\MemberMap\Cron\GeoIp::geoIpUpdate()
#3 src/XF/Admin/Controller/CronEntry.php(112): call_user_func()
#4 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\CronEntry->actionRun()
#5 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass()
#6 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch()
#7 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop()
#8 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#9 src/XF.php(391): XF\App->run()
#10 admin.php(13): XF::runApp()
#11 {main}
 
I believe it's working now. You have to add your address to your account info even though they let you create an API key without it.
 
Actually, the issue is that - as their site states - it can take up to five minutes for the key to activate. I don't believe an address is required.
 
hi
the same!
after insert MaxMind Geo IP License Key

this error:
Stack-Trace
#0 src/addons/DBTech/MemberMap/Service/GeoLocate.php(105): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/www/doc/2...', 105, Array)
#1 src/addons/DBTech/MemberMap/Repository/GeoIp.php(88): DBTech\MemberMap\Service\GeoLocate->lookup('92.105.108.115')
#2 src/addons/DBTech/MemberMap/Cron/GeoIp.php(23): DBTech\MemberMap\Repository\GeoIp->scanUsers()
#3 [internal function]: DBTech\MemberMap\Cron\GeoIp::scanIps(Object(XF\Entity\CronEntry))
#4 src/XF/Job/Cron.php(34): call_user_func(Array, Object(XF\Entity\CronEntry))
#5 src/XF/Job/Manager.php(253): XF\Job\Cron->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}
Status der Anfrage
array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(27) "https://www.buggy-forum.de/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

https://www.buggy-forum.de/admin.php?logs/server-errors/42/delete

and now?
Greetings Jo
 
I've added a hotfix that should prevent that. If you re-download the add-on and re-upload it via the archive installer, with overwrite toggled on, it should be resolved.
 
Hello @afflift,

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.
 
Hello @afflift,

As we have not heard back from you, your ticket regarding DragonByte Member Map has now been closed.

If your ticket has not been resolved, please feel free to start a new support ticket and link back to this ticket.

If you have time, please leave a review on XenForo.com's Resource Manager.

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,736
Customer rating
5.00 star(s) 1 ratings
Back
Top