Open jingmxu opened 2 months ago
Hi @jingmxu thanks for reporting this. Can you try with the canary
tag of the exporter and if possible attach the full logs with debug mode enabled.
Hi @peimanja, we don't use docker image so no canary build can be tested, I enabled debug log to find that the following query caused the error:
time=2024-08-13T11:42:48.297+08:00 level=DEBUG msg="Finding all artifacts" period=1minutes queryType=created
time=2024-08-13T11:42:48.297+08:00 level=DEBUG msg="Running AQL query" path=https://artifactory1.hkintegrationlab.com:443/artifactory/api/search/aql
time=2024-08-13T11:42:48.313+08:00 level=DEBUG msg="Finding all artifacts" period=5minutes queryType=created
time=2024-08-13T11:42:48.313+08:00 level=DEBUG msg="Running AQL query" path=https://artifactory1.hkintegrationlab.com:443/artifactory/api/search/aql
time=2024-08-13T11:42:48.327+08:00 level=DEBUG msg="Finding all artifacts" period=15minutes queryType=created
time=2024-08-13T11:42:48.327+08:00 level=DEBUG msg="Running AQL query" path=https://artifactory1.hkintegrationlab.com:443/artifactory/api/search/aql
time=2024-08-13T11:42:48.343+08:00 level=DEBUG msg="Finding all artifacts" period=1minutes queryType=downloaded
time=2024-08-13T11:42:48.343+08:00 level=DEBUG msg="Running AQL query" path=https://artifactory1.hkintegrationlab.com:443/artifactory/api/search/aql
time=2024-08-13T11:42:48.348+08:00 level=DEBUG msg="Finding all artifacts" period=5minutes queryType=downloaded
time=2024-08-13T11:42:48.348+08:00 level=DEBUG msg="Running AQL query" path=https://artifactory1.hkintegrationlab.com:443/artifactory/api/search/aql
time=2024-08-13T11:42:48.353+08:00 level=DEBUG msg="Finding all artifacts" period=15minutes queryType=downloaded
time=2024-08-13T11:42:48.353+08:00 level=DEBUG msg="Running AQL query" path=https://artifactory1.hkintegrationlab.com:443/artifactory/api/search/aql
Can you share the new create or downloaded in 1 minutes AQL query command? so that we may file a bug to Jfrog.
Queries can be found here. https://github.com/peimanja/artifactory_exporter/blob/56a1722fa3ce5e62edf602ef7d263d18e302fe27/collector/artifacts.go#L20-L30
Unfortunately I cannot test against that version for now but I'll see if I get a chance to test the queries.
Thanks @peimanja , Jfrog has reproduced the issue, will keep you updated!
I also encountered this issue when upgrading from 7.84.20 to 7.90.8. The issue still occurs with the canary tag, although the frequency of the errors seem slightly different.
Debug logs:
time=2024-08-29T08:25:14.205Z level=DEBUG msg="Finding all artifacts" period=1minutes queryType=created
time=2024-08-29T08:25:14.205Z level=DEBUG msg="Running AQL query" path=http://artifactory.artifactory.svc:8081/artifactory/api/search/aql
time=2024-08-29T08:25:14.212Z level=DEBUG msg="Finding all artifacts" period=5minutes queryType=created
time=2024-08-29T08:25:14.212Z level=DEBUG msg="Running AQL query" path=http://artifactory.artifactory.svc:8081/artifactory/api/search/aql
time=2024-08-29T08:25:14.219Z level=DEBUG msg="Finding all artifacts" period=15minutes queryType=created
time=2024-08-29T08:25:14.219Z level=DEBUG msg="Running AQL query" path=http://artifactory.artifactory.svc:8081/artifactory/api/search/aql
time=2024-08-29T08:25:14.227Z level=DEBUG msg="Finding all artifacts" period=1minutes queryType=downloaded
time=2024-08-29T08:25:14.227Z level=DEBUG msg="Running AQL query" path=http://artifactory.artifactory.svc:8081/artifactory/api/search/aql
time=2024-08-29T08:25:14.228Z level=DEBUG msg="Finding all artifacts" period=5minutes queryType=downloaded
time=2024-08-29T08:25:14.228Z level=DEBUG msg="Running AQL query" path=http://artifactory.artifactory.svc:8081/artifactory/api/search/aql
time=2024-08-29T08:25:14.230Z level=DEBUG msg="Finding all artifacts" period=15minutes queryType=downloaded
time=2024-08-29T08:25:14.230Z level=DEBUG msg="Running AQL query" path=http://artifactory.artifactory.svc:8081/artifactory/api/search/aql
We also encounter the issue after updating from Artifactory 7.84.12 to 7.90.6.
Overview of the Issue
Artifactory exporter1.140 used to work fine with Artifactory7.71.8. but after upgrading Artifactory to 7.90.6, there are many AQL error messages in Artifactory logs regarding the POST request from Artifactory exporter, There is a AQL change in Artifactory7.84 https://jfrog.com/help/r/jfrog-release-information/artifactory-7.84?tocId=l5ivPW3bmp3socHkO6OTTA
not sure if it is related to this.
Reproduction Steps
Artifactory upgrade from 7.71.8 to 7.90.6
Operating system and Environment details
RHEL8.8 , Artifactory exporter1.140, Artifactory7.90.6
Logs
Log output of exporter when running and you try to get metrics from the metric path.
2024-08-12T05:44:18.311Z [jfrt ] [ERROR] [4e92f2fa52d2cf21] [o.a.a.r.AqlRestResult:135 ] [ttp-nio-8081-exec-10] - AQL minimal field expectation error: repo, path and name
java.lang.reflect.UndeclaredThrowableException: null
Caused by: java.lang.reflect.InvocationTargetException: null
Caused by: org.postgresql.util.PSQLException: The column name itemPath was not found in this ResultSet.