-
Notifications
You must be signed in to change notification settings - Fork 152
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
failed to take screenshot: dial tcp :0: connect: connection refused #411
Comments
I've removed the locally installed plugin and tried again. The result was the same.
Does anyone know how to see the full error of the problem, so I can debug the issue further? |
You can set the log level to debug and set RENDERING_VERBOSE_LOGGING to true to see more verbose logging output: https://grafana.com/docs/grafana/latest/setup-grafana/image-rendering/#log-level |
Thanks. I updated the settings of the renderer service, but still nothing extra in the log that could point me the problem.
Only some version checks from grafana.
In grafana log:
|
Hello! It seems from the error that Grafana can't call the image renderer even though it's working when retrieving the version. Could you try taking a screenshot of a panel to see if the issue is between Grafana and the image renderer or in the alerting configuration? (Go to any dashboard, click on a panel title > Share > direct link rendered image) |
Hi. Thank you for your response. I think the alert works, I receive e-mails. (without images ofc.) I followed your steps. Here's the result:
I see no new requests to the renderer.
What I see in grafana when click on "direct link rendered image" Let me know if additional details are needed. |
Thank you for the additional information. I noticed you should see one more log line if Grafana even tried to send the request to the image renderer. As it's not the case, I think it fails before that, when trying to retrieve the render key (the token that allows the image renderer to access Grafana dashboards as a logged in user). Do you have any custom configuration for the remote cache ( |
Hi. Yes I have. I pointed that in my first post that I use memcached service for caching data sources and whatever grafana needs to cache. Here is what I have in remote_cache configuration.
Thanks. |
Yes sorry, I didn't think it could be related to this image renderer error when I first read your issue. Your configuration should be:
|
Hi. Oh my god. This is what means to know your stuff. I have no idea why I messed up this settings and the error gives me no clue what's happening. Thank you so much. |
You're right, the error message could be prefixed with something like "error retrieving render key". I'm in the middle of something on my local Grafana repo but I'll look into improving the log there. (If you're familiar with Go and are willing to open a PR yourself, the line in question is this one.) Glad your issue is fixed now! Closing this issue. |
Hello @peycho & @AgnesToulet… I am also facing the same issue!!! but how do you setup in [remote_cache] |
You can see the above comments. It should be: connstr = 127.0.0.1:11211 btw remote_cache is optional. If you don't use it and have the same error, it might be something else. Note: the problem might be something else. @AgnesToulet mentioned that the error reporting need to be updated to provide better error output. I suggest you to open issue and provide all the information about your configuration setup. Without any credentials of course. |
Hello, have configured Prometheus and Grafana (i.e.) we want it for internal image storage. Any ideas @peycho and @AgnesToulet. #################################### Cache server ############################# |
Hello guys.
I'm having troubles making this work and after so many experiments I still see this error.
Grafana version v9.4.3
Plugin: grafana-image-renderer 3.6.4
Used OS: Ubuntu server 22.04 hosted in AWS ec2 instance.
I have some experience with Grafana before, but not with the latest versions. I already have 3 different setups with Grafana and grafana-image-renderer but they use the old alerting management not the current one so called Unified Alerting.
In the current setup I'm trying to achieve the same results like before.
Grafana + alerts + image(screenshots) in the alerts notifications.
I've created the following setup:
Independent Server for Grafana service and plugins and the memcached service (for better optimization and catching some data sources configurations)
RDS instance with PostgreSQL for storing configurations/dashboards/users/alerts/etc...
Independent server with running image rendering service.
How the services are configured:
Grafana works on port 3000 and it is behind Application LB that serve the web UI at port 443 (https)
Grafana deployment is pretty much standard. The single additional plugin I added is grafana-image-renderer. The plugin is installed via grafana command line interface.
The rendering server is run as standalone Node.js application. I don't use docker on any of the servers at the moment. It is installed as per the readme in https://github.com/grafana/grafana-image-renderer/
The service runs on 0.0.0.0 and use its default port 8081 as systemd service.
The IP address of the server is defined as A record to a specific hostname that is used on other configurations in Grafana.
The installed Chrome version:
I don't think the problem is the renderer service because the log file doesn't show me errors, but I can clearly see that Grafana is checking the version.
Example
I don't see any other output in the renderer log that means Grafana don't even try to use it for some reason.
Grafana has the following settings in regards of the images/screenshots.
I've disabled the legacy alerts and enabled the Unified Alerting
Screenshots.
Images store is configured to use Amazon S3
Rendering settings (the token is the same on renderer service and grafana)
Grafana root_url is pointed to the application LB and it is accessible from the rendered server. (required for callback)
Everything looks normal. Grafana is accessible. I created several dashboards with source Croudwatch.
I created a single alert to start testing the new deployment. Created a simple e-mail and Pagerduty notifications or so called Contact points and used the default notification policy.
The alerts work, but no screenshot attached.
The only error I found in the logs is this:
On the renderer service side I see nothing but the last version check made by Grafana itself.
I though the external options is buggy or something, so I installed the renderer on the same server, configured the service to run on 0.0.0.0:8081 and reconfigured grafana to use localhost, like in the documentation. Sadly the result is the same.
In general, I'm kinda stuck with this error that shows me nothing that would guide me to the problem.
It even don't show the ip/port that it's attempting to connect to.
Note that Grafana and renderer service are both configured with debug option for all logs. console and file.
I can provide any additional information if necessary.
Thanks in advance.
The text was updated successfully, but these errors were encountered: