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
15.23k stars 1.83k forks source link

SuperAGI gui exited with code 1 #398

Open sergeda opened 1 year ago

sergeda commented 1 year ago

When I run docker-compose up I see this in the console:

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 16 Jun 2023 10:48:35.109 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
superagi-super__redis-1     | 1:C 16 Jun 2023 10:48:35.109 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
superagi-super__redis-1     | 1:C 16 Jun 2023 10:48:35.109 # 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 10:48:35.110 * monotonic clock: POSIX clock_gettime
superagi-super__redis-1     | 1:M 16 Jun 2023 10:48:35.110 * Running mode=standalone, port=6379.
superagi-super__redis-1     | 1:M 16 Jun 2023 10:48:35.110 # Server initialized
superagi-super__redis-1     | 1:M 16 Jun 2023 10:48:35.111 * Loading RDB produced by version 7.0.11
superagi-super__redis-1     | 1:M 16 Jun 2023 10:48:35.111 * RDB age 50 seconds
superagi-super__redis-1     | 1:M 16 Jun 2023 10:48:35.111 * RDB memory usage when created 0.82 Mb
superagi-super__redis-1     | 1:M 16 Jun 2023 10:48:35.111 * Done loading RDB, keys loaded: 0, keys expired: 0.
superagi-super__redis-1     | 1:M 16 Jun 2023 10:48:35.111 * DB loaded from disk: 0.000 seconds
superagi-super__redis-1     | 1:M 16 Jun 2023 10:48:35.111 * 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 exited with code 1

What should I do to be able to understand what is going on?

Fluder-Paradyne commented 1 year ago

is there anyother services using localhost:3000 port

Fluder-Paradyne commented 1 year ago

try running this to check

sudo lsof -n -i :3000 | grep LISTEN

if someother serivce is running in 3000 port

sergeda commented 1 year ago

Nope. sudo lsof -i -P -n | grep 3000 returns empty result. Here is full log from docker-compose:

