Hi all,
I’m working on a Grails platform web service, reporting api requests to matomo.
This web service is seating behind a load balancer and when testing it, I can hit the public URL (passing through load balancer) or hit directly one of the front end servers (using a VPN).
When hitting the web service via public URL I can collect the IP address but when passing it in the request (CIP) to matomo it seems to provoke a “400, reason phrase: Bad Request” error (see examples below):
2021-04-16 13:01:47 INFO [i.w.WebAnalyticsService] {token_auth=…, idsite=6, rec=1, _id=Romania, uid=Romania, url=https://xxx/show/UKR06673820, action_name=show/UKR06673820, cip=80.96.3.4, apiv=1, rand=…, gt_ms=55}
2021-04-16 13:01:48 ERROR [i.w.WebAnalyticsService] An error occured calling Analytics service: status code: 400, reason phrase: Bad Request [token_auth:XXXXX, idsite:6, rec:1, _id:0customs-Romania, uid:customs-Romania, url:https://itdb.unece.org/api/holders/show/UKR06673820, action_name:holders/show/UKR06673820, cip:80.96.3.4, apiv:1, rand:… gt_ms:55]
Now doing the same but hitting the web service directly I don’t collect the IP address then pass CIP=null to matomo it seems to be fine (see example below):
2021-04-16 12:59:59 INFO [i.w.WebAnalyticsService] {token_auth=…, idsite=6, rec=1, _id=test-fr, uid=test-fr, url=https://xxx/show/UZB074835, action_name=show/UZB074835, cip=null, apiv=1, rand=…, gt_ms=121}
Would anyone have any idea why this is happening ?
2 posts - 2 participants