ESI Transition Test Release

Testing before new release
User avatar
edp
Someday Author
Posts: 93
Joined: Fri Sep 25, 2009 19:10

Re: ESI Transition Test Release

Post by edp » Wed Jun 07, 2017 22:31

ok, one more log coordinated trace:

This error in the httpd log:
[Wed Jun 07 16:20:20.355157 2017] [php7:notice] [pid 36299] [client xxx.xxx.xxx:xxxxx] PHP 2: reset() expects parameter 1 to be array, null given in /var/www/tiod.wtf/kbtest/common/includes/esi/class.helpers.php on line 187, referer: http://kbtest.tiod.wtf/?a=home

Coordinates with this access log:

[07/Jun/2017:16:20:20 -0400] "GET /index.php/kill_detail/1555/ HTTP/1.1" 200 9456 "http://kbtest.tiod.wtf/?a=home" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393"

[07/Jun/2017:16:20:20 -0400] "GET /thumb.php/region/30003271_145.png HTTP/1.1" 200 2365 "http://kbtest.tiod.wtf/index.php/kill_detail/1555/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393"

[07/Jun/2017:16:20:20 -0400] "GET /thumb.php/map/30003271_145.png HTTP/1.1" 200 8210 "http://kbtest.tiod.wtf/index.php/kill_detail/1555/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393"

[07/Jun/2017:16:20:20 -0400] "GET //mods/ship_display_tool/images/flashImage/mis_1.png HTTP/1.1" 200 4855 "http://kbtest.tiod.wtf/index.php/kill_detail/1555/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393"

[07/Jun/2017:16:20:20 -0400] "GET /thumb.php/cons/30003271_145.png HTTP/1.1" 200 1987 "http://kbtest.tiod.wtf/index.php/kill_detail/1555/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393"

[07/Jun/2017:16:20:20 -0400] "GET //mods/ship_display_tool/images/flashImage/act.png HTTP/1.1" 200 1632 "http://kbtest.tiod.wtf/index.php/kill_detail/1555/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393"

[07/Jun/2017:16:20:20 -0400] "POST /index.php/kill_detail/1555/?xajax=1 HTTP/1.1" 200 - "http://kbtest.tiod.wtf/index.php/kill_detail/1555/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393"

[07/Jun/2017:16:20:22 -0400] "POST /index.php/kill_detail/1555/?xajax=1 HTTP/1.1" 200 118 "http://kbtest.tiod.wtf/index.php/kill_detail/1555/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393"

Which has this message.log entry:

Jun 7 16:20:20 dbd-fedora-23 audit: AVC avc: denied { execmem } for pid=36299 comm="httpd" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=1

User avatar
Salvoxia
Developer
Posts: 1436
Joined: Wed Feb 22, 2012 12:11

Re: ESI Transition Test Release

Post by Salvoxia » Thu Jun 08, 2017 10:47

Hi,

thank you very much for your work of correlating the error log with the access log! That was very helpful, I was able to replicate and fix the error (it was caused by NPC factions as attacker on a killmail).
However, I'm specifically looking for another error.
I was able to provoke it at your killboard while access the URL http://kbtest.tiod.wtf/index.php/pilot_detail/90276065/ at 10:45am GMT+2 (just before the time of this post).
It would be most helpful if you could find an entry in the error log corresponding to that request.

Best Regards,
Salvoxia

User avatar
edp
Someday Author
Posts: 93
Joined: Fri Sep 25, 2009 19:10

Re: ESI Transition Test Release

Post by edp » Thu Jun 08, 2017 21:46

That event resulted in the following:

error_log.log: (httpd)

[php7:error] [pid 36300] [client xxx.xxx.xxx.xxx:xxxxx] PHP Fatal error: Uncaught Swagger\\Client\\ApiException: API call to https://esi.tech.ccp.is/latest/characte ... ranquility failed: Resolving timed out after 3005 milliseconds (cURL error code: 0, tried 1 times) in /var/www/tiod.wtf/kbtest/common/includes/esi/class.esi.php:216\nStack trace:\n#0 /var/www/tiod.wtf/kbtest/common/esi/lib/EsiClient/CharacterApi.php(192): EDK\\ESI\\ESI->callApi('/characters/902...', 'GET', Array, '', Array, '\\\\Swagger\\\\Client...', '/characters/{ch...')\n#1 /var/www/tiod.wtf/kbtest/common/includes/class.pilot.php(556): EsiClient\\CharacterApi->getCharactersCharacterIdWithHttpInfo(90276065, 'tranquility')\n#2 /var/www/tiod.wtf/kbtest/common/pilot_detail.php(155): Pilot->fetchPilot()\n#3 /var/www/tiod.wtf/kbtest/common/includes/class.pageassembly.php(70): pPilotDetail->stats(Object(pPilotDetail))\n#4 /var/www/tiod.wtf/kbtest/common/includes/class.pageassembly.php(37): pageAssembly->call('this->stats')\n#5 /var/www/tiod.wtf/kbtest/common/pilot_detail.php(465): pageAssembly->assemble()\n#6 /var/w in /var/www/tiod.wtf/kbtest/common/includes/esi/class.esi.php on line 216, referer: http://kbtest.tiod.wtf/index.php/pilot_detail/671195541