superagi-super__redis-1     | 1:C 16 Jun 2023 12:27:22.927 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
superagi-super__redis-1     | 1:C 16 Jun 2023 12:27:22.927 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
superagi-super__redis-1     | 1:C 16 Jun 2023 12:27:22.927 # 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 12:27:22.928 * monotonic clock: POSIX clock_gettime
superagi-super__redis-1     | 1:M 16 Jun 2023 12:27:22.928 * Running mode=standalone, port=6379.
superagi-super__redis-1     | 1:M 16 Jun 2023 12:27:22.928 # Server initialized
superagi-super__redis-1     | 1:M 16 Jun 2023 12:27:22.929 * Loading RDB produced by version 7.0.11
superagi-super__redis-1     | 1:M 16 Jun 2023 12:27:22.929 * RDB age 5977 seconds
superagi-super__redis-1     | 1:M 16 Jun 2023 12:27:22.929 * RDB memory usage when created 0.82 Mb
superagi-super__redis-1     | 1:M 16 Jun 2023 12:27:22.929 * Done loading RDB, keys loaded: 0, keys expired: 0.
superagi-super__redis-1     | 1:M 16 Jun 2023 12:27:22.929 * DB loaded from disk: 0.000 seconds
superagi-super__redis-1     | 1:M 16 Jun 2023 12:27:22.929 * Ready to accept connections
superagi-super__postgres-1  | The files belonging to this database system will be owned by user "postgres".
superagi-super__postgres-1  | This user must also own the server process.
superagi-super__postgres-1  | 
superagi-super__postgres-1  | The database cluster will be initialized with locale "en_US.utf8".
superagi-super__postgres-1  | The default database encoding has accordingly been set to "UTF8".
superagi-super__postgres-1  | The default text search configuration will be set to "english".
superagi-super__postgres-1  | 
superagi-super__postgres-1  | Data page checksums are disabled.
superagi-super__postgres-1  | 
superagi-super__postgres-1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
superagi-super__postgres-1  | creating subdirectories ... ok
superagi-super__postgres-1  | selecting dynamic shared memory implementation ... posix
superagi-super__postgres-1  | selecting default max_connections ... 100
superagi-super__postgres-1  | selecting default shared_buffers ... 128MB
superagi-super__postgres-1  | selecting default time zone ... Etc/UTC
superagi-super__postgres-1  | creating configuration files ... ok
superagi-super__postgres-1  | running bootstrap script ... ok
superagi-backend-1          | wait-for-it.sh: waiting 60 seconds for super__postgres:5432
superagi-gui-1              | 
superagi-gui-1              | > super-agi@0.1.0 dev
superagi-gui-1              | > next dev
superagi-gui-1              | 
superagi-super__postgres-1  | performing post-bootstrap initialization ... ok
superagi-super__postgres-1  | syncing data to disk ... ok
superagi-super__postgres-1  | 
superagi-super__postgres-1  | 
superagi-super__postgres-1  | Success. You can now start the database server using:
superagi-super__postgres-1  | 
superagi-super__postgres-1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
superagi-super__postgres-1  | 
superagi-super__postgres-1  | initdb: warning: enabling "trust" authentication for local connections
superagi-super__postgres-1  | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
superagi-super__postgres-1  | waiting for server to start....2023-06-16 12:27:23.585 UTC [47] 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 12:27:23.587 UTC [47] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
superagi-super__postgres-1  | 2023-06-16 12:27:23.593 UTC [50] LOG:  database system was shut down at 2023-06-16 12:27:23 UTC
superagi-super__postgres-1  | 2023-06-16 12:27:23.599 UTC [47] LOG:  database system is ready to accept connections
superagi-gui-1              | - ready started server on 0.0.0.0:3000, url: http://localhost:3000
superagi-super__postgres-1  |  done
superagi-super__postgres-1  | server started
superagi-super__postgres-1  | CREATE DATABASE
superagi-super__postgres-1  | 
superagi-super__postgres-1  | 
superagi-super__postgres-1  | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
superagi-super__postgres-1  | 
superagi-super__postgres-1  | waiting for server to shut down....2023-06-16 12:27:23.782 UTC [47] LOG:  received fast shutdown request
superagi-super__postgres-1  | 2023-06-16 12:27:23.785 UTC [47] LOG:  aborting any active transactions
superagi-super__postgres-1  | 2023-06-16 12:27:23.786 UTC [47] LOG:  background worker "logical replication launcher" (PID 53) exited with exit code 1
superagi-super__postgres-1  | 2023-06-16 12:27:23.787 UTC [48] LOG:  shutting down
superagi-super__postgres-1  | 2023-06-16 12:27:23.788 UTC [48] LOG:  checkpoint starting: shutdown immediate
superagi-super__postgres-1  | 2023-06-16 12:27:23.825 UTC [48] LOG:  checkpoint complete: wrote 918 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.013 s, sync=0.018 s, total=0.039 s; sync files=250, longest=0.007 s, average=0.001 s; distance=4223 kB, estimate=4223 kB
superagi-super__postgres-1  | 2023-06-16 12:27:23.834 UTC [47] LOG:  database system is shut down
superagi-super__postgres-1  |  done
superagi-super__postgres-1  | server stopped
superagi-super__postgres-1  | 
superagi-super__postgres-1  | PostgreSQL init process complete; ready for start up.
superagi-super__postgres-1  | 
superagi-super__postgres-1  | 2023-06-16 12:27:23.903 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 12:27:23.903 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
superagi-super__postgres-1  | 2023-06-16 12:27:23.903 UTC [1] LOG:  listening on IPv6 address "::", port 5432
superagi-super__postgres-1  | 2023-06-16 12:27:23.906 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
superagi-super__postgres-1  | 2023-06-16 12:27:23.912 UTC [63] LOG:  database system was shut down at 2023-06-16 12:27:23 UTC
superagi-super__postgres-1  | 2023-06-16 12:27:23.916 UTC [1] LOG:  database system is ready to accept connections
superagi-celery-1           | Connected to the database! @ postgresql://superagi:password@super__postgres/super_agi_main
superagi-backend-1          | wait-for-it.sh: super__postgres:5432 is available after 1 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  [alembic.runtime.migration] Running upgrade  -> 44b0d6f2d1b3, init models
superagi-backend-1          | INFO  [alembic.runtime.migration] Running upgrade 44b0d6f2d1b3 -> a91808a89623, added resources
superagi-backend-1          | INFO  [alembic.runtime.migration] Running upgrade a91808a89623 -> 2f97c068fab9, Resource Modified
superagi-backend-1          | INFO  [alembic.runtime.migration] Running upgrade 2f97c068fab9 -> 2cc1179834b0, agent_executions_modified
superagi-backend-1          | INFO  [alembic.runtime.migration] Running upgrade 2cc1179834b0 -> 598cfb37292a, adding agent templates
superagi-backend-1          | INFO  [alembic.runtime.migration] Running upgrade 598cfb37292a -> 35e47f20475b, renamed_tokens_calls
superagi-backend-1          | INFO  [alembic.runtime.migration] Running upgrade 35e47f20475b -> 3356a2f89a33, added_configurations_table
superagi-backend-1          | INFO  [alembic.runtime.migration] Running upgrade 3356a2f89a33 -> d9b3436197eb, renaming templates
superagi-backend-1          | INFO  [alembic.runtime.migration] Running upgrade d9b3436197eb -> 8962bed0d809, creating agent templates
superagi-backend-1          | INFO  [alembic.runtime.migration] Running upgrade 8962bed0d809 -> 516ecc1c723d, adding marketplace_template_id to agent tempaltes
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-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@bdcf3e0f84b5 v5.2.7 (dawn-chorus)
superagi-celery-1           | --- ***** ----- 
superagi-celery-1           | -- ******* ---- Linux-5.15.49-linuxkit-x86_64-with-glibc2.36 2023-06-16 12:27:26
superagi-celery-1           | - *** --- * --- 
superagi-celery-1           | - ** ---------- [config]
superagi-celery-1           | - ** ---------- .> app:         superagi:0x7f428075f040
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 exited with code 1
superagi-celery-1           | [2023-06-16 12:27:27,714: INFO/MainProcess] Connected to redis://super__redis:6379/0
superagi-celery-1           | [2023-06-16 12:27:27,721: INFO/MainProcess] mingle: searching for neighbors
superagi-celery-1           | [2023-06-16 12:27:28,730: INFO/MainProcess] mingle: all alone
superagi-celery-1           | [2023-06-16 12:27:28,742: INFO/MainProcess] celery@bdcf3e0f84b5 ready.
superagi-backend-1          | INFO:     Started server process [23]
superagi-backend-1          | INFO:     Waiting for application startup.
superagi-backend-1          | INFO:     Application startup complete.
sergeda commented 1 year ago

