TransformerOptimus / SuperAGI

<⚡️> SuperAGI - A dev-first open source autonomous AI agent framework. Enabling developers to build, manage & run useful autonomous agents quickly and reliably.
https://superagi.com/
MIT License
14.94k stars 1.78k forks source link

Cannot view WebGUI - 422 Unprocessable Entity - Stuck at 'Initializing SuperAGI' #241

Open kcramp858 opened 1 year ago

kcramp858 commented 1 year ago

After pulling the latest commits, cannot access the webgui -- gets stuck at Initializing SuperAGI...

Errors just say Unprocessable Entity.

Running windows, already tried to delete + redownload; tried in VScode and powershell; not sure how to troubleshoot this because the error messages dont really point to specific files..


✔ Container superagi-super__postgres-1  Created                                                                                                                                                                                 0.0s
 ✔ Container superagi-gui-1              Created                                                                                                                                                                                 0.0s
 ✔ Container superagi-super__redis-1     Created                                                                                                                                                                                 0.0s
 ✔ Container superagi-backend-1          Recreated                                                                                                                                                                               0.1s
 ✔ Container superagi-celery-1           Recreated                                                                                                                                                                               0.1s
Attaching to superagi-backend-1, superagi-celery-1, superagi-gui-1, superagi-super__postgres-1, superagi-super__redis-1
superagi-super__redis-1     | 1:C 07 Jun 2023 15:52:23.641 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
superagi-super__redis-1     | 1:C 07 Jun 2023 15:52:23.641 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
superagi-super__redis-1     | 1:C 07 Jun 2023 15:52:23.641 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.641 * monotonic clock: POSIX clock_gettime
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.642 * Running mode=standalone, port=6379.
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.642 # Server initialized
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.642 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.642 * Loading RDB produced by version 7.0.11
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.642 * RDB age 54 seconds
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.642 * RDB memory usage when created 1.18 Mb
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.642 * Done loading RDB, keys loaded: 1, keys expired: 0.
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.642 * DB loaded from disk: 0.000 seconds
superagi-super__redis-1     | 1:M 07 Jun 2023 15:52:23.642 * Ready to accept connections
superagi-super__postgres-1  |
superagi-super__postgres-1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
superagi-super__postgres-1  |
superagi-super__postgres-1  | 2023-06-07 15:52:23.975 UTC [1] LOG:  starting PostgreSQL 15.3 (Debian 15.3-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
superagi-super__postgres-1  | 2023-06-07 15:52:24.031 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
superagi-super__postgres-1  | 2023-06-07 15:52:24.031 UTC [1] LOG:  listening on IPv6 address "::", port 5432
superagi-super__postgres-1  | 2023-06-07 15:52:24.038 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
superagi-super__postgres-1  | 2023-06-07 15:52:24.046 UTC [30] LOG:  database system was shut down at 2023-06-07 15:51:30 UTC
superagi-super__postgres-1  | 2023-06-07 15:52:24.051 UTC [1] LOG:  database system is ready to accept connections
superagi-gui-1              |
superagi-gui-1              | > super-agi@0.1.0 dev
superagi-gui-1              | > next dev
superagi-gui-1              |
superagi-gui-1              | - ready started server on 0.0.0.0:3000, url: http://localhost:3000
superagi-gui-1              | - warn Invalid next.config.js options detected:
superagi-gui-1              | - warn     The root value has an unexpected property, webpackDevMiddleware, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, configOrigin, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, modularizeImports, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, skipMiddlewareUrlNormalize, skipTrailingSlashRedirect, staticPageGenerationTimeout, swcMinify, target, trailingSlash, transpilePackages, typescript, useFileSystemPublicRoutes, webpack).
superagi-gui-1              | - warn See more info here: https://nextjs.org/docs/messages/invalid-next-config
superagi-backend-1          | wait-for-it.sh: waiting 60 seconds for super__postgres:5432
superagi-backend-1          | wait-for-it.sh: super__postgres:5432 is available after 0 seconds
superagi-backend-1          | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
superagi-backend-1          | INFO  [alembic.runtime.migration] Will assume transactional DDL.
superagi-backend-1          | INFO:     Will watch for changes in these directories: ['/app']
superagi-backend-1          | INFO:     Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)
superagi-backend-1          | INFO:     Started reloader process [1] using WatchFiles
superagi-celery-1           | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main
superagi-backend-1          | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main
superagi-celery-1           | /usr/local/lib/python3.9/site-packages/celery/platforms.py:840: SecurityWarning: You're running the worker with superuser privileges: this is
superagi-celery-1           | absolutely not recommended!
superagi-celery-1           |
superagi-celery-1           | Please specify a different user using the --uid option.
superagi-celery-1           |
superagi-celery-1           | User information: uid=0 euid=0 gid=0 egid=0
superagi-celery-1           |
superagi-celery-1           |   warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
superagi-celery-1           |
superagi-celery-1           |  -------------- celery@c0245bbcaf39 v5.2.7 (dawn-chorus)
superagi-celery-1           | --- ***** -----
superagi-celery-1           | -- ******* ---- Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 2023-06-07 15:52:27
superagi-celery-1           | - *** --- * ---
superagi-celery-1           | - ** ---------- [config]
superagi-celery-1           | - ** ---------- .> app:         superagi:0x7faae925e9a0
superagi-celery-1           | - ** ---------- .> transport:   redis://super__redis:6379/0
superagi-celery-1           | - ** ---------- .> results:     redis://super__redis:6379/0
superagi-celery-1           | - *** --- * --- .> concurrency: 10 (prefork)
superagi-celery-1           | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
superagi-celery-1           | --- ***** -----
superagi-celery-1           |  -------------- [queues]
superagi-celery-1           |                 .> celery           exchange=celery(direct) key=celery
superagi-celery-1           |
superagi-celery-1           |
superagi-celery-1           | [tasks]
superagi-celery-1           |   . execute_agent
superagi-celery-1           |
superagi-gui-1              | - event compiled client and server successfully in 1182 ms (781 modules)
superagi-gui-1              | - wait compiling...
superagi-celery-1           | [2023-06-07 15:52:28,117: INFO/MainProcess] Connected to redis://super__redis:6379/0
superagi-celery-1           | [2023-06-07 15:52:28,121: INFO/MainProcess] mingle: searching for neighbors
superagi-gui-1              | - event compiled client and server successfully in 431 ms (781 modules)
superagi-backend-1          | INFO:     Started server process [21]
superagi-backend-1          | INFO:     Waiting for application startup.
superagi-backend-1          | INFO:     Application startup complete.
superagi-celery-1           | [2023-06-07 15:52:29,130: INFO/MainProcess] mingle: all alone
superagi-celery-1           | [2023-06-07 15:52:29,138: INFO/MainProcess] celery@c0245bbcaf39 ready.
superagi-gui-1              | - wait compiling /_error (client and server)...
superagi-gui-1              | - event compiled client and server successfully in 222 ms (782 modules)
superagi-gui-1              | Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap"). Use Document instead.
superagi-gui-1              | See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component
superagi-gui-1              | Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"). Use Document instead.
superagi-gui-1              | See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component
superagi-gui-1              | - wait compiling /favicon.ico/route (client and server)...
superagi-backend-1          | INFO:     192.168.16.1:40470 - "GET /configs/get/env HTTP/1.1" 200 OK
superagi-backend-1          | INFO:     192.168.16.1:40484 - "GET /projects/get/organisation/null HTTP/1.1" 422 Unprocessable Entity
superagi-gui-1              | - event compiled client and server successfully in 589 ms (848 modules)
zwpseudo commented 1 year ago

same

luciferlinx101 commented 1 year ago

@zwpseudo @kcramp858 Did you guys update the config.yaml with the latest template especially ENV:"DEV" in config.yaml.If not try updating the config.yaml with the latest config_template.yaml

jjohare commented 1 year ago

I have the same with a fresh pull and build on Ubuntu with PROD and DEV

luciferlinx101 commented 1 year ago

@jjohare do you have ENV:DEV set still facing the issue of initializing superagi...?

luciferlinx101 commented 1 year ago

@jjohare can you share your logs and are you stuck in intializing super agi or some other issue? Also can you once do docker compose up --build

Exnav29 commented 1 year ago

Same issue.

Stooovie commented 1 year ago

Same. M1 Mac.

draeder commented 1 year ago

The error appears to imply an issue with your "Organisation ID": "GET /projects/get/organisation/null HTTP/1.1" 422 Unprocessable Entity

Did you configure your OpenAI API key in config.yaml?

Stooovie commented 1 year ago

I did

draeder commented 1 year ago

It looks like that is a locally generated organisation ID. It should create it after that error. I get the same error upon docker compose up --build when I hit the URL, but for me it proceeds just fine. Do you see any additional logging in the browser logs?

backend_1          | INFO:     172.21.0.1:63612 - "GET /projects/get/organisation/null HTTP/1.1" 422 Unprocessable Entity
backend_1          | INFO:     172.21.0.1:63614 - "GET /configs/get/env HTTP/1.1" 200 OK
backend_1          | INFO:     172.21.0.1:63614 - "OPTIONS /users/add HTTP/1.1" 200 OK
backend_1          | INFO:     172.21.0.1:63614 - "POST /users/add HTTP/1.1" 201 Created
backend_1          | INFO:     172.21.0.1:63614 - "GET /organisations/get/user/1 HTTP/1.1" 201 Created
backend_1          | INFO:     172.21.0.1:63614 - "GET /projects/get/organisation/1 HTTP/1.1" 200 OK
backend_1          | INFO:     172.21.0.1:63652 - "GET /tools/get HTTP/1.1" 200 OK
backend_1          | INFO:     172.21.0.1:63612 - "GET /agents/get/project/1 HTTP/1.1" 200 OK
gui_1              | - event compiled successfully in 407 ms (135 modules)
backend_1          | INFO:     172.21.0.1:63614 - "GET /configs/get/organisation/1/key/model_api_key HTTP/1.1" 200 OK
jjohare commented 1 year ago

