AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Failed to connect to Redis

Open Xerizaf opened this issue 2 years ago • 4 comments

⚠️ Search for existing issues first ⚠️

  • [X] I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

Windows

Which version of Auto-GPT are you using?

Latest Release

GPT-3 or GPT-4?

GPT-3.5

Steps to reproduce 🕹

Connect to Redis

Current behavior 😯

FAILED TO CONNECT TO REDIS Error 99 connecting to localhost:6379. Cannot assign requested address. DOUBLE CHECK CONFIGURATION Please ensure you have setup and configured Redis properly for use. You can check out https://github.com/Torantulino/Auto-GPT#redis-setup to ensure you've set up everything correctly.

Expected behavior 🤔

To connect properly

Your prompt 📝

# Paste your prompt here

Your Logs 📒

<insert your logs here>

Xerizaf avatar Apr 28 '23 16:04 Xerizaf

version: "3.9"
services:
  auto-gpt:
    depends_on:
      - redis
    build: ./
    env_file:
      - .env
    environment:
      MEMORY_BACKEND: ${MEMORY_BACKEND:-redis}
      REDIS_HOST: redis
    volumes:
      - ./:/app
    profiles: ["exclude-from-up"]
    links:
      - redis
  redis:
    image: "redis/redis-stack-server:latest"
    restart: always
    ports:
      - '6379:6379'

zweite avatar Apr 29 '23 07:04 zweite

Didn't solve the problem. How to create a redis password?

Xerizaf avatar Apr 29 '23 19:04 Xerizaf

by default redis has no password

bobisme avatar Apr 29 '23 23:04 bobisme

There are two paths here:

  1. Use redis without a password. This is the default. To do this remove or comment out any "REDIS_PASSWORD" entries in docker-compose.yml or .env
  2. Use redis with a password. Note: you cannot (currently) configure redis password simply as an environment variable. Here's a related issue: https://github.com/docker-library/redis/issues/176

Joshfindit avatar May 03 '23 03:05 Joshfindit

Apologies. I missed this one:

localhost:6379

For docker you have to set REDIS_HOST=redis

Joshfindit avatar May 05 '23 00:05 Joshfindit

Xerizaf, I had the same error after switching to a paid openai account. I generated a new api key at https://platform.openai.com/account/api-keys and copied it in to .env and that fixed it for me. Hopefully, this helps.

jameshutchins avatar May 08 '23 21:05 jameshutchins

Solved.

Xerizaf avatar May 09 '23 10:05 Xerizaf

Where do I put this?

ryanniccolls avatar May 26 '23 10:05 ryanniccolls

I got redi working on apple silicon mac with Autogpt by using Visual basic studio IDE and Docker Desktop. There is some juggling between apps. basically go through the autogpt readme file after downloading everything. which will prompt a dev container extension and redis environent.

  1. install "docker desktop", don't run yet (this will run the wrapper for redis and autogpt)
  2. install "visual basic code" app, don't run (use this will run the autogpt folder as a "a deve container"
  3. download autogpt folder
  4. use the readme inside autogpt
  5. copy and edit the necessary .env.template to .env
  6. remove the hashtags from the following lines of code. then save. ... MEMORY_BACKEND=redis ... REDIS_HOST=redis REDIS_PORT=6379 REDIS_PASSWORD= WIPE_REDIS_ON_START=False MEMORY_INDEX=auto-gpt"

ryanniccolls avatar May 26 '23 17:05 ryanniccolls