No result for sudo lsof -n -i :3000 | grep LISTEN as well

Fluder-Paradyne commented 1 year ago

what does sudo docker ps -a gives

sergeda commented 1 year ago
61f0758bf216   superagi-backend       "/wait-for-it.sh sup…"   2 hours ago   Up 15 seconds                  0.0.0.0:8001->8001/tcp   superagi-backend-1
bdcf3e0f84b5   superagi-celery        "celery -A superagi.…"   2 hours ago   Up 15 seconds                                           superagi-celery-1
c2db347dec3c   postgres:latest        "docker-entrypoint.s…"   2 hours ago   Up 15 seconds                  0.0.0.0:5432->5432/tcp   superagi-super__postgres-1
43b128cf5c82   superagi-gui           "docker-entrypoint.s…"   2 hours ago   Exited (1) 11 seconds ago                               superagi-gui-1
4c2c51a726eb   redis:latest           "docker-entrypoint.s…"   2 hours ago   Up 15 seconds                  6379/tcp                 superagi-super__redis-1
Fluder-Paradyne commented 1 year ago

gui seems to be the only one failing so if this also fails run this sudo docker compose logs gui

sergeda commented 1 year ago

This didn't give much:

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  | 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-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  | 
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  | 
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  | 
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
Fluder-Paradyne commented 1 year ago

yea, I there are no explicit errors in the logs, so if you have node u can try running it locally but doing cd gui npm install npm run dev

sergeda commented 1 year ago

When I'm doing npm run dev I'm getting:

/ai/SuperAGI/gui/node_modules/next/dist/cli/next-dev.js:256
            showAll: args["--show-all"] ?? false,
                                         ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.dev (/ai/SuperAGI/gui/node_modules/next/dist/lib/commands.js:15:30)
    at Object.<anonymous> (/ai/SuperAGI/gui/node_modules/next/dist/bin/next:150:28)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
Fluder-Paradyne commented 1 year ago

https://github.com/vercel/next.js/discussions/47165 try this out

sergeda commented 1 year ago

Thank you. After upgrade node to version 18 I was able to run it but web ui doesn't work superagi

coder-rancho commented 1 year ago

I'm experiencing the same issue, It is stuck on "Initializing SuperAGI"