I fixed this for me with an extra tunnel for 8001, thanks! I suspect I had an VERY similar and spookily timed problem unrelated so I will delete my comments except this.

watzon commented 1 year ago

Ended up running into a similar, if not the same issue. My problem was trying to run inside of WSL, where for some reason my Windows install doesn't like me to use localhost. Using 127.0.0.1 was the root of my issues, the fix was to change line 33 in docker-compose.yaml from - NEXT_PUBLIC_API_BASE_URL=http://localhost:8001 to - NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8001 and then add the lines

    "http://127.0.0.1:3000",
    "http://127.0.0.1:3001",

to the origins list in main.py. Hope this helps someone.

Stooovie commented 1 year ago

sadly not here. Still the same. 422 Unprocessable entity when accessing the webui. The error repeats on each web view refresh.

kcramp858 commented 1 year ago

I believe it must be related to #192 because I was using it just fine, then after restarting the service, I started to get the same error as #192 and I could not see any of my previous agents.

then, docker-compose down, git pulled, and then docker-compose up --build again; then I still had the #192 problem.

then after that, there was a new commit, and I repeated the docker-compose down, git pull, docker-compose up --build, and now I cannot access the webui and just get stuck at initializing.

The more I think about it, potential error hints:

  1. It was working fine, then all I did was restart the docker container and I could no longer use tools -- is there some cache or something I need to delete? Maybe it is referencing old code?
  2. It may be related to the tool feature, because I had that problem before it led into this one.

@luciferlinx101 I am using ENV:"DEV"

kcramp858 commented 1 year ago

--update-- I just fixed it as follows:

docker-compose down git pull docker-compose up --build

... my issue was that I was trying to go to 127.0.0.1:3000 in the web browser. It just sits at Initializing SuperAGI. i changed it to localhost:3000 in the web browser, and it loaded fine and sees all of my agents and tools.

there is some issue with 127.0.0.1 versus localhost.

Stooovie commented 1 year ago

Localhost and 127.0.0.1 behave the same for me. Problem persists.

luciferlinx101 commented 1 year ago

@Stooovie can you share your problem in detail and logs as well.

bonimo commented 1 year ago

I ha Issues on #160 and the same as here. Updating the wait-for-it.sh and entrypoint.sh file while also using the 127.0.0.1 address allowed smoothing running. The app works perfectly by launching just from Docker as well.

bkeys73 commented 1 year ago

same issue here. Mac OSX 11.7.7.

SuroshAhmadZobair commented 1 year ago

any updates? I still have this problem.

it's stuck at Initializing SuperAGI... Thanks in advance

neelayan7 commented 1 year ago

Can you try docker compose down -> git pull -> docker compose up --build

SuroshAhmadZobair commented 1 year ago

Thanks for your response.

I have already tried that. Still the same issue.

