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

Grafana connect: connection refused #114

Open
TomSipacom opened this issue May 20, 2022 · 11 comments
Open

Grafana connect: connection refused #114

TomSipacom opened this issue May 20, 2022 · 11 comments
Assignees

Comments

@TomSipacom
Copy link

TomSipacom commented May 20, 2022

Hello

First, TY for this project!
I love docker and this is a great way to deploy Homer with Grafana under 5 sec!

My Grafana integration works when I directly browse to the Grafana dashboard, I got data in Grafana.
However, I want to use the widgets in the Homer dashboard. But when I add it, I got the following error.

{"message":"remote http://grafana/ unreachable, could not forward: dial tcp X.X.X.X:80: connect: connection refused"}

This is a normal error because Grafana runs on port 3000 and not on port 80.
Where can I adapt this? I prefer that I don't adapt it directly in the container.

Thanks!

@georghimself
Copy link

Same Problem here:
{"message":"remote http://grafana/ unreachable, could not forward: dial tcp 172.19.0.2:80: connect: connection refused"}

allow_embedding is "true"

Did you find a solution?

@lmangani
Copy link
Member

lmangani commented Aug 2, 2022

could not forward: dial tcp 172.19.0.2:80: connect: connection refused
@georghimself that's a network issue, make sure the ports are correctly mapped

@georghimself
Copy link

georghimself commented Aug 2, 2022

@lmangani but how?
grafana is listening on port 3000 not 80
shouldnt it just work with docker?

@lmangani
Copy link
Member

lmangani commented Aug 2, 2022

What is configured in your homer-app config for the grafana integration? anonymyze as you see fit.

@georghimself
Copy link

georghimself commented Aug 2, 2022

@lmangani
"host": "http://grafana:3000",
"password": "xxxxxxxx",
"token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"user": "admin"

@lmangani
Copy link
Member

lmangani commented Aug 4, 2022

We are investigating and trying to replicate - updates will follow from @AlexeyOplachko

@AlexeyOplachko
Copy link

AlexeyOplachko commented Aug 4, 2022

@georghimself hi, if possible can you please create a dashboard with only Grafana widget, reload page with Devtools open on Network tab and copy GET request to /dashboard/store(ping me if you need help with that). It should look something like this:

{
    "auth": "ok",
    "data": {
        "alias": "_1658477054693",
        "config": {
            "columns": 8,
            "grafanaProxy": false,
            "grafanaTimestamp": false,
            "ignoreMinSize": "warning",
            "maxrows": 6
        },
        "dashboardId": "_1658477054693",
        "id": "_1658477054693",
        "isLocked": false,
        "name": "grafana widget test",
        "param": "grafana widget test",
        "selectedItem": "",
        "shared": false,
        "type": 1,
        "weight": 10,
        "widgets": [
            {
                "cols": 7,
                "config": {
                    "configuredUrl": "https://homer/grafana/d-solo/R6G3kMaMzedddd/%24%7Bmetric%7D%20by%20%24%7Blabel%7D?from=1659387600000\u0026hasVariables=true\u0026orgId=1\u0026panelId=2\u0026rand=789238\u0026refresh=\u0026theme=light\u0026to=1659473999000\u0026viewPanel=6\u0026JWT=anonimisedJWT",
                    "dashboardSource": "R6G3kMaMzedddd",
                    "desc": "",
                    "id": "iframe-1_22f9bf3b-7594-47cb-b910-904df6fa2cf1",
                    "panelListValue": "${metric} by ${label}",
                    "params": {
                        "from": "1659560400000",
                        "hasVariables": true,
                        "orgId": 1,
                        "panelId": 2,
                        "rand": "628207",
                        "refresh": "",
                        "theme": "light",
                        "to": "1659646799000",
                        "viewPanel": 6
                    },
                    "serverUrl": "http://grafana:3000",
                    "title": "Grafana",
                    "typeDataRange": "global",
                    "url": "/d-solo/R6G3kMaMzedddd/%24%7Bmetric%7D%20by%20%24%7Blabel%7D"
                },
                "id": "iframe-1_22f9bf3b-7594-47cb-b910-904df6fa2cf1",
                "isWarning": false,
                "layerIndex": 2,
                "minHeight": 300,
                "minWidth": 300,
                "name": "iframe",
                "output": {},
                "rows": 5,
                "strongIndex": "IframeWidgetComponent",
                "tabGroup": "tabIndex-299959",
                "title": "Grafana",
                "x": 0,
                "y": 0
            }
        ]
    },
    "owner": "admin",
    "status": "ok",
    "total": 1
}

Sensitive parts of data that you might wanna anonymize are following:
hostname in field serverUrl, hostname in field configuredUrl and in the same field in the end there's cutoff part of jwt which you also might want to hide.
Both of the fields are in widgets -> config

In the meantime I'll try to replicate this issue

@AlexeyOplachko
Copy link

We have identified source of this issue, and will provide an update in foreseeable future

@georghimself
Copy link

We have identified source of this issue, and will provide an update in foreseeable future

awesome. thanks @AlexeyOplachko . so no need for me to replicated again?
changed the bind port to 80 so i got it to work. grafana widget showed then.
i installed everything on a second (exactly same system) and if i wanna open the settings of a grafana widget
the window opens small an blank on the left side of the browser
tested on chrome / firefox / safari. in incognito windows and on other pc
. other widgets work

grafhomer

@AlexeyOplachko
Copy link

Thank you for your report, we're looking into a fix for this as well 👍

@TomSipacom
Copy link
Author

We have identified source of this issue, and will provide an update in foreseeable future

Great! Thank you!

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

4 participants