access.log:

[08/Jun/2017:04:45:20 -0400] "GET /index.php/pilot_detail/90276065/ HTTP/1.1" 500 20 "http://kbtest.tiod.wtf/index.php/pilot_ ... 671195541/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.82 Safari/537.36 Vivaldi/1.9.818.44"

User avatar
edp
Someday Author
Posts: 93
Joined: Fri Sep 25, 2009 19:10

Re: ESI Transition Test Release

Post by edp » Fri Jun 16, 2017 21:39

Any new updates Sal?

User avatar
Salvoxia
Developer
Posts: 1436
Joined: Wed Feb 22, 2012 12:11

Re: ESI Transition Test Release

Post by Salvoxia » Sat Jun 17, 2017 11:17

Hi,

sorry, not yet.
That error seems to be some kind of problem with your DNS server. Sometimes it seems to fail resolving the ESI server to an IP address, causing the ESI call to fail.
I'll have to catch all ESI exceptions handle them properly, but other than that there's nothing EDK can do about it.

I've been busy integrating ESI SSO Registration for fetching pilot's kills using ESI, but that's still work in progress.
I'll post here as soon as there's an update to the test branch.
I very much appreciate your help with testing!

Best Regards,
Salvoxia

celagon
Greenhorn
Posts: 35
Joined: Mon Oct 07, 2013 01:50

Re: ESI Transition Test Release

Post by celagon » Fri Jul 21, 2017 03:36

im getting this when trying to post crest killmail.
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /home4/fintroll/public_html/dabkb/common/phpfastcache/src/phpFastCache/Core/Pool/ExtendedCacheItemPoolInterface.php on line 508


Getting this when trying to look at stats page.
Fatal error: Call to a member function getTicker() on a non-object in /home4/fintroll/public_html/dabkb/common/corp_detail.php on line 215

User avatar
Salvoxia
Developer
Posts: 1436
Joined: Wed Feb 22, 2012 12:11

Re: ESI Transition Test Release

Post by Salvoxia » Fri Jul 21, 2017 20:08

Hi,

Thank you very much for giving it a try, that's very helpful!

What PHP version are you using it with? The first error hints to version earlier than 5.4b is that possible?
I'll have to take a closer look at the second error, will report back on that.

Best Regards,
Salvoxia

celagon
Greenhorn
Posts: 35
Joined: Mon Oct 07, 2013 01:50

Re: ESI Transition Test Release

Post by celagon » Sat Jul 22, 2017 08:02

Both problem fixed by updating php version to 5.6.

User avatar
Salvoxia
Developer
Posts: 1436
Joined: Wed Feb 22, 2012 12:11

Re: ESI Transition Test Release

Post by Salvoxia » Sun Oct 08, 2017 21:04

There is an updated version of the ESI transition release available.
It now contains SSO registration for character and corporation level killmail fetching. The old XML API Killlog has been removed and replaced by ESI.

For enabling SSO registration for EDK it necessary for the Killboard administrator to register their killboard as SSO using application with CCP. The application should be set to be allowed to request the permission scopes for character and corporation level ESI killmail fetching. Also, a callback URL must be entered, that the SSO registration will redirect to. EDK will tell you the URL you need to enter in ACP -> SSO Keys.
The registration will yield a client ID and secret key. Both must be entered into the EDK installation in ACP -> SSO Keys.

It then is possible to register characters or corporations for killmail fetching. Therer is a new top navigation menu item called "SSO Registration". If a character wants to register for corporation level killmail fetching, it must be a director. Otherwise, killmail fetching will fail with a "Forbidden" status code.

This release also contains a cron job cron_esi.php that will replace the old cron_api.php cron job.

There is also a new configuration setting called "Maximum processing time per ESI SSO key [s]". That setting will determine the amount of time EDK may spend processing kills for a single SSO key. This is necessary for EDK, because killmail fetching via ESI works "backwards": You can only request the most recent kills or kills BEFORE a given kill ID. So when fetching kills, EDK needs to start "now" and work itself into the past. To make sure each SSO token will be checked in each cycle, that setting limits the time spent on a single token.
This implies, that rather few kills might be posted for each SSO token in a cycle. This can be countered by using a higher frequency for the cron job.

ESI fetching should work fine with this release, ESI error handling needs some more attention, though. Each registered SSO key has an error counter, that will be increased whenever an error occurs while fetching kills using that particular access token. If five consecutive tries failed, the token will no longer be used. Currently, any error will count towards that failure count. This needs to be handled more differentiated.

This release can be found under the link in the opening post.


Best Regards,
Salvoxia

Post Reply

Return to “Testing”

Who is online

Users browsing this forum: No registered users and 1 guest