Here is the docker log: ✔ Network superagi_super_network Created 0.1s ✔ Container superagi-super__postgres-1 Created 0.1s ✔ Container superagi-gui-1 Created 4.8s ✔ Container superagi-super__redis-1 Created 0.1s ✔ Container superagi-backend-1 Created 0.6s ✔ Container superagi-celery-1 Created 0.6s Attaching to superagi-backend-1, superagi-celery-1, superagi-gui-1, superagi-super__postgres-1, superagi-super__redis-1 superagi-super__postgres-1 | superagi-super__postgres-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization superagi-super__postgres-1 | superagi-super__redis-1 | 1:C 16 Jun 2023 11:20:15.337 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo superagi-super__redis-1 | 1:C 16 Jun 2023 11:20:15.337 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started superagi-super__redis-1 | 1:C 16 Jun 2023 11:20:15.337 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf superagi-super__redis-1 | 1:M 16 Jun 2023 11:20:15.338 * Increased maximum number of open files to 10032 (it was originally set to 1024). superagi-super__redis-1 | 1:M 16 Jun 2023 11:20:15.338 * monotonic clock: POSIX clock_gettime superagi-super__redis-1 | 1:M 16 Jun 2023 11:20:15.338 * Running mode=standalone, port=6379. superagi-super__redis-1 | 1:M 16 Jun 2023 11:20:15.338 # Server initialized superagi-super__redis-1 | 1:M 16 Jun 2023 11:20:15.338 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. superagi-super__redis-1 | 1:M 16 Jun 2023 11:20:15.339 * Ready to accept connections superagi-super__postgres-1 | 2023-06-16 11:20:15.363 UTC [1] LOG: starting PostgreSQL 15.3 (Debian 15.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit superagi-super__postgres-1 | 2023-06-16 11:20:15.363 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 superagi-super__postgres-1 | 2023-06-16 11:20:15.363 UTC [1] LOG: listening on IPv6 address "::", port 5432 superagi-super__postgres-1 | 2023-06-16 11:20:15.369 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" superagi-super__postgres-1 | 2023-06-16 11:20:15.375 UTC [29] LOG: database system was interrupted; last known up at 2023-06-16 07:59:24 UTC superagi-super__postgres-1 | 2023-06-16 11:20:15.482 UTC [29] LOG: database system was not properly shut down; automatic recovery in progress superagi-super__postgres-1 | 2023-06-16 11:20:15.485 UTC [29] LOG: redo starts at 0/1A187B8 superagi-super__postgres-1 | 2023-06-16 11:20:15.485 UTC [29] LOG: invalid record length at 0/1A1A500: wanted 24, got 0 superagi-super__postgres-1 | 2023-06-16 11:20:15.485 UTC [29] LOG: redo done at 0/1A1A4C8 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s superagi-super__postgres-1 | 2023-06-16 11:20:15.491 UTC [27] LOG: checkpoint starting: end-of-recovery immediate wait superagi-super__postgres-1 | 2023-06-16 11:20:15.503 UTC [27] LOG: checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.004 s, sync=0.003 s, total=0.014 s; sync files=3, longest=0.002 s, average=0.001 s; distance=7 kB, estimate=7 kB superagi-super__postgres-1 | 2023-06-16 11:20:15.508 UTC [1] LOG: database system is ready to accept connections superagi-gui-1 | superagi-gui-1 | > super-agi@0.1.0 dev superagi-gui-1 | > next dev superagi-gui-1 | superagi-backend-1 | wait-for-it.sh: waiting 60 seconds for super__postgres:5432 superagi-backend-1 | wait-for-it.sh: super__postgres:5432 is available after 0 seconds superagi-gui-1 | - ready started server on 0.0.0.0:3000, url: http://localhost:3000 superagi-backend-1 | INFO [alembic.runtime.migration] Context impl PostgresqlImpl. superagi-backend-1 | INFO [alembic.runtime.migration] Will assume transactional DDL. superagi-backend-1 | INFO: Will watch for changes in these directories: ['/app'] superagi-backend-1 | INFO: Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit) superagi-backend-1 | INFO: Started reloader process [1] using WatchFiles superagi-gui-1 | Attention: Next.js now collects completely anonymous telemetry regarding usage. superagi-gui-1 | This information is used to shape Next.js' roadmap and prioritize features. superagi-gui-1 | You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: superagi-gui-1 | https://nextjs.org/telemetry superagi-gui-1 | superagi-celery-1 | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main superagi-backend-1 | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main superagi-celery-1 | /usr/local/lib/python3.9/site-packages/celery/platforms.py:840: SecurityWarning: You're running the worker with superuser privileges: this is superagi-celery-1 | absolutely not recommended! superagi-celery-1 | superagi-celery-1 | Please specify a different user using the --uid option. superagi-celery-1 | superagi-celery-1 | User information: uid=0 euid=0 gid=0 egid=0 superagi-celery-1 | superagi-celery-1 | warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format( superagi-celery-1 | superagi-celery-1 | -------------- celery@d6a6437a390e v5.2.7 (dawn-chorus) superagi-celery-1 | --- ***** ----- superagi-celery-1 | -- ******* ---- Linux-5.19.0-43-generic-x86_64-with-glibc2.36 2023-06-16 11:20:18 superagi-celery-1 | - *** --- * --- superagi-celery-1 | - ** ---------- [config] superagi-celery-1 | - ** ---------- .> app: superagi:0x7f8ce8c437f0 superagi-celery-1 | - ** ---------- .> transport: redis://super__redis:6379/0 superagi-celery-1 | - ** ---------- .> results: redis://super__redis:6379/0 superagi-celery-1 | - *** --- * --- .> concurrency: 10 (prefork) superagi-celery-1 | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) superagi-celery-1 | --- ***** ----- superagi-celery-1 | -------------- [queues] superagi-celery-1 | .> celery exchange=celery(direct) key=celery superagi-celery-1 | superagi-celery-1 | superagi-celery-1 | [tasks] superagi-celery-1 | . execute_agent superagi-celery-1 | superagi-celery-1 | [2023-06-16 11:20:19,594: INFO/MainProcess] Connected to redis://super__redis:6379/0 superagi-celery-1 | [2023-06-16 11:20:19,599: INFO/MainProcess] mingle: searching for neighbors superagi-celery-1 | [2023-06-16 11:20:20,608: INFO/MainProcess] mingle: all alone superagi-celery-1 | [2023-06-16 11:20:20,619: INFO/MainProcess] celery@d6a6437a390e ready. superagi-backend-1 | INFO: Started server process [20] superagi-backend-1 | INFO: Waiting for application startup. superagi-backend-1 | INFO: Application startup complete. superagi-gui-1 | - event compiled client and server successfully in 7.8s (1314 modules) superagi-gui-1 | - wait compiling... superagi-gui-1 | - event compiled client and server successfully in 1116 ms (1314 modules) superagi-backend-1 | INFO: 172.25.0.1:36212 - "GET / HTTP/1.1" 404 Not Found superagi-backend-1 | INFO: 172.25.0.1:36212 - "GET /favicon.ico HTTP/1.1" 404 Not Found superagi-gui-1 | - wait compiling /_error (client and server)... superagi-gui-1 | - event compiled client and server successfully in 426 ms (1315 modules) superagi-gui-1 | Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap"). Use Document instead. superagi-gui-1 | See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component superagi-gui-1 | Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"). Use Document instead. superagi-gui-1 | See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component superagi-backend-1 | INFO: 172.25.0.1:48778 - "GET /configs/get/env HTTP/1.1" 200 OK

