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

I am facing the issues in adding datasource. #171

Closed
kspremkumar7 opened this issue Feb 28, 2024 · 4 comments
Closed

I am facing the issues in adding datasource. #171

kspremkumar7 opened this issue Feb 28, 2024 · 4 comments

Comments

@kspremkumar7
Copy link

          @ajhai Hello Ajay. I am facing the issues in adding datasource.Your models in app(s): 'organizations', 'socialaccount' have changes that are not yet reflected in a migration, and so won't be applied.

Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Installed 39 object(s) from 1 fixture(s)
Cache cleared successfully.
[llmstack-runner] Starting LLMStack Runner
Starting LLMStack rqworker
Exception in thread Thread-1 (start_runner):
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 416, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 976, in send
Waiting for LLMStack server to be up...
self.connect()
File "/opt/homebrew/lib/python3.10/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connectionpool.py", line 416, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/opt/homebrew/lib/python3.10/site-packages/urllib3/connection.py", line 244, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 976, in send
self.connect()
File "/opt/homebrew/lib/python3.10/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
File "/opt/homebrew/lib/python3.10/site-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
File "/opt/homebrew/lib/python3.10/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/docker/api/client.py", line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File "/opt/homebrew/lib/python3.10/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/llmstack/cli.py", line 153, in start_runner
client = docker.from_env()
File "/opt/homebrew/lib/python3.10/site-packages/docker/client.py", line 96, in from_env
return cls(
File "/opt/homebrew/lib/python3.10/site-packages/docker/client.py", line 45, in init
self.api = APIClient(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/docker/api/client.py", line 197, in init
self._version = self._retrieve_server_version()
File "/opt/homebrew/lib/python3.10/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
Starting LLMStack
usage: llmstack [-h] [--host HOST] [--port PORT] {runserver,manage.py} ...
llmstack: error: unrecognized arguments: rqworker default --verbosity=0 --with-scheduler
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
/opt/homebrew/lib/python3.10/site-packages/requests/utils.py:366: ResourceWarning: unclosed <socket.socket fd=18, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
return list(value)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
/opt/homebrew/lib/python3.10/site-packages/llmstack/apps/apps.py:47: RuntimeWarning: coroutine 'SyncToAsync.call' was never awaited
sync_to_async(add_missing_app_types)()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/opt/homebrew/lib/python3.10/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
Starting LLMStack
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
/opt/homebrew/lib/python3.10/site-packages/llmstack/apps/apps.py:47: RuntimeWarning: coroutine 'SyncToAsync.call' was never awaited
sync_to_async(add_missing_app_types)()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/opt/homebrew/lib/python3.10/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
Performing system checks...

System check identified no issues (0 silenced).
February 28, 2024 - 06:08:28
Django version 5.0, using settings 'llmstack.server.settings'
Starting ASGI/Daphne version 4.1.0 development server at http://127.0.0.1:3000/
Quit the server with CONTROL-C.
ERROR 2024-02-28 06:08:56,097 log Internal Server Error: /api/datasources/e4d176c1-d4fb-4977-b6a6-2e139b10af93/add_entry_async
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 707, in connect
sock = self.retry.call_with_retry(
File "/opt/homebrew/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 708, in
lambda: self._connect(), lambda error: self.disconnect(error)
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 1006, in _connect
raise err
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 994, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/asgiref/sync.py", line 534, in thread_handler
raise exc_info[1]
File "/opt/homebrew/lib/python3.10/site-packages/django/core/handlers/exception.py", line 42, in inner
response = await get_response(request)
File "/opt/homebrew/lib/python3.10/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
response = await wrapped_callback(
File "/opt/homebrew/lib/python3.10/site-packages/asgiref/sync.py", line 479, in call
ret: _R = await loop.run_in_executor(
File "/opt/homebrew/lib/python3.10/site-packages/asgiref/current_thread_executor.py", line 40, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/asgiref/sync.py", line 538, in thread_handler
return func(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper
return view_func(request, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/llmstack/datasources/apis.py", line 416, in add_entry_async
adhoc_job.save(
File "/opt/homebrew/lib/python3.10/site-packages/llmstack/jobs/models.py", line 770, in save
job = self.rqueue.enqueue(
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 977, in enqueue
return self.enqueue_call(
File "/opt/homebrew/lib/python3.10/site-packages/django_rq/queues.py", line 68, in enqueue_call
return self.original_enqueue_call(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/django_rq/queues.py", line 64, in original_enqueue_call
return super(DjangoRQ, self).enqueue_call(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 725, in enqueue_call
return self.enqueue_job(job, pipeline=pipeline, at_front=at_front)
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 1100, in enqueue_job
return self._enqueue_job(job, pipeline=pipeline, at_front=at_front)
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 1120, in _enqueue_job
job.redis_server_version = self.get_redis_server_version()
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 219, in get_redis_server_version
self.redis_server_version = get_version(self.connection)
File "/opt/homebrew/lib/python3.10/site-packages/rq/utils.py", line 293, in get_version
tuple(int(i) for i in str(connection.info("server")["redis_version"]).split('.')[:3]),
File "/opt/homebrew/lib/python3.10/site-packages/redis/commands/core.py", line 993, in info
return self.execute_command("INFO", section, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/redis/client.py", line 1266, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 1461, in get_connection
connection.connect()
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 713, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 61 connecting to localhost:50379. Connection refused.
ERROR 2024-02-28 06:08:56,097 log Internal Server Error: /api/datasources/e4d176c1-d4fb-4977-b6a6-2e139b10af93/add_entry_async
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 707, in connect
sock = self.retry.call_with_retry(
File "/opt/homebrew/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 708, in
lambda: self._connect(), lambda error: self.disconnect(error)
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 1006, in _connect
raise err
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 994, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/asgiref/sync.py", line 534, in thread_handler
raise exc_info[1]
File "/opt/homebrew/lib/python3.10/site-packages/django/core/handlers/exception.py", line 42, in inner
response = await get_response(request)
File "/opt/homebrew/lib/python3.10/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
response = await wrapped_callback(
File "/opt/homebrew/lib/python3.10/site-packages/asgiref/sync.py", line 479, in call
ret: _R = await loop.run_in_executor(
File "/opt/homebrew/lib/python3.10/site-packages/asgiref/current_thread_executor.py", line 40, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/asgiref/sync.py", line 538, in thread_handler
return func(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper
return view_func(request, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/homebrew/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/llmstack/datasources/apis.py", line 416, in add_entry_async
adhoc_job.save(
File "/opt/homebrew/lib/python3.10/site-packages/llmstack/jobs/models.py", line 770, in save
job = self.rqueue.enqueue(
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 977, in enqueue
return self.enqueue_call(
File "/opt/homebrew/lib/python3.10/site-packages/django_rq/queues.py", line 68, in enqueue_call
return self.original_enqueue_call(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/django_rq/queues.py", line 64, in original_enqueue_call
return super(DjangoRQ, self).enqueue_call(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 725, in enqueue_call
return self.enqueue_job(job, pipeline=pipeline, at_front=at_front)
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 1100, in enqueue_job
return self._enqueue_job(job, pipeline=pipeline, at_front=at_front)
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 1120, in _enqueue_job
job.redis_server_version = self.get_redis_server_version()
File "/opt/homebrew/lib/python3.10/site-packages/rq/queue.py", line 219, in get_redis_server_version
self.redis_server_version = get_version(self.connection)
File "/opt/homebrew/lib/python3.10/site-packages/rq/utils.py", line 293, in get_version
tuple(int(i) for i in str(connection.info("server")["redis_version"]).split('.')[:3]),
File "/opt/homebrew/lib/python3.10/site-packages/redis/commands/core.py", line 993, in info
return self.execute_command("INFO", section, *args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/redis/client.py", line 1266, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 1461, in get_connection
connection.connect()
File "/opt/homebrew/lib/python3.10/site-packages/redis/connection.py", line 713, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 61 connecting to localhost:50379. Connection refused.
ERROR 2024-02-28 06:08:56,103 runserver HTTP POST /api/datasources/e4d176c1-d4fb-4977-b6a6-2e139b10af93/add_entry_async 500 [0.11, 127.0.0.1:55053]
ERROR 2024-02-28 06:08:56,103 runserver HTTP POST /api/datasources/e4d176c1-d4fb-4977-b6a6-2e139b10af93/add_entry_async 500 [0.11, 127.0.0.1:55053]

Originally posted by @kspremkumar7 in #75 (comment)

@kspremkumar7 kspremkumar7 changed the title @ajhai Hello Ajay. I am facing the issues in adding datasource.Your models in app(s): 'organizations', 'socialaccount' have changes that are not yet reflected in a migration, and so won't be applied. I am facing the issues in adding datasource.Your models in app(s): 'organizations', 'socialaccount' have changes that are not yet reflected in a migration, and so won't be applied. Feb 28, 2024
@kspremkumar7
Copy link
Author

@ajhai : Please fix the above issue

@kspremkumar7 kspremkumar7 changed the title I am facing the issues in adding datasource.Your models in app(s): 'organizations', 'socialaccount' have changes that are not yet reflected in a migration, and so won't be applied. I am facing the issues in adding datasource. Feb 28, 2024
@kspremkumar7
Copy link
Author

raise ConnectionError(self._error_message(e))

redis.exceptions.ConnectionError: Error 61 connecting to localhost:50379. Connection refused.
ERROR 2024-02-28 07:41:16,075 runserver HTTP POST /api/datasources/e7f70ce9-ea9c-485c-b020-d5319026df90/add_entry_async 500 [0.10, 127.0.0.1:57296]
ERROR 2024-02-28 07:41:16,075 runserver HTTP POST /api/datasources/e7f70ce9-ea9c-485c-b020-d5319026df90/add_entry_async 500 [0.10, 127.0.0.1:57296]

@Dev1289
Copy link

Dev1289 commented Feb 28, 2024

@ajhai please fix this issue.. @kspremkumar7 iam also facing the same issue.....

redis.exceptions.ConnectionError: Error 111 connecting to localhost:50379. Connection refused.
ERROR 2024-02-28 07:45:19,534 runserver HTTP POST /api/datasources/cbafaa9a-72f0-4ec3-bba7-403881f69506/add_entry_async 500 [0.05, 127.0.0.1:48384]

@ajhai
Copy link
Contributor

ajhai commented May 21, 2024

This should now be fixed with the latest release. Please reopen if you still see this issue.

@ajhai ajhai closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants