The Developer Space

Developer's Cafe

  • Cloud
  • Database
  • Open Source
  • Programming
  • Web Dev
  • Mobile
  • Security
  • QuickRef
  • Home
  • Database
  • How to fix Redis Error “ERR DEBUG command not allowed.”

How to fix Redis Error “ERR DEBUG command not allowed.”

Shameel Ahmed - Database, Redis
July 4, 2022July 5, 2022 No Comments
1 0
1 0
Read Time2 Minute, 2 Second

While developing apps using Redis, if you are trying to use the command DEBUG and Redis throws the error “ERR DEBUG command not allowed.”, here’s how you fix it.

The DEBUG POPULATE command quickly populates your Redis instance with dummy test data that comes in handy during development. Here’s how you use it.

DEBUG POPULATE 10 Test

This command populates the database with 10 keys with key Test:N and value Value:N. If “Test” is omitted, “Key” is used.

While this command runs absolutely fine in Redis 6.x and previous versions; starting with Redis 7.0.0, the DEBUG command is disabled by default and must be enabled manually in the Redis Config file. Running this command will result in the following error.

ERR DEBUG command not allowed. If the enable-debug-command option is set to "local", you can run it from a local connection, otherwise you need to set this option in the configuration file, and then restart the server.

To enable the DEBUG command, open the Redis config file from a text editor like nano:

sudo nano /etc/redis/redis.conf

Search for the text enable-debug-command using Ctrl+W

The default value for enable-debug-command is no which prevents execution of DEBUG commands.

Change it to local if DEBUG command should be enabled from local machine only (connections from 127.0.0.1)

Change it to yes if DEBUG command can be executed from remote connections as well.

Save and exit by pressing Ctrl+X and then Y. Now, restart Redis with the command:

sudo service redis-server restart

Now you should be able to use the DEBUG command. Try it out by running this command again:

DEBUG POPULATE 10 Test

You should now see the Test keys generated.

Share your thoughts and comments below.

Share

Facebook
Twitter
LinkedIn
Email

Post navigation

Cross Region Lambda invocation in AWS
Increase Visual Studio Code Terminal Buffer Size

Related Articles

Migrate your SQL Server Workloads to PostgreSQL: Quick Reference: Second Edition

Book: Migrate your SQL Server Workloads to PostgreSQL: Quick Reference – Second Edition

Shameel Ahmed
October 18, 2022October 22, 2022 1 Comment

Migrate MySQL table data to MongoDB collections using Python

Shameel Ahmed
June 18, 2021June 25, 2021 1 Comment
Migrating your SQL Server Workloads to PostgreSQL

Book: Migrating your SQL Server Workloads to PostgreSQL

Shameel Ahmed
May 5, 2020October 22, 2022 No Comments

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%
(Add your review)

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

.NET Architecture Artificial Intelligence ASP.NET AWS Azure Books C# Career Cloud CodeProject Conversational Bots Database Data Security Facade IDEs Java Mobile MongoDB MySQL Open Source Patterns PostgreSQL Programming Python Redis Security SQL Server Tools Uncategorized Web Development Windows Phone

Recent Posts

  • How to build a REST API using Amazon API Gateway to invoke OpenAI APIs March 11, 2023
  • How to fix “‘StreamingBody’ object is not subscriptable” in AWS Lambda boto3 February 12, 2023
  • How to invoke OpenAI APIs from AWS Lambda functions February 5, 2023
  • Developer to Architect Series (Red Hat Enable Architect) January 16, 2023
  • Can ChatGPT replace Google Search? January 11, 2023

Archives

  • March 2023 (1)
  • February 2023 (2)
  • January 2023 (2)
  • December 2022 (1)
  • October 2022 (1)
  • July 2022 (2)
  • February 2022 (1)
  • November 2021 (1)
  • July 2021 (1)
  • June 2021 (1)
  • September 2020 (1)
  • May 2020 (2)
  • April 2020 (1)
  • October 2019 (1)
  • September 2019 (4)
  • July 2019 (2)
  • May 2018 (1)
  • September 2017 (1)
  • April 2017 (1)
  • April 2014 (1)
  • August 2011 (1)
  • June 2009 (1)
Copyright 2022. The Developer Space | Theme: OMag by LilyTurf Themes
  • DbStudio
  • Re:Link
  • shameel.net
  • Privacy Policy
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
SAVE & ACCEPT