jtantley commented 1 year ago

Same issue. Everything running in Docker except Celery, it keeps failing to authenticate, can someone explain the requirements for the Redis credentials in the config file? Is redis://localhost:6379 sufficient for the redis URL? If not, how is the URL formatted?

What do I put here? POSTGRES_URL: super__postgres

(I do have a Redis account, but honestly not sure which username, password, or URLs it's looking for. )

Super confused because I had the previous version running fine. I also have a Pinecone account and have my credentials in the config as well, why do we need both Pinecone and Redis? I thought I saw Pinecone isn't being used anymore but it's still the top item in the config file... is that true? Or can I just use Pinecone and stop hitting my head over syntax errors and lack of documentation?

jtantley commented 1 year ago

I'm so confused -- is it mostly talking about PostgreSQL there and not Redis? Even though the heading is # Redis details??

Also, why is none of this explained properly or even in the setup instructions?

mech206117 commented 1 year ago
root@ai-tech:~/SuperAGI# docker compose up --build
[+] Building 3.0s (35/35) FINISHED                                                                             
 => [celery internal] load build definition from DockerfileCelery                                         0.0s
 => => transferring dockerfile: 419B                                                                      0.0s
 => [celery internal] load .dockerignore                                                                  0.0s
 => => transferring context: 50B                                                                          0.0s
 => [backend internal] load metadata for docker.io/library/python:3.9                                     0.0s
 => [gui internal] load build definition from Dockerfile                                                  0.0s
 => => transferring dockerfile: 140B                                                                      0.0s
 => [gui internal] load .dockerignore                                                                     0.0s
 => => transferring context: 2B                                                                           0.0s
 => [backend internal] load build definition from Dockerfile                                              0.0s
 => => transferring dockerfile: 535B                                                                      0.0s
 => [backend internal] load .dockerignore                                                                 0.1s
 => => transferring context: 50B                                                                          0.0s
 => [backend 1/8] FROM docker.io/library/python:3.9                                                       0.0s
 => [celery internal] load build context                                                                  0.1s
 => => transferring context: 25.80kB                                                                      0.0s
 => [gui internal] load metadata for docker.io/library/node:lts                                           0.0s
 => [gui 1/5] FROM docker.io/library/node:lts                                                             0.0s
 => [gui internal] load build context                                                                     0.0s
 => => transferring context: 5.57kB                                                                       0.0s
 => CACHED [backend 2/8] WORKDIR /app                                                                     0.0s
 => CACHED [celery 3/8] RUN pip install --upgrade pip                                                     0.0s
 => CACHED [celery 4/8] COPY requirements.txt .                                                           0.0s
 => CACHED [celery 5/8] RUN pip install --no-cache-dir -r requirements.txt                                0.0s
 => CACHED [celery 6/8] WORKDIR /app                                                                      0.0s
 => [celery 7/8] COPY . .                                                                                 1.6s
 => [backend internal] load build context                                                                 0.1s
 => => transferring context: 25.80kB                                                                      0.0s
 => CACHED [gui 2/5] WORKDIR /app                                                                         0.0s
 => CACHED [gui 3/5] COPY package*.json ./                                                                0.0s
 => CACHED [gui 4/5] RUN npm install                                                                      0.0s
 => CACHED [gui 5/5] COPY . .                                                                             0.0s
 => [gui] exporting to image                                                                              0.0s
 => => exporting layers                                                                                   0.0s
 => => writing image sha256:8452056a4453b415f0e0830dd4411e6d90a34208b9b2cc486e872b1ed6caafcf              0.0s
 => => naming to docker.io/library/superagi-gui                                                           0.0s
 => CACHED [backend  3/10] COPY requirements.txt .                                                        0.0s
 => CACHED [backend  4/10] RUN pip install --upgrade pip                                                  0.0s
 => CACHED [backend  5/10] RUN pip install --no-cache-dir -r requirements.txt                             0.0s
 => [backend  6/10] COPY . .                                                                              1.5s
 => [celery 8/8] COPY config.yaml .                                                                       0.1s
 => [backend  7/10] COPY config.yaml ./config.yaml                                                        0.1s
 => [celery] exporting to image                                                                           0.6s
 => => exporting layers                                                                                   0.6s
 => => writing image sha256:878fa29de9d635b160617e9a504158a8491d8374c29eac52b05cad6004a131ff              0.0s
 => => naming to docker.io/library/superagi-celery                                                        0.0s
 => [backend  8/10] COPY entrypoint.sh /entrypoint.sh                                                     0.1s
 => [backend  9/10] COPY wait-for-it.sh /wait-for-it.sh                                                   0.1s
 => [backend 10/10] RUN chmod +x /entrypoint.sh /wait-for-it.sh                                           0.5s
 => [backend] exporting to image                                                                          0.5s
 => => exporting layers                                                                                   0.5s
 => => writing image sha256:5bd8050297d3bb69cac5b78cc82ca69799326261c52a6e6ed9cdd16e2df63389              0.0s
 => => naming to docker.io/library/superagi-backend                                                       0.0s
[+] Running 5/5
 ✔ Container superagi-super__postgres-1  Created                                                          0.0s 
 ✔ Container superagi-gui-1              Recreated                                                        0.1s 
 ✔ Container superagi-super__redis-1     Created                                                          0.0s 
 ✔ Container superagi-backend-1          Recreated                                                        0.1s 
 ✔ Container superagi-celery-1           Recreated                                                        0.1s 
Attaching to superagi-backend-1, superagi-celery-1, superagi-gui-1, superagi-super__postgres-1, superagi-super__redis-1
superagi-super__postgres-1  | 
superagi-super__postgres-1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
superagi-super__postgres-1  | 
superagi-super__postgres-1  | 2023-06-18 09:23:46.767 UTC [1] LOG:  starting PostgreSQL 15.3 (Debian 15.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
superagi-super__postgres-1  | 2023-06-18 09:23:46.792 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
superagi-super__postgres-1  | 2023-06-18 09:23:46.792 UTC [1] LOG:  listening on IPv6 address "::", port 5432
superagi-super__redis-1     | 1:C 18 Jun 2023 09:23:46.802 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
superagi-super__postgres-1  | 2023-06-18 09:23:46.804 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
superagi-super__redis-1     | 1:C 18 Jun 2023 09:23:46.807 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
superagi-super__redis-1     | 1:C 18 Jun 2023 09:23:46.807 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
superagi-super__postgres-1  | 2023-06-18 09:23:46.814 UTC [29] LOG:  database system was shut down at 2023-06-18 09:21:51 UTC
superagi-super__redis-1     | 1:M 18 Jun 2023 09:23:46.813 * monotonic clock: POSIX clock_gettime
superagi-super__redis-1     | 1:M 18 Jun 2023 09:23:46.814 * Running mode=standalone, port=6379.
superagi-super__redis-1     | 1:M 18 Jun 2023 09:23:46.814 # Server initialized
superagi-super__redis-1     | 1:M 18 Jun 2023 09:23:46.819 * Loading RDB produced by version 7.0.11
superagi-super__redis-1     | 1:M 18 Jun 2023 09:23:46.819 * RDB age 115 seconds
superagi-super__redis-1     | 1:M 18 Jun 2023 09:23:46.819 * RDB memory usage when created 1.18 Mb
superagi-super__redis-1     | 1:M 18 Jun 2023 09:23:46.819 * Done loading RDB, keys loaded: 1, keys expired: 0.
superagi-super__redis-1     | 1:M 18 Jun 2023 09:23:46.819 * DB loaded from disk: 0.000 seconds
superagi-super__redis-1     | 1:M 18 Jun 2023 09:23:46.819 * Ready to accept connections
superagi-super__postgres-1  | 2023-06-18 09:23:46.832 UTC [1] LOG:  database system is ready to accept connections
superagi-backend-1          | wait-for-it.sh: waiting 60 seconds for super__postgres:5432
superagi-backend-1          | wait-for-it.sh: super__postgres:5432 is available after 0 seconds
superagi-gui-1              | 
superagi-gui-1              | > super-agi@0.1.0 dev
superagi-gui-1              | > next dev
superagi-gui-1              | 
superagi-backend-1          | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
superagi-backend-1          | INFO  [alembic.runtime.migration] Will assume transactional DDL.
superagi-gui-1              | - ready started server on 0.0.0.0:3000, url: http://localhost:3000
superagi-backend-1          | INFO:     Will watch for changes in these directories: ['/app']
superagi-backend-1          | INFO:     Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)
superagi-backend-1          | INFO:     Started reloader process [1] using WatchFiles
superagi-celery-1           | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main
superagi-backend-1          | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main
superagi-celery-1           | /usr/local/lib/python3.9/site-packages/celery/platforms.py:840: SecurityWarning: You're running the worker with superuser privileges: this is
superagi-celery-1           | absolutely not recommended!
superagi-celery-1           | 
superagi-celery-1           | Please specify a different user using the --uid option.
superagi-celery-1           | 
superagi-celery-1           | User information: uid=0 euid=0 gid=0 egid=0
superagi-celery-1           | 
superagi-celery-1           |   warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
superagi-celery-1           |  
superagi-celery-1           |  -------------- celery@94404e535995 v5.2.7 (dawn-chorus)
superagi-celery-1           | --- ***** ----- 
superagi-celery-1           | -- ******* ---- Linux-5.15.0-1036-gcp-x86_64-with-glibc2.36 2023-06-18 09:23:54
superagi-celery-1           | - *** --- * --- 
superagi-celery-1           | - ** ---------- [config]
superagi-celery-1           | - ** ---------- .> app:         superagi:0x7f2318343700
superagi-celery-1           | - ** ---------- .> transport:   redis://super__redis:6379/0
superagi-celery-1           | - ** ---------- .> results:     redis://super__redis:6379/0
superagi-celery-1           | - *** --- * --- .> concurrency: 10 (prefork)
superagi-celery-1           | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
superagi-celery-1           | --- ***** ----- 
superagi-celery-1           |  -------------- [queues]
superagi-celery-1           |                 .> celery           exchange=celery(direct) key=celery
superagi-celery-1           |                 
superagi-celery-1           | 
superagi-celery-1           | [tasks]
superagi-celery-1           |   . execute_agent
superagi-celery-1           | 
superagi-backend-1          | INFO:     Started server process [20]
superagi-backend-1          | INFO:     Waiting for application startup.
superagi-backend-1          | INFO:     Application startup complete.
superagi-celery-1           | [2023-06-18 09:23:58,011: INFO/MainProcess] Connected to redis://super__redis:6379/0
superagi-celery-1           | [2023-06-18 09:23:58,025: INFO/MainProcess] mingle: searching for neighbors
superagi-celery-1           | [2023-06-18 09:23:59,059: INFO/MainProcess] mingle: all alone
superagi-celery-1           | [2023-06-18 09:23:59,092: INFO/MainProcess] celery@94404e535995 ready.
superagi-gui-1              | - event compiled client and server successfully in 6s (1314 modules)
superagi-gui-1              | - wait compiling...
superagi-gui-1              | - event compiled client and server successfully in 1767 ms (1314 modules)
superagi-gui-1              | - wait compiling /_error (client and server)...
superagi-gui-1              | - event compiled client and server successfully in 529 ms (1315 modules)
superagi-gui-1              | Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap"). Use Document instead. 
superagi-gui-1              | See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component
superagi-gui-1              | Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"). Use Document instead. 
superagi-gui-1              | See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component
superagi-gui-1              | - wait compiling /favicon.ico/route (client and server)...
superagi-gui-1              | - event compiled successfully in 108 ms (146 modules)
superagi-super__postgres-1  | 2023-06-18 09:28:46.875 UTC [27] LOG:  checkpoint starting: time
superagi-super__postgres-1  | 2023-06-18 09:28:46.997 UTC [27] LOG:  checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.105 s, sync=0.004 s, total=0.123 s; sync files=3, longest=0.003 s, average=0.002 s; distance=6 kB, estimate=6 kB
superagi-gui-1              | node:events:491
superagi-gui-1              |       throw er; // Unhandled 'error' event
superagi-gui-1              |       ^
superagi-gui-1              | 
superagi-gui-1              | Error: read ECONNRESET
superagi-gui-1              |     at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
superagi-gui-1              | Emitted 'error' event on Socket instance at:
superagi-gui-1              |     at emitErrorNT (node:internal/streams/destroy:151:8)
superagi-gui-1              |     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
superagi-gui-1              |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
superagi-gui-1              |   errno: -104,
superagi-gui-1              |   code: 'ECONNRESET',
superagi-gui-1              |   syscall: 'read'
superagi-gui-1              | }
superagi-gui-1              | 
superagi-gui-1              | Node.js v18.16.0
superagi-gui-1 exited with code 1
^CGracefully stopping... (press Ctrl+C again to force)
Aborting on container exit...
[+] Stopping 5/5
 ✔ Container superagi-gui-1              Stopped                                                          0.0s 
 ✔ Container superagi-celery-1           Stopped                                                          2.2s 
 ✔ Container superagi-backend-1          Stopped                                                          0.9s 
 ✔ Container superagi-super__postgres-1  Stopped                                                          0.4s 
 ✔ Container superagi-super__redis-1     Stopped                                                          0.4s 
canceled
root@ai-tech:~/SuperAGI# 

Please Help Stuck at 'Initializing SuperAGI'. After some node related error and page became unresponsive.

Stooovie commented 1 year ago

Still not fixed, rebuilt today. Stuck on Initializing and "172.19.0.1:51502 - "GET /projects/get/organisation/null HTTP/1.1" 422 Unprocessable Entity" in terminal

luciferlinx101 commented 1 year ago

@Stooovie It sends one request with null param leading to 422 followed by the correct request so you might send see a 422 initially but it shouldn't hinder your run if config is configured properly.

Are you able to run properly?

Stooovie commented 1 year ago

It's stuck on "Initializing SuoerAGI" in MacOS. I can run it in an Ubuntu 23.04 VM, but that one is stuck at Thinking... so no, i am not able to fully run SA at all.

luciferlinx101 commented 1 year ago

@Stooovie can you share or confirm about ENV:DEV present in config.yaml in case of MacOS. Also don't forget to take the latest pull.

Stooovie commented 1 year ago

ENV:DEV is present and uncommented. Pulled new images, still the same issue. This is three OSes that fail at different spots. Fedora gets stuck on "superagi_proxy_1 exited with code 1"

Stooovie commented 1 year ago

PopOS gets stuck on yet another place: 2023/06/26 15:53:27 [error] 29#29: *313 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 172.18.0.1, server: , request: "GET /_next/webpack-hmr HTTP/1.1", upstream: "http://172.18.0.6:3000/_next/webpack-hmr", host: "localhost:3000"

So that's four different operating systems, each stuck on different place.

neelayan7 commented 1 year ago

@Stooovie can we connect on Discord to further discuss this issue? Would like to resolve this issue as we are not seeing this issue at our end. Please join our discord server: https://discord.com/invite/dXbRe5BHJC

I'm rick_7on discord.

Stooovie commented 1 year ago

hi, thanks, contacting you on Discord now

BeeChains commented 1 year ago

http://127.0.0.1:8001

yes this fixed stuck on Initializing SuperAgi.. screen for me too, thank you!

Princebaskar commented 1 year ago

I've upgraded to the last version of Dockets and SuperAgi today. I've lost the app. Stuck in initializing window. Working on a M1 MacBook Pro. No solution has been found? Is this issue being attracting developer's attention?. Also, this is addressed in issue #347 (also still opened).

Princebaskar commented 1 year ago

Exactly the same behavior I have also using the cloud version (app.superagi.com)