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.

Query creation at destination failed: 403 Client Error: FORBIDDEN with `redash-migrate queries`

See original GitHub issue

Issue

I can’t migrate queries with redash-migrate queries from the hosted redash to OSS redash v10.0.0, even though I was able to migrate data sources, groups, users and destinations. When I tested migrating the hosted redash to a local docker-compose of the redash repository, redash-migrate queries worked. However, it doesn’t work on the destination instance in Google Kubernetes Engine.

Environment

  • Python: 3.8.12
  • redash: v10.0.0
  • redash-toolbelt: both of 0.1.7 and 0.1.6

Error

$ redash-migrate queries
Import queries...
Query 172644 - OK  - importing
Query 172644 - FAIL - Query creation at destination failed: 403 Client Error: FORBIDDEN for url: https://redash-qa.xxx.dev/api/queries
Query 173527 - OK  - importing
Query 173527 - FAIL - Query creation at destination failed: 403 Client Error: FORBIDDEN for url: https://redash-qa.xxx.dev/api/queries
...

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
yu-iskwcommented, Nov 2, 2021

Finally, I have solved the issue. We have to grant the admin permissins to users, because the redash client impersonates each users when creating queries. So, they must have the permission to create queries.

-- Group ID 1 means the `admin` group in my case.
UPDATE
  users
SET
  groups = groups || 1
WHERE
  NOT (1 = ANY(groups));
2reactions
BalawalAlicommented, Nov 2, 2021

Hi, I am also encountering the same problem. Above 300 queries have been failed and do not migrate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · getredash/redash-toolbelt - GitHub
API client and utilities to manage a Redash instance - Issues · getredash/redash-toolbelt. ... Redash-migrate not migrating queries and dashboard.
Read more >
What Is the 403 Forbidden Error and How to Fix It (8 Methods ...
Often, HTTP 403 forbidden errors are caused by an access misconfiguration on the client-side, which means you can usually resolve the issue yourself....
Read more >
HTTP Error 403 Forbidden: What It Means and How to Fix It
The 403 response belongs to the 4xx range of HTTP responses: Client errors. This means either you, or your browser, did something wrong....
Read more >
403 Forbidden Error: What It Is and How to Fix It - Airbrake Blog
A detailed explanation of what a 403 Forbidden Error response is, including troubleshooting tips to help you resolve this error.
Read more >
Google Big-query api 403-Forbidden Exception - Stack Overflow
When using the BigQuery API, you need to construct the client with OAuth credentials for some user. For programmatic access, this is often...
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