Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error connecting to server (again) #1520

Open
6 of 10 tasks
SeanFrohman opened this issue Apr 4, 2024 · 6 comments
Open
6 of 10 tasks

Error connecting to server (again) #1520

SeanFrohman opened this issue Apr 4, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@SeanFrohman
Copy link

Please check that this issue hasn't been reported before.

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

AgentGPT works...

Current behaviour

I have installed and run everything properly, i went as far as to get a NEXT AUTH SECRET key, and make sure almost ANYTHING that said changeme now has a working key there, and even still, with a venv and docker running perfect, and everything working as expected, I still get this error. I was told to make sure the front end and back end are able to see each other, and it seems as if it would work at this point AND I had it working at one point in the past, but I can't get past this error.

Attaching to agentgpt_db, frontend, platform
agentgpt_db | 2024-04-04 09:15:38+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.36-1.el8 started.
frontend | dos2unix: converting file wait-for-db.sh to Unix format...
frontend | dos2unix: converting file .env.temp to Unix format...
frontend | Database is unavailable - Sleeping...
agentgpt_db | 2024-04-04 09:15:38+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
agentgpt_db | 2024-04-04 09:15:38+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.36-1.el8 started.
agentgpt_db | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
platform | INFO: Will watch for changes in these directories: ['/app/src']
platform | INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
platform | INFO: Started reloader process [1] using WatchFiles
agentgpt_db | 2024-04-04T09:15:38.640736Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
agentgpt_db | 2024-04-04T09:15:38.641075Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.36) starting as process 1
agentgpt_db | 2024-04-04T09:15:38.644698Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
agentgpt_db | 2024-04-04T09:15:38.691159Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
agentgpt_db | 2024-04-04T09:15:38.809942Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
agentgpt_db | 2024-04-04T09:15:38.809963Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
agentgpt_db | 2024-04-04T09:15:38.810815Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
agentgpt_db | 2024-04-04T09:15:38.820703Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
agentgpt_db | 2024-04-04T09:15:38.820723Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.36' socket: '/var/run/mysqld/mysqld.sock' port: 3307 MySQL Community Server - GPL.
frontend | Database is available! Continuing...
platform | Process SpawnProcess-1:
platform | Traceback (most recent call last):
platform | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
platform | self.run()
platform | File "/usr/local/lib/python3.11/multiprocessing/process.py", line 108, in run
platform | self._target(*self._args, **self._kwargs)
platform | File "/usr/local/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
platform | target(sockets=sockets)
platform | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
platform | return asyncio.run(self.serve(sockets=sockets))
platform | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
platform | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
platform | return runner.run(main)
platform | ^^^^^^^^^^^^^^^^
platform | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
platform | return self._loop.run_until_complete(task)
platform | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
platform | File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
platform | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
platform | config.load()
platform | File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 473, in load
platform | self.loaded_app = import_from_string(self.app)
platform | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
platform | File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 24, in import_from_string
platform | raise exc from None
platform | File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
platform | module = importlib.import_module(module_str)
platform | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
platform | File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
platform | return _bootstrap._gcd_import(name[level:], package, level)
platform | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
platform | File "", line 1204, in _gcd_import
platform | File "", line 1176, in _find_and_load
platform | File "", line 1147, in _find_and_load_unlocked
platform | File "", line 690, in _load_unlocked
platform | File "", line 940, in exec_module
platform | File "", line 241, in _call_with_frames_removed
platform | File "/app/src/reworkd_platform/web/application.py", line 11, in
platform | from reworkd_platform.web.api.router import api_router
platform | File "/app/src/reworkd_platform/web/api/router.py", line 3, in
platform | from reworkd_platform.web.api import agent, auth, metadata, models, monitoring
platform | File "/app/src/reworkd_platform/web/api/agent/init.py", line 2, in
platform | from reworkd_platform.web.api.agent.views import router
platform | File "/app/src/reworkd_platform/web/api/agent/views.py", line 17, in
platform | from reworkd_platform.web.api.agent.agent_service.agent_service_provider import (
platform | File "/app/src/reworkd_platform/web/api/agent/agent_service/agent_service_provider.py", line 15, in
platform | from reworkd_platform.web.api.agent.agent_service.open_ai_agent_service import (
platform | File "/app/src/reworkd_platform/web/api/agent/agent_service/open_ai_agent_service.py", line 4, in
platform | from lanarky.responses import StreamingResponse
platform | File "/usr/local/lib/python3.11/site-packages/lanarky/init.py", line 1, in
platform | from .responses import StreamingResponse
platform | File "/usr/local/lib/python3.11/site-packages/lanarky/responses/init.py", line 1, in
platform | from .streaming import StreamingResponse
platform | File "/usr/local/lib/python3.11/site-packages/lanarky/responses/streaming.py", line 18, in
platform | from lanarky.callbacks import (
platform | File "/usr/local/lib/python3.11/site-packages/lanarky/callbacks/init.py", line 11, in
platform | from .agents import * # noqa: F401, F403
platform | ^^^^^^^^^^^^^^^^^^^^^
platform | File "/usr/local/lib/python3.11/site-packages/lanarky/callbacks/agents.py", line 10, in
platform | from .base import AsyncLanarkyCallback
platform | File "/usr/local/lib/python3.11/site-packages/lanarky/callbacks/base.py", line 7, in
platform | from langchain.globals import get_llm_cache
platform | ModuleNotFoundError: No module named 'langchain.globals'
frontend |
frontend | ! unknown or unexpected option: --name
frontend |
frontend | Apply pending migrations to update the database schema in production/staging
frontend |
frontend | Usage
frontend |
frontend | $ prisma migrate deploy [options]
frontend |
frontend | Options
frontend |
frontend | -h, --help Display this help message
frontend | --schema Custom path to your Prisma schema
frontend |
frontend | Examples
frontend |
frontend | Deploy your pending migrations to your production/staging database
frontend | $ prisma migrate deploy
frontend |
frontend | Specify a schema
frontend | $ prisma migrate deploy --schema=./schema.prisma
frontend |
frontend | Environment variables loaded from .env
frontend | Prisma schema loaded from prisma/schema.prisma
frontend | Datasource "db": MySQL database "reworkd_platform" at "agentgpt_db:3307"
frontend |
frontend | The database is already in sync with the Prisma schema.
frontend |
✔ Generated Prisma Client (4.13.0 | library) to ./node_modules/@prisma/client in
frontend | 109ms
frontend |
frontend | Environment variables loaded from .env
frontend | Prisma schema loaded from prisma/schema.prisma
frontend |
frontend | ✔ Generated Prisma Client (4.13.0 | library) to ./node_modules/@prisma/client in 111ms
frontend | You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
frontend | frontend | import { PrismaClient } from '@prisma/client' frontend | const prisma = new PrismaClient() frontend |
frontend |
frontend | > [email protected] dev
frontend | > next dev
frontend |
frontend | ▲ Next.js 13.5.6
frontend | - Local: http://localhost:3000
frontend | - Environments: .env
frontend |
frontend | ✓ Ready in 1383ms
frontend | Browserslist: caniuse-lite is outdated. Please run:
frontend | npx update-browserslist-db@latest
frontend | Why you should do it regularly: https://github.com/browserslist/update-db#readme
frontend | ✓ Compiled /_error in 2.4s (390 modules)
frontend | ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
frontend | ✓ Compiled in 364ms (334 modules)
frontend | ✓ Compiled / in 1249ms (1619 modules)
frontend | ✓ Compiled /api/auth/[...nextauth] in 244ms (358 modules)
frontend | prisma:query SELECT reworkd_platform.Session.id, reworkd_platform.Session.sessionToken, reworkd_platform.Session.userId, reworkd_platform.Session.expires FROM reworkd_platform.Session WHERE reworkd_platform.Session.sessionToken IN (?,?)
frontend | prisma:query SELECT reworkd_platform.User.id, reworkd_platform.User.name, reworkd_platform.User.email, reworkd_platform.User.emailVerified, reworkd_platform.User.image, reworkd_platform.User.super_admin, reworkd_platform.User.createDate FROM reworkd_platform.User WHERE reworkd_platform.User.id IN (?)
frontend | prisma:query SELECT reworkd_platform.Session.id, reworkd_platform.Session.sessionToken, reworkd_platform.Session.userId, reworkd_platform.Session.expires FROM reworkd_platform.Session WHERE reworkd_platform.Session.userId = ? ORDER BY reworkd_platform.Session.expires DESC LIMIT ? OFFSET ?
frontend | prisma:query SELECT reworkd_platform.Session.id, reworkd_platform.Session.sessionToken, reworkd_platform.Session.userId, reworkd_platform.Session.expires FROM reworkd_platform.Session WHERE reworkd_platform.Session.userId = ? ORDER BY reworkd_platform.Session.expires DESC LIMIT ? OFFSET ?
frontend | prisma:query SELECT reworkd_platform.organization_user.id, reworkd_platform.organization_user.user_id, reworkd_platform.organization_user.organization_id, reworkd_platform.organization_user.role, reworkd_platform.organization_user.create_date, reworkd_platform.organization_user.update_date, reworkd_platform.organization_user.delete_date FROM reworkd_platform.organization_user WHERE reworkd_platform.organization_user.user_id = ?
frontend | prisma:query SELECT reworkd_platform.organization_user.id, reworkd_platform.organization_user.user_id, reworkd_platform.organization_user.organization_id, reworkd_platform.organization_user.role, reworkd_platform.organization_user.create_date, reworkd_platform.organization_user.update_date, reworkd_platform.organization_user.delete_date FROM reworkd_platform.organization_user WHERE reworkd_platform.organization_user.user_id = ?
frontend | ✓ Compiled /api/trpc/[trpc] in 116ms (368 modules)
frontend | prisma:query SELECT reworkd_platform.Session.id, reworkd_platform.Session.sessionToken, reworkd_platform.Session.userId, reworkd_platform.Session.expires FROM reworkd_platform.Session WHERE (reworkd_platform.Session.sessionToken = ? AND 1=1) LIMIT ? OFFSET ?
frontend | prisma:query SELECT reworkd_platform.User.id, reworkd_platform.User.name, reworkd_platform.User.email, reworkd_platform.User.emailVerified, reworkd_platform.User.image, reworkd_platform.User.super_admin, reworkd_platform.User.createDate FROM reworkd_platform.User WHERE reworkd_platform.User.id IN (?)
frontend | prisma:query SELECT reworkd_platform.organization_user.id, reworkd_platform.organization_user.user_id, reworkd_platform.organization_user.organization_id, reworkd_platform.organization_user.role, reworkd_platform.organization_user.create_date, reworkd_platform.organization_user.update_date, reworkd_platform.organization_user.delete_date FROM reworkd_platform.organization_user WHERE reworkd_platform.organization_user.user_id = ?
frontend | prisma:query SELECT reworkd_platform.Session.id, reworkd_platform.Session.sessionToken, reworkd_platform.Session.userId, reworkd_platform.Session.expires FROM reworkd_platform.Session WHERE reworkd_platform.Session.userId = ? ORDER BY reworkd_platform.Session.expires DESC LIMIT ? OFFSET ?
frontend | prisma:query SELECT reworkd_platform.Agent.id, reworkd_platform.Agent.userId, reworkd_platform.Agent.name, reworkd_platform.Agent.goal, reworkd_platform.Agent.deleteDate, reworkd_platform.Agent.createDate FROM reworkd_platform.Agent WHERE (reworkd_platform.Agent.userId = ? AND reworkd_platform.Agent.deleteDate IS NULL) ORDER BY reworkd_platform.Agent.createDate DESC LIMIT ? OFFSET ?

Does anything look off to you?

Steps to reproduce

Run env, activate
docker compose up --build
running....

Nothing... error connecting to server...

Possible solution

I'm missing something related to one of the keys, or I messed up something in docker...

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Acknowledgements

  • My issue title is concise, descriptive, and in title casing.
  • I have searched the existing issues to make sure this bug has not been reported yet.
  • I am using the latest version of AgentGPT.
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.
@SeanFrohman SeanFrohman added the bug Something isn't working label Apr 4, 2024
@ckep1
Copy link

ckep1 commented Apr 7, 2024

I get the same terminal output on Mac 14.4.1, same error

@pschulzk
Copy link

Same error. macOS Sonoma 14.4.1 (23E224).

@pawel-dubiel
Copy link

pawel-dubiel commented May 11, 2024

I would first check if you can connect to the localhost:8000 backend server (though browser). If you cannot - check logs in the Docker for the container, in my case, I had to upgrade langchain library. For more details, check this old ticket: #1393

but in yours, the issues might be different. However, you should always check logs for the platform container in the case of this error: "Error connecting to server"

@Dreadarm
Copy link

Dreadarm commented Jun 18, 2024

Fresh install using the provided git files and docker compose. On the backend I get this error: ModuleNotFoundError: No module named 'langchain.globals' which results in Error attempting to connect to the server.

@ssrheart425
Copy link

Fresh install using the provided git files 和 docker compose. On the backend I get this error: ModuleNotFoundError: No module named 'langchain.globals' which results in Error attempting to connect to the server.使用提供的 git 文件和 docker compose 进行全新安装。在后端,我收到此错误: ModuleNotFoundError: No module named 'langchain.globals' 导致 Error attempting to connect to the server.

me too

@christoukmaji
Copy link

lanarky = "^0.7.15"

Changing this line from lanarky = "^0.7.15" to lanarky = "0.7.15" worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants