question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting 401 Unauthorized access

See original GitHub issue

What happened: Getting 401 Unauthorized access in grafana-image-renderer logs

{"collectDefaultMetrics":true,"level":"info","message":"Metrics enabled","requestDurationBuckets":"1,5,7,9,11,13,15,20,30"}
{"level":"info","maxConcurrency":5,"message":"using clustered browser","mode":"context","timeout":300}
{"config":{"acceptLanguage":null,"args":["--no-sandbox","--disable-gpu","--disable-dev-shm-usage","--disable-accelerated-2d-canvas","--window-size=1280x758"],"chromeBin":"/usr/bin/chromium-browser","clustering":{"maxConcurrency":5,"mode":"context","monitor":false,"timeout":300},"deviceScaleFactor":1,"dumpio":false,"emulateNetworkConditions":false,"headed":false,"height":500,"ignoresHttpsErrors":true,"maxDeviceScaleFactor":4,"maxHeight":500,"maxWidth":1000,"mode":"clustered","timezone":"xxxxxx","timingMetrics":false,"verboseLogging":true,"width":1000},"level":"debug","message":"Browser initialized"}
{"level":"info","message":"HTTP Server started, listening at http://localhost:8081"}
{"level":"debug","message":"Launching Browser cluster with puppeteer-cluster"}
{"level":"error","message":"Request failed","stack":"Error: Unauthorized request\n    at /usr/src/app/build/service/middlewares.js:27:30\n    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)\n    at /usr/src/app/node_modules/express/lib/router/index.js:286:9\n    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12)\n    at next (/usr/src/app/node_modules/express/lib/router/index.js:280:10)\n    at /usr/src/app/build/service/metrics.js:48:9\n    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)\n    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)\n    at /usr/src/app/node_modules/express/lib/router/index.js:286:9","url":"/render?deviceScaleFactor=1.000000&domain=xxxxxxxx.com&encoding=&height=500&renderKey=zmvZ4ahJz4R4BGQysMyl89d8Zl4MvG5n&timeout=60&timezone=xxxxx%2Fxxxx&url=http%3A%2F%2Fxxxxxx.com%2Fd-solo%2F-FyZRtuGz%2Fdevhawkstudio-alert%3ForgId%3D1%26tab%3Dalert%26from%3D1662795578286%26to%3D1662817178286%26panelId%3D2%26width%3D1000%26height%3D500%26tz%3Dxxx%252Fxxxxx%26render%3D1&width=1000"}
{"level":"error","message":"::ffff:xxx.xxxxx.x.x - - [10/Sep/2022:13:39:44 +0000] \"GET /render?deviceScaleFactor=1.000000&domain=xxxxxxxxx.com&encoding=&height=500&renderKey=zmvZ4ahJz4R4BGQysMyl89d8Zl4MvG5n&timeout=60&timezone=xxxxx%2Fxxxxx&url=http%3A%2F%2Fxxxxxxx.com%2Fd-solo%2F-FyZRtuGz%2Fxxxxx-alert%3ForgId%3D1%26tab%3Dalert%26from%3D1662795578286%26to%3D1662817178286%26panelId%3D2%26width%3D1000%26height%3D500%26tz%3Dxxxxx%252Fxxxxxx%26render%3D1&width=1000 HTTP/1.1\" 401 74 \"-\" \"Grafana/7.4.0-9781pre\"\n"

What you expected to happen: Generated Image

How to reproduce it (as minimally and precisely as possible): generate direct link from panel

Anything else we need to know?:

Environment:

  • Grafana Image Renderer version: v3.6.1
  • Grafana version: Grafana v7.4.0-9781pre (1c1a800bc0)
  • Installed plugin or remote renderer service: Using docker
  • OS Grafana Image Renderer is installed on: Docker
  • User OS & Browser:
  • Others:

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joanlopezcommented, Sep 16, 2022

Fixed sorry it was my mistake in docker-compose.yaml i am explicitly mounting a volume to grafana container which having that version(Grafana v7.4.0-9781pre (1c1a800bc0)) in /usr/share/grafana location, now everthing working fine able to render and everything working.

Great, glad to read that, thanks for letting us know! Don’t hesitate to reach us back in case you have any other issue!

0reactions
antoniomerlincommented, Sep 16, 2022

Fixed sorry it was my mistake in docker-compose.yaml i am explicitly mounting a volume to grafana container which having that version(Grafana v7.4.0-9781pre (1c1a800bc0)) in /usr/share/grafana location, now everthing working fine able to render and everything working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Quickly Fix the 401 Unauthorized Error (5 Methods)
Look for Errors in the URL; Clear Your Browser's Cache; Flush Your DNS; Deactivate Your WordPress Plugins; Check the WWW-Authenticate Header ...
Read more >
401 Error: 5 Ways to Troubleshoot and Fix It - Hostinger
The 401 Unauthorized error indicates that the server's request was not verified because it lacks valid authentication credentials for the target ...
Read more >
How to Fix a 401 Unauthorized Error? - GeeksforGeeks
The 401 Unauthorized Error is an HTTP status code error that represented the request sent by the client to the server that lacks...
Read more >
What is “401 Error Unauthorized Access" and How to Fix it?
The HTTP code “401 Unauthorized Access” is a client-side error. It indicates that the website's server sends a “WWW-Authenticate” header response back to...
Read more >
How to Fix a 401 Unauthorized Error - Lifewire
The 401 Unauthorized error is an HTTP status code that means the page you were trying to access cannot be loaded until you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found