help with this error: cURL error 6: Could not resolve host: upgrade-check.json

sucre13

Moderator
Staff member
Moderator
Collaborate
Registered
Joined
Jan 19, 2019
Messages
836
Points
153

Reputation:

GuzzleHttp\Exception\ConnectException: XenForo upgrade check failed: cURL error 6: Could not resolve host: upgrade-check.json (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:185

#0 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 src/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 src/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#4 src/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#5 src/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(66): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#6 src/vendor/guzzlehttp/guzzle/src/Middleware.php(30): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#7 src/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(70): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#8 src/vendor/guzzlehttp/guzzle/src/Middleware.php(58): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#9 src/vendor/guzzlehttp/guzzle/src/HandlerStack.php(67): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#10 src/vendor/guzzlehttp/guzzle/src/Client.php(277): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#11 src/vendor/guzzlehttp/guzzle/src/Client.php(125): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#12 src/vendor/guzzlehttp/guzzle/src/Client.php(131): GuzzleHttp\Client->requestAsync('post', Object(GuzzleHttp\Psr7\Uri), Array)
#13 src/vendor/guzzlehttp/guzzle/src/Client.php(89): GuzzleHttp\Client->request('post', 'upgrade-check.j...', Array)
#14 src/XF/Service/Upgrade/Checker.php(67): GuzzleHttp\Client->__call('post', Array)
#15 src/XF/Job/UpgradeCheck.php(36): XF\Service\Upgrade\Checker->check()
#16 src/XF/Job/UpgradeCheck.php(9): XF\Job\UpgradeCheck->performUpgradeCheck()
#17 src/XF/Job/Manager.php(260): XF\Job\UpgradeCheck->run(8)
#18 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#19 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#20 job.php(43): XF\Job\Manager->runQueue(false, 8)
#21 {main}
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
370
Points
103

Reputation:

Disable the upgrade check option, which shall prevent this error from occurring again:

https://yoursitecom/admin.php?options/groups/basicBoard/#upgradeCheckStableOnly

Make sure this is unchecked.

1641128340064.png
 

sucre13

Moderator
Staff member
Moderator
Collaborate
Registered
Joined
Jan 19, 2019
Messages
836
Points
153

Reputation:

I have it disabled and I still get this error
 

dwinchester

Well-known member
Registered
Joined
Aug 12, 2020
Messages
188
Points
38

Reputation:

I have it disabled and I still get this error
sucre13Show us the info in ur main panel looks like ur libcurl is not installed on ur server, is a new one ?
 
View previous replies…

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

I've just been looking at this too. When you first install nulled xenforo, instantly it gives upgrade-check error.

This is because I've removed the api and licence key in xf.php

const XF_API_URL = '';
const XF_LICENSE_KEY = '';

From the look of it when you first install xenforo it adds a cron job XF:UpgradeCheck into table xf_job. This is triggered by the daily clean up cron.

I have two things to try.

1 delete the upgrade check from the database (tested seems to be ok)

2

UPDATE `xf_job` SET `manual_execute` = '0' WHERE `xf_job`.`job_id` = 9;

change to

UPDATE `xf_job` SET `manual_execute` = '1' WHERE `xf_job`.`job_id` = 9;


Will let ya know how it goes. Is this a new thing with xenforo? Can't say I've had any problems before.

Edit: 2 didn't work it shows a manual rebuild message. I'm just doing to drop XF:UpgradeCheck in the xf_job table.
 
Last edited:

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

XenForo 2.2.8 Released Full

Throw a prettier error if downloading an XF upgrade package fails?
 

sucre13

Moderator
Staff member
Moderator
Collaborate
Registered
Joined
Jan 19, 2019
Messages
836
Points
153

Reputation:

explain to me well the steps that I have to modify please
 

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

explain to me well the steps that I have to modify please
sucre13Unless anyone has a better idea i'm just going to drop XF:UpgradeCheck in the xf_job table.
 
Last edited:

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

/src/XF/Service/Upgrade/Checker.php has been edited in the latest version

Change

Code:
    public function check(&$detailedError = null)
    {

        $client = $this->app->http()->client();
        $errorMessage = null;
        $errorCode = null;
        $checkData = [];

Back to

Code:
    public function check(&$detailedError = null)
    {
        if (!$this->apiKey)
        {
            return null;
        }
        $client = $this->app->http()->client();
        $errorMessage = null;
        $errorCode = null;
        $checkData = [];

Error doesn't happen.
 
Last edited:

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,514
Points
523

Reputation:

/src/XF/Service/Upgrade/Checker.php has been edited in the latest version

Change

Code:
    public function check(&$detailedError = null)
    {

        $client = $this->app->http()->client();
        $errorMessage = null;
        $errorCode = null;
        $checkData = [];

Back to

Code:
    public function check(&$detailedError = null)
    {
        if (!$this->apiKey)
        {
            return null;
        }
        $client = $this->app->http()->client();
        $errorMessage = null;
        $errorCode = null;
        $checkData = [];

Error doesn't happen.
booThis problem is not caused by the API Key it is more caused by the missing XF_API_URL.
The URL looks like: https://xenforo.com/api/ and upgrade-check.json will be added by the script.

Ok if an API Key is missing an upgrade can't be performed anyway. If API key is missing you will see a message like:

The following issues must be resolved as soon as possible. Once they have been resolved, check for upgrades again to confirm.
  • This installation does not have an API key so the upgrade check could not be completed.
Code:
Server error log
ErrorException: XenForo upgrade check failed: No API key was included in the request. src\XF\Error.php:77

Stack trace
#0 src\XF.php(218): XF\Error->logError('XenForo upgrade...', false)
#1 src\XF\Service\Upgrade\Checker.php(133): XF::logError('XenForo upgrade...')
#2 src\XF\Admin\Controller\Tools.php(410): XF\Service\Upgrade\Checker->check()
#3 src\XF\Mvc\Dispatcher.php(352): XF\Admin\Controller\Tools->actionUpgradeCheck(Object(XF\Mvc\ParameterBag))
#4 src\XF\Mvc\Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'UpgradeCheck', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#5 src\XF\Mvc\Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#6 src\XF\Mvc\Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src\XF\App.php(2351): XF\Mvc\Dispatcher->run()
#8 src\XF.php(517): XF\App->run()
#9 admin.php(13): XF::runApp('XF\\Admin\\App')
#10 {main}
 
  • Like
Reactions: boo
View previous replies…

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

This problem is not caused by the API Key it is more caused by the missing XF_API_URL.
The URL looks like: https://xenforo.com/api/ and upgrade-check.json will be added by the script.

Ok if an API Key is missing an upgrade can't be performed anyway. If API key is missing you will see a message like:

The following issues must be resolved as soon as possible. Once they have been resolved, check for upgrades again to confirm.
  • This installation does not have an API key so the upgrade check could not be completed.
Code:
Server error log
ErrorException: XenForo upgrade check failed: No API key was included in the request. src\XF\Error.php:77

Stack trace
#0 src\XF.php(218): XF\Error->logError('XenForo upgrade...', false)
#1 src\XF\Service\Upgrade\Checker.php(133): XF::logError('XenForo upgrade...')
#2 src\XF\Admin\Controller\Tools.php(410): XF\Service\Upgrade\Checker->check()
#3 src\XF\Mvc\Dispatcher.php(352): XF\Admin\Controller\Tools->actionUpgradeCheck(Object(XF\Mvc\ParameterBag))
#4 src\XF\Mvc\Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'UpgradeCheck', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#5 src\XF\Mvc\Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#6 src\XF\Mvc\Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src\XF\App.php(2351): XF\Mvc\Dispatcher->run()
#8 src\XF.php(517): XF\App->run()
#9 admin.php(13): XF::runApp('XF\\Admin\\App')
#10 {main}
BattleKingEveryone will get this error daily. Maybe make a sticky thread until it's resolved?

For now I've just edited Checker.php
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,514
Points
523

Reputation:

Everyone will get this error daily. Maybe make a sticky thread until it's resolved?

For now I've just edited Checker.php
booI could create a new nulled version so that this problem will not be shown, or add an extra option to the ACP
 
Top