Skip to content

Error when running cron_esi.php #97

@StinGer-ShoGuN

Description

@StinGer-ShoGuN

Running cron_esi.php from crontab or through php-fpm (i.e. accessing cron/cron_esi.php from a web browser) fails with the following log:

"NOTICE: PHP message: PHP Warning:  curl_error(): supplied resource is not a valid cURL handle resource in /path/to/kb/common/includes/esi/class.esisso.php on line 428"
"NOTICE: PHP message: PHP Fatal error:  Uncaught EDK\ESI\EdkSsoException: Error querying OAUTH SSO server while fetching refreshed OAUTH SSO access access token: (HTTP Code: 0) in /path/to/kb/common/includes/esi/class.esisso.php:431"
"Stack trace:"
"#0 /path/to/kb/common/includes/esi/class.esisso.php(76): EDK\ESI\ESISSO->refreshAccessToken(false)"
"#1 /path/to/kb/common/includes/esi/class.esifetch.php(62): EDK\ESI\ESISSO->__construct('1')"
"#2 /path/to/kb/common/includes/esi/class.esifetch.php(86): EDK\ESI\ESIFetch::getByID('1')"
"#3 /path/to/kb/cron/cron_esi.php(27): EDK\ESI\ESIFetch::getAll()"
"#4 {main}"
"  thrown in /path/to/kb/common/includes/esi/class.esisso.php on line 431"

I have PHP 7.1.22 and curl 7.61.1. I think I made an update on curl not so long ago, and this is when the issue arose.

It seems the problem is caused by IPv6: curl is looking for an AAAA record for esi.evetech.com, which does not exist.
The solution is to tell curl to use IPv4 and look fo an A record.

When I have time, I will try to add this settings to curl configuration. In the meantime, if someone wants to fix it, I'll be more than happy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions