Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

level=error msg="Panic occured: interface conversion: interface {} is nil, not map[string]interface {}" #11

Open
karlagrani opened this issue Aug 6, 2024 · 1 comment

Comments

@karlagrani
Copy link

Hi,

I have Grafana 10.3.4 deployed in a Docker container and have successfully configured the Couchbase-Datasource plugin with the couchbase-datasource.zip file. When I test the connection, I get "PING OK".

When I run a query with no results in Couchbase that looks like this:

{
    "results":[]
}

In Grafana, I get "0 series returned" and the logs show "Query ok".

However, when I run a query with some results, like this for example:

[
    {
        "test": "Test"
    }
]

I get the following error in Grafana:

Query error 
An error occurred within the plugin

And the logs show this:

2024-08-02 11:53:18 logger=plugin.couchbase-datasource t=2024-08-02T09:53:18.20520395Z level=info msg="QueryData called" request="&{PluginContext:{OrgID:1 PluginID:couchbase-datasource User:0xc0005bcf00 AppInstanceSettings:<nil> DataSourceInstanceSettings:0xc0002a2630} Headers:map[http_X-Datasource-Uid:a6d36142-58db-4474-8e67-a33fa7f91c06 http_X-Grafana-Org-Id:1 http_X-Panel-Id:undefined] Queries:[{RefID:A QueryType: MaxDataPoints:1904 Interval:2s TimeRange:{From:2024-08-02 08:53:18.157 +0000 UTC To:2024-08-02 09:53:18.157 +0000 UTC} JSON:[123 34 97 110 97 108 121 116 105 99 115 34 58 102 97 108 115 101 44 34 100 97 116 97 115 111 117 114 99 101 34 58 123 34 116 121 112 101 34 58 34 99 111 117 99 104 98 97 115 101 45 100 97 116 97 115 111 117 114 99 101 34 44 34 117 105 100 34 58 34 97 54 100 51 54 49 52 50 45 53 56 100 98 45 52 52 55 52 45 56 101 54 55 45 97 51 51 102 97 55 102 57 49 99 48 54 34 125 44 34 100 97 116 97 115 111 117 114 99 101 73 100 34 58 53 44 34 105 110 116 101 114 118 97 108 77 115 34 58 50 48 48 48 44 34 109 97 120 68 97 116 97 80 111 105 110 116 115 34 58 49 57 48 52 44 34 113 117 101 114 121 34 58 34 83 69 76 69 67 84 32 114 101 103 105 111 110 32 70 82 79 77 32 83 112 105 101 108 119 105 101 115 101 46 71 114 97 102 97 110 97 46 87 101 116 116 101 114 59 34 44 34 114 101 102 73 100 34 58 34 65 34 125]}]}"
2024-08-02 11:53:18 logger=plugin.couchbase-datasource t=2024-08-02T09:53:18.205287106Z level=info msg="Processing query" EXTRA_VALUE_AT_END="TYPE: " refId=A
2024-08-02 11:53:18 logger=plugin.couchbase-datasource t=2024-08-02T09:53:18.205306856Z level=info msg="Transforming query"
2024-08-02 11:53:18 logger=plugin.couchbase-datasource t=2024-08-02T09:53:18.20531922Z level=info msg="Unmarshalled json" query_string="SELECT region FROM Spielwiese.Grafana.Wetter;"
2024-08-02 11:53:18 logger=plugin.couchbase-datasource t=2024-08-02T09:53:18.205335333Z level=info msg="Querying couchbase" query_string="SELECT region FROM Spielwiese.Grafana.Wetter;"
2024-08-02 11:53:18 logger=plugin.couchbase-datasource t=2024-08-02T09:53:18.294519271Z level=info msg="Query ok"
2024-08-02 11:53:18 logger=plugin.couchbase-datasource t=2024-08-02T09:53:18.294620974Z level=error msg="Panic occured: interface conversion: interface {} is nil, not map[string]interface {}"
2024-08-02 11:53:18 logger=context userId=0 orgId=1 uname= t=2024-08-02T09:53:18.316434274Z level=error msg="Internal server error" error="[plugin.downstreamError] client: failed to query data: Failed to query data: rpc error: code = Unavailable desc = error reading from server: EOF" remote_addr=172.20.0.1 traceID=
2024-08-02 11:53:18 logger=context userId=0 orgId=1 uname= t=2024-08-02T09:53:18.316503833Z level=error msg="Request Completed" method=POST path=/api/ds/query status=500 remote_addr=172.20.0.1 time_ms=155 duration=155.38542ms size=116 referer="http://localhost:3000/explore?orgId=1&schemaVersion=1" handler=/api/ds/query
2024-08-02 11:53:18 logger=plugin.couchbase-datasource t=2024-08-02T09:53:18.31806905Z level=error msg="plugin process exited" plugin=/var/lib/grafana/plugins/couchbase-datasource/tmp/tmp.3Zo1ylr7HY/couchbase-datasource/dist/gpx_couchbase_linux_amd64 id=2799 error="exit status 2"
2024-08-02 11:53:19 logger=plugin.couchbase-datasource t=2024-08-02T09:53:19.273176662Z level=info msg=Profiler enabled=false

Does anyone know why I get this error and does anyone have a solution for this?

@electronicalex
Copy link

Hi @karlagrani I think you can refer to here - #6 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants