peimanja / artifactory_exporter

JFrog Artifactory Prometheus Exporter written in Go
Apache License 2.0
140 stars 37 forks source link

There was an error when trying to unmarshal the API Error #101

Closed RyuS3ki closed 1 year ago

RyuS3ki commented 1 year ago

Overview of the Issue

Related to issue 84

Getting error:

level=debug ts=2023-03-03T12:36:15.040Z caller=utils.go:44 msg="Fetching http" path=https://artifactory.<domain>/api/system/license
level=error ts=2023-03-03T12:36:15.043Z caller=utils.go:57 msg="There was an error when trying to unmarshal the API Error" err="invalid character 'p' after top-level value"

Reproduction Steps

Helm install with following config:

Operating system and Environment details

Kubernetes GKE: v1.24.8 Helm: v3 Artifactory version: 7.49.5 Exporter image version: v1.12.0 Exporter helm chart version: 0.5.0

Logs

level=debug ts=2023-03-03T12:36:15.040Z caller=utils.go:44 msg="Fetching http" path=https://artifactory.<domain>/api/system/license
level=error ts=2023-03-03T12:36:15.043Z caller=utils.go:57 msg="There was an error when trying to unmarshal the API Error" err="invalid character 'p' after top-level value"
peimanja commented 1 year ago

It's probably your Artifactory URL, you are missing /artifactoy, should be set to something like url: https://artifactory.<domain>/artifactory

RyuS3ki commented 1 year ago

Thank you, that worked!