victorialogs-datasource: error decode response: invalid character 'x' in string escape code
Hi,
When using the latest version of VictoriaLogs (0.18.0 as of today, after upgrading from 0.7.0), the datasource stops working.
A simple _time:5m or host:test-server returns a decoding error in the panel: error decode response: invalid character 'x' in string escape code
No specific error logged in the VictoriaLogs server itself, but the Grafana log has some errors:
GRAFANA | logger=plugin.victorialogs-datasource t=2024-06-11T12:50:04.627607298Z level=error msg="error decode response: invalid character 'x' in string escape code"
GRAFANA | logger=context userId=2 orgId=1 uname=*** t=2024-06-11T12:50:04.627862706Z level=info msg="Request Completed" method=POST path=/api/ds/query status=400 remote_addr=*** time_ms=105 duration=105.622792ms size=139 referer="http://***/d/bdoghm58zwdmof/test-panel?editPanel=2&orgId=1" handler=/api/ds/query status_source=downstream
The query itself works fine in the vmui. Datasource is on 0.2.1, and when added replies with “This datasource is working”. Rolling back to our known working vlogs version (0.7.0) works well, however we lose new features of the query language.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (10 by maintainers)
Commits related to this issue
- lib/logstorage: use quicktemplate.AppendJSONString instead of strconv.AppendQuote for encoding JSON strings The strconv.AppendQuote improperly encodes special chars such as \x1b . They must be encode... — committed to VictoriaMetrics/VictoriaMetrics by valyala 2 years ago
- lib/logstorage: use quicktemplate.AppendJSONString instead of strconv.AppendQuote for encoding JSON strings The strconv.AppendQuote improperly encodes special chars such as \x1b . They must be encode... — committed to VictoriaMetrics/VictoriaMetrics by valyala 2 years ago
- Merge pull request #38 from VictoriaMetrics/issue-24 fix issue when response contains ANSI escape sequences https://github.com/VictoriaMetrics/victorialogs-datasource/issues/24 — committed to VictoriaMetrics/victorialogs-datasource by hagen1778 2 years ago
- all: consistently use stringsutil.JSONString() for formatting JSON strings with fmt.* functions instead of using "%q" formatter The %q formatter may result in incorrectly formatted JSON string if the... — committed to VictoriaMetrics/VictoriaMetrics by valyala 2 years ago
- all: consistently use stringsutil.JSONString() for formatting JSON strings with fmt.* functions instead of using "%q" formatter The %q formatter may result in incorrectly formatted JSON string if the... — committed to VictoriaMetrics/VictoriaMetrics by valyala 2 years ago
I can confirm that issue is gone in 0.27.1
I’ve had this issue aswell but after upgrading to 0.27.1, it went away.
This issue must be fixed in VictoriaLogs v0.27.1. The bugfix is at https://github.com/VictoriaMetrics/VictoriaMetrics/commit/c0caa6993903a748c8942c8c28b5901ee6d5f4d4 .
@Proxymiity , @rkaracic , could you upgrade VictoriaLogs to v0.27.1 and verify whether the issue is fixed there?
Hi! Apologies for the response delay.
I can confirm it is working as expected as of the latest version of vlogs and the patch you made.
Thank you!