Closed DaPoHou closed 4 years ago
401 Unauthorized
This comes from geonames.org
Is there a problem with your account?
I tried to create an account at geonames.org - but without sucess.
Perhaps there is a problem with this service?
You have an account with geonames.org?
You must enable the API service in your account page.
If you do not do this, you will get a 401 error.
I created a geonames account. I confirmed my email address I enabled the service at http://www.geonames.org/enablefreewebservice
I tested the service using:
I get a 401 response:
I waited 10 minutes. I tried again. It is now working.
Either:
Do you still have this problem?
The problem solved.
When the geonames database is used for automatic improvement, the log will generate the following error:
file_get_contents(http://api.geonames.org/searchJSON?name_startsWith=%E9%BE%99%E4%B8%AD%2C%E9%BE%99%E5%B1%B1%E7%A4%BE%E5%8C%BA%2C%E5%AE%98%E5%B1%B1%E9%95%87%2C%E7%9D%A2%E5%AE%81%E5%8E%BF%E5%BE%90%E5%B7%9E%E5%B8%82&amp;lang=zh-Hans&amp;fcode=CMTY&amp;fcode=ADM4&amp;fcode=PPL&amp;fcode=PPLA&amp;fcode=PPLC&amp;style=full&amp;username=xmlf): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized …/app/Http/Controllers/AutocompleteController.php:216 #0 [internal function]: Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees\{closure}(2, 'file_get_conten...', '/share/CACHEDEV...', 216, Array) #1 …/app/Http/Controllers/AutocompleteController.php(216): file_get_contents('http://api.geon...') #2 …/app/Http/Middleware/WrapHandler.php(79): Fisharebest\Webtrees\Http\Controllers\AutocompleteController->place(Object(Nyholm\Psr7\ServerRequest)) #3 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\WrapHandler->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) <b>#4 …/modules_v4/faces/src/Modules/FacesModule.php(80): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))</b> #5 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): UksusoFF\WebtreesModules\Faces\Modules\FacesModule->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #6 …/app/Http/Middleware/AuthVisitor.php(48): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #7 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\AuthVisitor->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #8 …/app/Http/Middleware/CheckCsrf.php(75): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #9 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #10 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #11 …/app/Http/Middleware/Router.php(121): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest)) #12 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\Router->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #13 …/app/Http/Middleware/BootModules.php(62): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #14 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BootModules->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #15 …/app/Http/Middleware/LoadRoutes.php(76): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #16 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\LoadRoutes->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #17 …/app/Http/Middleware/UseTransaction.php(45): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #18 …/vendor/illuminate/database/Concerns/ManagesTransactions.php(29): Fisharebest\Webtrees\Http\Middleware\UseTransaction::Fisharebest\Webtrees\Http\Middleware\{closure}(Object(Illuminate\Database\MySqlConnection)) #19 …/app/Http/Middleware/UseTransaction.php(46): Illuminate\Database\Connection->transaction(Object(Closure), 3) #20 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTransaction->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #21 …/app/Http/Middleware/DoHousekeeping.php(81): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #22 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\DoHousekeeping->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #23 …/app/Http/Middleware/UseTheme.php(70): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #24 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTheme->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #25 …/app/Http/Middleware/CheckForMaintenanceMode.php(51): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #26 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForMaintenanceMode->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #27 …/app/Http/Middleware/UseLanguage.php(73): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #28 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #29 …/app/Http/Middleware/UseSession.php(73): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #30 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #31 …/app/Http/Middleware/UseFilesystem.php(58): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #32 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseFilesystem->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #33 …/app/Http/Middleware/UseCache.php(74): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #34 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseCache->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #35 …/app/Http/Middleware/UpdateDatabaseSchema.php(58): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #36 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #37 …/app/Http/Middleware/UseDebugbar.php(67): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #38 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDebugbar->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #39 …/app/Http/Middleware/UseDatabase.php(90): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #40 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #41 …/vendor/middlewares/client-ip/src/ClientIp.php(81): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #42 …/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #43 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #44 …/app/Http/Middleware/HandleExceptions.php(75): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #45 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #46 …/app/Http/Middleware/BaseUrl.php(77): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #47 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #48 …/app/Http/Middleware/ReadConfigIni.php(67): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #49 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #50 …/app/Http/Middleware/SecurityHeaders.php(47): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #51 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #52 …/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #53 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #54 …/app/Http/Middleware/PhpEnvironment.php(49): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #55 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\PhpEnvironment->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher)) #56 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest)) #57 …/index.php(55): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest)) #58 {main}