Huy1711 / AI-beat-maker

AI-powered beat making system
10 stars 1 forks source link

Not working after submitting Session ID and API key #1

Open Stacks222 opened 1 month ago

Stacks222 commented 1 month ago

I've followed all the steps, even watched your video for directions, I will soon test this on Ubuntu as you did... The error is happening when I enter the localhost page, and enter my Session ID and API after submitting:

ConnectionError: HTTPConnectionPool(host='backend-api', port=8080): Max retries exceeded with url: /suno-connect (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fef14124cd0>: Failed to resolve 'backend-api' ([Errno -2] Name or service not known)"))
Traceback:
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 75, in exec_func_with_error_handling
    result = func()
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 543, in code_to_exec
    self._session_state.on_script_will_rerun(
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/state/safe_session_state.py", line 66, in on_script_will_rerun
    self._state.on_script_will_rerun(latest_widget_states)
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 515, in on_script_will_rerun
    self._call_callbacks()
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 528, in _call_callbacks
    self._new_widget_state.call_callback(wid)
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 272, in call_callback
    callback(*args, **kwargs)
File "/app/utils/music_gen.py", line 11, in init_suno_connection
    response = requests.post(
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
Huy1711 commented 1 month ago

Look like your error is the front-end can not connect to the back-end with the provided Backend URL: http://backend-api:8080. I can not debug with your provided error, please provide me more information about what have you change, what step did you take, and the system state. You can try these to find the error cause:

First, You can type "docker-compose ps" to check the backend-api service is running or not.

Second, I set the env variable "BACKEND_URL" to be the name of the backend service name (image below) and this should be resolved by docker-compose. You can enter the running front-end container by "docker exec" and check the env varible "BACKEND_URL" value to check if this env variable is resolved by docker.

image

Stacks222 commented 1 month ago

Ok, please standby and I will rundown the steps again and send a video

Stacks222 commented 1 month ago

Look like your error is the front-end can not connect to the back-end with the provided Backend URL: http://backend-api:8080. I can not debug with your provided error, please provide me more information about what have you change, what step did you take, and the system state. You can try these to find the error cause:

First, You can type "docker-compose ps" to check the backend-api service is running or not.

Second, I set the env variable "BACKEND_URL" to be the name of the backend service name (image below) and this should be resolved by docker-compose. You can enter the running front-end container by "docker exec" and check the env varible "BACKEND_URL" value to check if this env variable is resolved by docker.

image

So before I send the video of the process, I did a rundown of the whole process again and did not encounter any issues until running "bash ./scripts/prepare_milvus.sh" when I run that command the error I get is this:

C:\AIBEATMAKER\AI-beat-maker>bash scripts/prepare_milvus.sh
<3>WSL (1408) ERROR: CreateProcessEntryCommon:505: execvpe /bin/bash failed 2
<3>WSL (1408) ERROR: CreateProcessEntryCommon:508: Create process not expected to return

So what I did to fix that instead is I just run the commands in cmd manually, they are all to what looks like successful:

python scripts/milvusdb_manage/create_database.py
python scripts/milvusdb_manage/create_collection.py
python scripts/milvusdb_manage/add_embedding_offline.py
python scripts/milvusdb_manage/create_index.py

(windows doesn't use ./ in commands) after running the commands manually this is the output:

C:\AIBEATMAKER\AI-beat-maker>python scripts/milvusdb_manage/create_database.py
Available databases: ['default', 'beat_maker']

C:\AIBEATMAKER\AI-beat-maker>python scripts/milvusdb_manage/create_collection.py
Available collections: ['beat_maker']

C:\AIBEATMAKER\AI-beat-maker>python scripts/milvusdb_manage/add_embedding_offline.py
Adding audio embeddings to DB: 0it [00:00, ?it/s]

Totally added 0 segments to the collection beat_maker of database beat_maker
C:\AIBEATMAKER\AI-beat-maker>python scripts/milvusdb_manage/create_index.py
Available indices: ['vector_index']

I don't know about the third commands output as it says: "Adding audio embeddings to DB: 0it [00:00, ?it/s]"

Otherwise all successful to me... and still have the backend error by the end of the process... Let me know what you think

UPDATE:

When I run docker compose ps command this is the output:

C:\AIBEATMAKER\AI-beat-maker>docker-compose ps
NAME                 IMAGE                                      COMMAND                  SERVICE              CREATED             STATUS                       PORTS
frontend-streamlit   ai-beat-maker-frontend-streamlit           "streamlit run Music…"   frontend-streamlit   About an hour ago   Up About an hour             0.0.0.0:8081->8081/tcp
milvus-etcd          quay.io/coreos/etcd:v3.5.5                 "etcd -advertise-cli…"   milvus-etcd          About an hour ago   Up About an hour (healthy)   2379-2380/tcp
milvus-minio         minio/minio:RELEASE.2023-03-20T20-16-18Z   "/usr/bin/docker-ent…"   milvus-minio         About an hour ago   Up About an hour (healthy)   0.0.0.0:9000-9001->9000-9001/tcp
milvus-standalone    milvusdb/milvus:v2.3.16                    "/tini -- milvus run…"   milvus-standalone    About an hour ago   Up About an hour (healthy)   0.0.0.0:9091->9091/tcp, 0.0.0.0:19530->19530/tcp
Huy1711 commented 1 month ago

According to your provided docker compose ps result, the above error occur because the backend-api service and music-embedding service have exitted for some reason as they are not appear (all services are defined in docker-compose.yaml file). You can try "docker compose logs backend-api" and "docker compose logs music-embedding" then provide me any error occur before those containers exit.

The milvus script run might have some error when adding the embedding to the database because it printed out "Added 0 embedding". It is expected to add some number of embedding. But you can fix the above error first then I will help you fix this later.

Stacks222 commented 1 month ago

According to your provided docker compose ps result, the above error occur because the backend-api service and music-embedding service have exitted for some reason as they are not appear (all services are defined in docker-compose.yaml file). You can try "docker compose logs backend-api" and "docker compose logs music-embedding" then provide me any error occur before those containers exit.

The milvus script run might have some error when adding the embedding to the database because it printed out "Added 0 embedding". It is expected to add some number of embedding. But you can fix the above error first then I will help you fix this later.

Would like to say thank you for the reply.

I'm having another issue now, I tried installing it on vmware(virtual machine) ubuntu 22.04 and went through all the steps successfully after running the docker compose "docker-compose up -d" command it returns with and error. I followed all the steps in your demo video, here is the output:

(beat-maker) ubuntumusic@ubuntumusic-virtual-machine:~/aibeatmaker/AI-beat-maker$ docker-compose up -d ERROR: Invalid interpolation format for "milvus-etcd" option in service "services": "${DOCKER_VOLUME_DIRECTORY:-.}/etcd:/etcd"

idk how this is possible when I followed all steps properly... Please help me get this working

Huy1711 commented 1 month ago

Have you renamed the ".env.example" file into ".env" file ? The DOCKER_VOLUME_DIRECTORY env variable is defined in ".env" file, docker is expected to read the variable from that file.

I have just googled your issue and found this related issue. It seems like your docker-compose version is depricated, you need at least docker-compose v1.9.0 or higher to understand that config. Try to check this with "docker-compose version".

I can not check my docker-compose version now, but I will provide you my version as soon as I can.

Stacks222 commented 1 month ago

Have you renamed the ".env.example" file into ".env" file ? The DOCKER_VOLUME_DIRECTORY env variable is defined in ".env" file, docker is expected to read the variable from that file.

I have just googled your issue and found this related issue. It seems like your docker-compose version is depricated, you need at least docker-compose v1.9.0 or higher to understand that config. Try to check this with "docker-compose version".

I can not check my docker-compose version now, but I will provide you my version as soon as I can.

I'm not sure what version of docker-compose it was running before, although I removed/uninstalled it, then installed version 1.22 $ docker-compose version docker-compose version 1.22.0, build f46880fe docker-py version: 3.4.1 CPython version: 3.6.6 OpenSSL version: OpenSSL 1.1.0f 25 May 2017

Huy1711 commented 1 month ago

Can you try with newest docker-compose v2.29.1. You can find the guide here: https://docs.docker.com/compose/install/standalone/

Stacks222 commented 1 month ago

Have you renamed the ".env.example" file into ".env" file ? The DOCKER_VOLUME_DIRECTORY env variable is defined in ".env" file, docker is expected to read the variable from that file.

I have just googled your issue and found this related issue. It seems like your docker-compose version is depricated, you need at least docker-compose v1.9.0 or higher to understand that config. Try to check this with "docker-compose version".

I can not check my docker-compose version now, but I will provide you my version as soon as I can.

Funny you mention that, in case this matters: at the start of the process when using "git clone https://github.com/Huy1711/AI-beat-maker.git" to clone the repo, it clones successfully but in the folder it doesn't download env.example, gitignore, so I downloaded it from source and added it to the repo...

Yes, I renamed the file .env btw

Huy1711 commented 1 month ago

Funny you mention that, in case this matters: at the start of the process when using "git clone https://github.com/Huy1711/AI-beat-maker.git" to clone the repo, it clones successfully but in the folder it doesn't download env.example, gitignore, so I downloaded it from source and added it to the repo...

Your file system might hide all the files beginning with "." from you. You can type "ls -a" to show all the files available in the folder for Linux, for Windows you can change the setting to show all hidden files.

Stacks222 commented 1 month ago

Funny you mention that, in case this matters: at the start of the process when using "git clone https://github.com/Huy1711/AI-beat-maker.git" to clone the repo, it clones successfully but in the folder it doesn't download env.example, gitignore, so I downloaded it from source and added it to the repo...

Your file system might hide all the files beginning with "." from you. You can type "ls -a" to show all the files available in the folder for Linux, for Windows you can change the setting to show all hidden files.

Yes, I'm currently using linux on vmware, do you want to screen share and possibly check the issue for me, would be appreciated, the .env file is hidden, that is correct, I will add you on discord if you have the time, I would appreciate it.

Stacks222 commented 1 month ago

Can you try with newest docker-compose v2.29.1. You can find the guide here: https://docs.docker.com/compose/install/standalone/

Ok, so as you commented that I removed docker-compose and installed it with the link you provided, it seems you were correct all along, and it was no docker compose version that worked except 2.29, I installed 2.28 and it didn't work as well, just to let you know.

It went through the whole process took about 5 mins, and then I entered localhost, insterted the api key and cookie, clicked submit and the same error happened again, which happened on windows, now on linux (I'm not joking...) here is the code:

ConnectionError: HTTPConnectionPool(host='backend-api', port=8080): Max retries exceeded with url: /suno-connect (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fc31437fac0>: Failed to resolve 'backend-api' ([Errno -2] Name or service not known)"))
Traceback:

File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 75, in exec_func_with_error_handling
    result = func()
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 543, in code_to_exec
    self._session_state.on_script_will_rerun(
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/state/safe_session_state.py", line 66, in on_script_will_rerun
    self._state.on_script_will_rerun(latest_widget_states)
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 515, in on_script_will_rerun
    self._call_callbacks()
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 528, in _call_callbacks
    self._new_widget_state.call_callback(wid)
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 272, in call_callback
    callback(*args, **kwargs)
File "/app/utils/music_gen.py", line 11, in init_suno_connection
    response = requests.post(
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)`

and here is when I ran the command:

$ docker compose up -d
[+] Running 49/18
 ✔ milvus-standalone Pulled                                               27.2s 
 ✔ music-embedding Pulled                                                239.4s 
 ✔ milvus-etcd Pulled                                                     13.3s 
 ✔ milvus-minio Pulled                                                    11.6s 

[+] Building 198.3s (22/22) FINISHED                       docker:desktop-linux
 => [frontend-streamlit internal] load build definition from Dockerfile    0.0s
 => => transferring dockerfile: 299B                                       0.0s
 => [backend-api internal] load build definition from Dockerfile           0.1s
 => => transferring dockerfile: 243B                                       0.0s
 => [backend-api internal] load metadata for docker.io/library/python:3.1  0.9s
 => [frontend-streamlit internal] load metadata for docker.io/library/pyt  0.9s
 => [backend-api internal] load .dockerignore                              0.0s
 => => transferring context: 2B                                            0.0s
 => [frontend-streamlit internal] load .dockerignore                       0.0s
 => => transferring context: 2B                                            0.0s
 => [backend-api 1/5] FROM docker.io/library/python:3.10@sha256:d719cce3  24.8s
 => => resolve docker.io/library/python:3.10@sha256:d719cce3399b609511e3a  0.0s
 => => sha256:d719cce3399b609511e3a8f0e7171bb45a63cce24c1 9.08kB / 9.08kB  0.0s
 => => sha256:ca4e5d6727252f0dbc207fbf283cb95e278bf562b 49.55MB / 49.55MB  1.3s
 => => sha256:30b93c12a9c9326732b35d9e3ebe57148abe33f8f 24.05MB / 24.05MB  0.9s
 => => sha256:10d643a5fa823cd013a108b2076f4d2edf1b2a921 64.14MB / 64.14MB  1.5s
 => => sha256:2d13c0cccc492c675367c4bb457f0312a2f6ab97408 2.52kB / 2.52kB  0.0s
 => => sha256:c22838843e2824309f967771fc9bad9aba4d88c53df 7.33kB / 7.33kB  0.0s
 => => sha256:d6dc1019d7935fe82827434da11bf96cf14e249 211.24MB / 211.24MB  4.6s
 => => sha256:a18fe1aad1c434b38782ebbb580c9dd2704f3c39ed1 6.16MB / 6.16MB  1.6s
 => => extracting sha256:ca4e5d6727252f0dbc207fbf283cb95e278bf562bda42d35  4.1s
 => => sha256:adaab5b51f18dc5917e4c782d7005bca174025ba6 17.15MB / 17.15MB  1.9s
 => => sha256:44c8a6205377293f6845dd6ad138170598dd4e7524fdfdb 233B / 233B  1.7s
 => => sha256:b97f54ca7fc5ce1c77d735599f32adf3ce41168085b 3.08MB / 3.08MB  1.9s
 => => extracting sha256:30b93c12a9c9326732b35d9e3ebe57148abe33f8fa6e25ab  0.7s
 => => extracting sha256:10d643a5fa823cd013a108b2076f4d2edf1b2a921f863b53  3.6s
 => => extracting sha256:d6dc1019d7935fe82827434da11bf96cf14e24979f8155e  11.2s
 => => extracting sha256:a18fe1aad1c434b38782ebbb580c9dd2704f3c39ed129af2  0.5s
 => => extracting sha256:adaab5b51f18dc5917e4c782d7005bca174025ba6be1d2b2  1.2s
 => => extracting sha256:44c8a6205377293f6845dd6ad138170598dd4e7524fdfdb4  0.0s
 => => extracting sha256:b97f54ca7fc5ce1c77d735599f32adf3ce41168085be2e78  0.5s
 => [backend-api internal] load build context                              0.4s
 => => transferring context: 19.13kB                                       0.0s
 => [frontend-streamlit 1/5] FROM docker.io/library/python:3.10-slim@sha2  7.3s
 => => resolve docker.io/library/python:3.10-slim@sha256:c424998d94be21c1  0.0s
 => => sha256:c424998d94be21c1718331a98572b2e06f3ac1ae34c 9.13kB / 9.13kB  0.0s
 => => sha256:e419a63be2798edf2e20eda1f7ac6c18cc724af190f 1.94kB / 1.94kB  0.0s
 => => sha256:225b40a1cbfcee29993c95fe1108a3e22502a087f5c 6.92kB / 6.92kB  0.0s
 => => sha256:efc2b5ad9eec05befa54239d53feeae3569ccbef6 29.13MB / 29.13MB  2.6s
 => => sha256:5b36cea6ecc35d799928c610642b4f8676157b96c74 3.51MB / 3.51MB  2.2s
 => => sha256:20dccfbf27d1d353ae4da079a3b7e38760909d746 12.38MB / 12.38MB  2.6s
 => => sha256:420671bdeb40eddc3826734b5cd70f25dff07e5a318 3.16MB / 3.16MB  2.8s
 => => extracting sha256:efc2b5ad9eec05befa54239d53feeae3569ccbef689aa5e5  2.7s
 => => sha256:5378e3337df7ab12181922c4f4f7353ed5048112d5cfcc2 233B / 233B  2.7s
 => => extracting sha256:5b36cea6ecc35d799928c610642b4f8676157b96c7437375  0.2s
 => => extracting sha256:20dccfbf27d1d353ae4da079a3b7e38760909d7469af592c  0.7s
 => => extracting sha256:5378e3337df7ab12181922c4f4f7353ed5048112d5cfcc26  0.0s
 => => extracting sha256:420671bdeb40eddc3826734b5cd70f25dff07e5a318102ac  0.4s
 => [frontend-streamlit internal] load build context                       0.4s
 => => transferring context: 8.69kB                                        0.0s
 => [frontend-streamlit 2/5] WORKDIR /app                                  0.8s
 => [frontend-streamlit 3/5] COPY requirements.txt ./                      0.2s
 => [frontend-streamlit 4/5] RUN pip install -r requirements.txt --no-ca  28.2s
 => [backend-api 2/5] WORKDIR /app                                         0.9s
 => [backend-api 3/5] COPY ./requirements.txt ./                           0.1s
 => [backend-api 4/5] RUN pip install -r requirements.txt --no-cache-di  125.2s
 => [frontend-streamlit 5/5] COPY . .                                      0.2s
 => [frontend-streamlit] exporting to image                                2.9s
 => => exporting layers                                                    2.9s
 => => writing image sha256:7fe889d220ba00422b8202688df68d9467c674770f9f1  0.0s
 => => naming to docker.io/library/ai-beat-maker-frontend-streamlit        0.0s
 => [frontend-streamlit] resolving provenance for metadata file            0.0s
 => [backend-api 5/5] COPY . .                                             0.1s
 => [backend-api] exporting to image                                      46.1s
 => => exporting layers                                                   46.1s
 => => writing image sha256:0570ed8517c820b45568b9907072523e90e2d6bbf9e20  0.0s
 => => naming to docker.io/library/ai-beat-maker-backend-api               0.0s
 => [backend-api] resolving provenance for metadata file                   0.0s
[+] Running 7/7
 ✔ Network beat-maker                 Created                              0.0s 
 ✔ Container milvus-minio             Started                              0.9s 
 ✔ Container milvus-etcd              Started                              0.9s 
 ✔ Container frontend-streamlit       St...                                0.9s 
 ✔ Container backend-music-embedding  Started                              0.9s 
 ✔ Container milvus-standalone        Sta...                               1.3s 
 ✔ Container backend-api              Started                              2.2s 

any ideas in docker desktop it shows the container and says ai-beat-maker status: Running (5/6)

Huy1711 commented 1 month ago

Can you please check the logs from backend-api service by "docker-compose logs backend-api" and provide me the logs.

My discord account: Huyy#4946 or huyy4946. You can try either of them.

Stacks222 commented 1 month ago

Can you please check the logs from backend-api service by "docker-compose logs backend-api" and provide me the logs.

My discord account: Huyy#4946 or huyy4946. You can try either of them.

I've sent you a discord friend request. my username is A.K/a.k1303

here are the logs you have requested:


(beat-maker) ubuntumusic@ubuntumusic-virtual-machine:~/aibeatmaker/AI-beat-maker$ docker compose logs backend-api
backend-api  | /usr/local/lib/python3.10/site-packages/tritonclient/grpc/service_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.60.0, but the generated code in grpc_service_pb2_grpc.py depends on grpcio>=1.64.1. Please upgrade your grpc module to grpcio>=1.64.1 or downgrade your generated code using grpcio-tools<=1.60.0. This warning will become an error in 1.65.0, scheduled for release on June 25, 2024.
backend-api  |   warnings.warn(
backend-api  | ERROR:pymilvus.decorators:RPC error: [__internal_register], <MilvusException: (code=800, message=database not found[database=beat_maker])>, <Time:{'RPC start': '2024-08-05 11:23:40.870087', 'RPC error': '2024-08-05 11:23:40.872476'}>
backend-api  | ERROR:pymilvus.milvus_client.milvus_client:Failed to create new connection using: 030db51fa02c49d1babee35a35675961
backend-api  | Traceback (most recent call last):
backend-api  |   File "/usr/local/bin/uvicorn", line 8, in <module>
backend-api  |     sys.exit(main())
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
backend-api  |     return self.main(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
backend-api  |     rv = self.invoke(ctx)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
backend-api  |     return ctx.invoke(self.callback, **ctx.params)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
backend-api  |     return __callback(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 410, in main
backend-api  |     run(
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 577, in run
backend-api  |     server.run()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
backend-api  |     return asyncio.run(self.serve(sockets=sockets))
backend-api  |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
backend-api  |     return loop.run_until_complete(main)
backend-api  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
backend-api  |     return future.result()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
backend-api  |     await self._serve(sockets)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in _serve
backend-api  |     config.load()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 434, in load
backend-api  |     self.loaded_app = import_from_string(self.app)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
backend-api  |     module = importlib.import_module(module_str)
backend-api  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
backend-api  |     return _bootstrap._gcd_import(name[level:], package, level)
backend-api  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
backend-api  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
backend-api  |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
backend-api  |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
backend-api  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
backend-api  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
backend-api  |   File "/app/main.py", line 29, in <module>
backend-api  |     app.music_database_client = MusicDatabaseClient(settings.music_database_url)
backend-api  |   File "/app/utils/search/music_database_client.py", line 28, in __init__
backend-api  |     self.milvus_client = MilvusClient(uri=url, db_name=self.db_name)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 53, in __init__
backend-api  |     self._using = self._create_connection(
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 639, in _create_connection
backend-api  |     raise ex from ex
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 636, in _create_connection
backend-api  |     connections.connect(using, user, password, db_name, token, uri=uri, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 420, in connect
backend-api  |     connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 371, in connect_milvus
backend-api  |     gh._wait_for_channel_ready(timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 151, in _wait_for_channel_ready
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 144, in _wait_for_channel_ready
backend-api  |     self._setup_identifier_interceptor(self._user, timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 262, in _setup_identifier_interceptor
backend-api  |     self._identifier = self.__internal_register(user, host, timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 140, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 136, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 175, in handler
backend-api  |     return func(self, *args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 115, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 86, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 215, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 205, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 1841, in __internal_register
backend-api  |     check_status(response.status)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/utils.py", line 54, in check_status
backend-api  |     raise MilvusException(status.code, status.reason, status.error_code)
backend-api  | pymilvus.exceptions.MilvusException: <MilvusException: (code=800, message=database not found[database=beat_maker])>
backend-api  | /usr/local/lib/python3.10/site-packages/tritonclient/grpc/service_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.60.0, but the generated code in grpc_service_pb2_grpc.py depends on grpcio>=1.64.1. Please upgrade your grpc module to grpcio>=1.64.1 or downgrade your generated code using grpcio-tools<=1.60.0. This warning will become an error in 1.65.0, scheduled for release on June 25, 2024.
backend-api  |   warnings.warn(
backend-api  | ERROR:pymilvus.decorators:RPC error: [__internal_register], <MilvusException: (code=800, message=database not found[database=beat_maker])>, <Time:{'RPC start': '2024-08-05 11:37:56.231633', 'RPC error': '2024-08-05 11:37:56.233327'}>
backend-api  | ERROR:pymilvus.milvus_client.milvus_client:Failed to create new connection using: b7080f0f64b8406a802109e064873eda
backend-api  | Traceback (most recent call last):
backend-api  |   File "/usr/local/bin/uvicorn", line 8, in <module>
backend-api  |     sys.exit(main())
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
backend-api  |     return self.main(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
backend-api  |     rv = self.invoke(ctx)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
backend-api  |     return ctx.invoke(self.callback, **ctx.params)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
backend-api  |     return __callback(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 410, in main
backend-api  |     run(
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 577, in run
backend-api  |     server.run()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
backend-api  |     return asyncio.run(self.serve(sockets=sockets))
backend-api  |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
backend-api  |     return loop.run_until_complete(main)
backend-api  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
backend-api  |     return future.result()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
backend-api  |     await self._serve(sockets)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in _serve
backend-api  |     config.load()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 434, in load
backend-api  |     self.loaded_app = import_from_string(self.app)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
backend-api  |     module = importlib.import_module(module_str)
backend-api  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
backend-api  |     return _bootstrap._gcd_import(name[level:], package, level)
backend-api  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
backend-api  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
backend-api  |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
backend-api  |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
backend-api  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
backend-api  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
backend-api  |   File "/app/main.py", line 29, in <module>
backend-api  |     app.music_database_client = MusicDatabaseClient(settings.music_database_url)
backend-api  |   File "/app/utils/search/music_database_client.py", line 28, in __init__
backend-api  |     self.milvus_client = MilvusClient(uri=url, db_name=self.db_name)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 53, in __init__
backend-api  |     self._using = self._create_connection(
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 639, in _create_connection
backend-api  |     raise ex from ex
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 636, in _create_connection
backend-api  |     connections.connect(using, user, password, db_name, token, uri=uri, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 420, in connect
backend-api  |     connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 371, in connect_milvus
backend-api  |     gh._wait_for_channel_ready(timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 151, in _wait_for_channel_ready
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 144, in _wait_for_channel_ready
backend-api  |     self._setup_identifier_interceptor(self._user, timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 262, in _setup_identifier_interceptor
backend-api  |     self._identifier = self.__internal_register(user, host, timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 140, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 136, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 175, in handler
backend-api  |     return func(self, *args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 115, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 86, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 215, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 205, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 1841, in __internal_register
backend-api  |     check_status(response.status)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/utils.py", line 54, in check_status
backend-api  |     raise MilvusException(status.code, status.reason, status.error_code)
backend-api  | pymilvus.exceptions.MilvusException: <MilvusException: (code=800, message=database not found[database=beat_maker])>
Stacks222 commented 1 month ago

Can you please check the logs from backend-api service by "docker-compose logs backend-api" and provide me the logs.

My discord account: Huyy#4946 or huyy4946. You can try either of them.

So I deleted the repo I started with and went through the process again to make sure everything is correct, seeing that I had to uninstall docker-compose and was encountering other errors during the process due to outdated plugins or having to install new ones, even though that process was from what I thought, successful...

I went through the process again following the exact steps in your demo video command by command, even making the folder name demo. Everything was 100% successful up until the last 2 steps which are the most notable, "sudo docker compose ps", and "bash ./scripts/prepare_milvus.sh". When running "sudo docker compose ps", it displays nothing for me, on your screen in the demo video I can see it shows the services running and all that information. When running "bash ./scripts/prepare_milvus.sh" it starts the process and adds the audio embeddings up until 91%, here is the code for each:

(beat-maker) ubuntumusic@ubuntumusic-virtual-machine:~/demo/AI-beat-maker$ docker compose up -d
[+] Running 6/6
 ✔ Container frontend-streamlit       Running                                                      0.0s 
 ✔ Container milvus-etcd              Running                                                      0.0s 
 ✔ Container backend-music-embedding  Running                                                      0.0s 
 ✔ Container milvus-minio             Running                                                      0.0s 
 ✔ Container milvus-standalone        Running                                                      0.0s 
 ✔ Container backend-api              Started                                                      0.2s 
(beat-maker) ubuntumusic@ubuntumusic-virtual-machine:~/demo/AI-beat-maker$ sudo docker compose ps
NAME      IMAGE     COMMAND   SERVICE   CREATED   STATUS    PORTS

then:

(beat-maker) ubuntumusic@ubuntumusic-virtual-machine:~/demo/AI-beat-maker$ bash ./scripts/prepare_milvus.sh
Available databases: ['default', 'beat_maker']
Available collections: ['beat_maker']
Adding audio embeddings to DB:  91%|███████████████████████████████   | 457/500 [03:16<00:15,  2.70it/s][describe_collection] retry:4, cost: 0.27s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:19530: Socket closed>
[describe_collection] retry:5, cost: 0.81s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:19530: Socket closed>
[describe_collection] retry:6, cost: 2.43s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:19530: Socket closed>
[describe_collection] retry:7, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:19530: Socket closed>
[describe_collection] retry:8, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:19530: Socket closed>
[describe_collection] retry:9, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:10, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:11, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:12, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:13, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:14, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:15, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:16, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:17, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:18, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:19, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:20, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:21, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:22, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:23, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:24, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:25, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:26, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:27, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:28, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:29, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:30, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:31, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv6:%5B::1%5D:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:32, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv6:%5B::1%5D:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:33, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv6:%5B::1%5D:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:34, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv6:%5B::1%5D:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:35, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv6:%5B::1%5D:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:36, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:37, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:38, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:39, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:40, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:41, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:42, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:43, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:44, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:45, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:46, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:47, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:48, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:49, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:50, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:51, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:52, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:53, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:54, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:55, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:56, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:57, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:58, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:59, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:60, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:61, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:62, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:63, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:64, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:65, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:66, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:67, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:68, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:69, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:70, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:71, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:72, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:73, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:74, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
[describe_collection] retry:75, cost: 3.00s, reason: <_MultiThreadedRendezvous: StatusCode.UNAVAILABLE, failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused>
RPC error: [describe_collection], <MilvusException: (code=<bound method _MultiThreadedRendezvous.code of <_MultiThreadedRendezvous of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused", grpc_status:14, created_time:"2024-08-05T16:59:57.564715619-04:00"}"
>>, message=Retry run out of 75 retry times, message=failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused)>, <Time:{'RPC start': '2024-08-05 16:56:26.650611', 'RPC error': '2024-08-05 16:59:57.565174'}>
RPC error: [insert_rows], <MilvusException: (code=<bound method _MultiThreadedRendezvous.code of <_MultiThreadedRendezvous of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused", grpc_status:14, created_time:"2024-08-05T16:59:57.564715619-04:00"}"
>>, message=Retry run out of 75 retry times, message=failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused)>, <Time:{'RPC start': '2024-08-05 16:56:26.650573', 'RPC error': '2024-08-05 16:59:57.565334'}>
Adding audio embeddings to DB:  91%|███████████████████████████████   | 457/500 [06:47<00:38,  1.12it/s]
Traceback (most recent call last):
  File "/home/ubuntumusic/demo/AI-beat-maker/./scripts/milvusdb_manage/add_embedding_offline.py", line 87, in <module>
    res = milvus_client.insert(
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 218, in insert
    raise ex from ex
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 214, in insert
    res = conn.insert_rows(
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/decorators.py", line 140, in handler
    raise e from e
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/decorators.py", line 136, in handler
    return func(*args, **kwargs)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/decorators.py", line 175, in handler
    return func(self, *args, **kwargs)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/decorators.py", line 115, in handler
    raise e from e
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/decorators.py", line 86, in handler
    return func(*args, **kwargs)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 509, in insert_rows
    request = self._prepare_row_insert_request(
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 489, in _prepare_row_insert_request
    fields_info, enable_dynamic = self._get_info(collection_name, timeout, **kwargs)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 471, in _get_info
    schema = self.describe_collection(collection_name, timeout=timeout)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/decorators.py", line 140, in handler
    raise e from e
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/decorators.py", line 136, in handler
    return func(*args, **kwargs)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/decorators.py", line 175, in handler
    return func(self, *args, **kwargs)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/decorators.py", line 92, in handler
    raise MilvusException(e.code, f"{to_msg}, message={e.details()}") from e
pymilvus.exceptions.MilvusException: <MilvusException: (code=<bound method _MultiThreadedRendezvous.code of <_MultiThreadedRendezvous of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused", grpc_status:14, created_time:"2024-08-05T16:59:57.564715619-04:00"}"
>>, message=Retry run out of 75 retry times, message=failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:19530: Failed to connect to remote host: Connection refused)>
Failed to create new connection using: fa97bb4defa344e58f0dab3ef9674987
Traceback (most recent call last):
  File "/home/ubuntumusic/demo/AI-beat-maker/./scripts/milvusdb_manage/create_index.py", line 8, in <module>
    client = MilvusClient(uri=MILVUS_URL, db_name=DATABASE_NAME)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 53, in __init__
    self._using = self._create_connection(
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 639, in _create_connection
    raise ex from ex
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 636, in _create_connection
    connections.connect(using, user, password, db_name, token, uri=uri, **kwargs)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 420, in connect
    connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 371, in connect_milvus
    gh._wait_for_channel_ready(timeout=timeout)
  File "/home/ubuntumusic/anaconda3/envs/beat-maker/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 146, in _wait_for_channel_ready
    raise MilvusException(
pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)>

for reference here is the log:

(beat-maker) ubuntumusic@ubuntumusic-virtual-machine:~/demo/AI-beat-maker$ docker compose logs backend-a
pi
backend-api  | /usr/local/lib/python3.10/site-packages/tritonclient/grpc/service_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.60.0, but the generated code in grpc_service_pb2_grpc.py depends on grpcio>=1.64.1. Please upgrade your grpc module to grpcio>=1.64.1 or downgrade your generated code using grpcio-tools<=1.60.0. This warning will become an error in 1.65.0, scheduled for release on June 25, 2024.
backend-api  |   warnings.warn(
backend-api  | ERROR:pymilvus.decorators:RPC error: [__internal_register], <MilvusException: (code=800, message=database not found[database=beat_maker])>, <Time:{'RPC start': '2024-08-05 20:51:05.537419', 'RPC error': '2024-08-05 20:51:05.542871'}>
backend-api  | ERROR:pymilvus.milvus_client.milvus_client:Failed to create new connection using: 737ec952d12e4c7e81abbc82232e7162
backend-api  | Traceback (most recent call last):
backend-api  |   File "/usr/local/bin/uvicorn", line 8, in <module>
backend-api  |     sys.exit(main())
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
backend-api  |     return self.main(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
backend-api  |     rv = self.invoke(ctx)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
backend-api  |     return ctx.invoke(self.callback, **ctx.params)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
backend-api  |     return __callback(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 410, in main
backend-api  |     run(
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 577, in run
backend-api  |     server.run()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
backend-api  |     return asyncio.run(self.serve(sockets=sockets))
backend-api  |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
backend-api  |     return loop.run_until_complete(main)
backend-api  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
backend-api  |     return future.result()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
backend-api  |     await self._serve(sockets)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in _serve
backend-api  |     config.load()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 434, in load
backend-api  |     self.loaded_app = import_from_string(self.app)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
backend-api  |     module = importlib.import_module(module_str)
backend-api  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
backend-api  |     return _bootstrap._gcd_import(name[level:], package, level)
backend-api  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
backend-api  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
backend-api  |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
backend-api  |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
backend-api  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
backend-api  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
backend-api  |   File "/app/main.py", line 29, in <module>
backend-api  |     app.music_database_client = MusicDatabaseClient(settings.music_database_url)
backend-api  |   File "/app/utils/search/music_database_client.py", line 28, in __init__
backend-api  |     self.milvus_client = MilvusClient(uri=url, db_name=self.db_name)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 53, in __init__
backend-api  |     self._using = self._create_connection(
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 639, in _create_connection
backend-api  |     raise ex from ex
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 636, in _create_connection
backend-api  |     connections.connect(using, user, password, db_name, token, uri=uri, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 420, in connect
backend-api  |     connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 371, in connect_milvus
backend-api  |     gh._wait_for_channel_ready(timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 151, in _wait_for_channel_ready
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 144, in _wait_for_channel_ready
backend-api  |     self._setup_identifier_interceptor(self._user, timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 262, in _setup_identifier_interceptor
backend-api  |     self._identifier = self.__internal_register(user, host, timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 140, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 136, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 175, in handler
backend-api  |     return func(self, *args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 115, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 86, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 215, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 205, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 1841, in __internal_register
backend-api  |     check_status(response.status)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/utils.py", line 54, in check_status
backend-api  |     raise MilvusException(status.code, status.reason, status.error_code)
backend-api  | pymilvus.exceptions.MilvusException: <MilvusException: (code=800, message=database not found[database=beat_maker])>
backend-api  | /usr/local/lib/python3.10/site-packages/tritonclient/grpc/service_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.60.0, but the generated code in grpc_service_pb2_grpc.py depends on grpcio>=1.64.1. Please upgrade your grpc module to grpcio>=1.64.1 or downgrade your generated code using grpcio-tools<=1.60.0. This warning will become an error in 1.65.0, scheduled for release on June 25, 2024.
backend-api  |   warnings.warn(
backend-api  | ERROR:pymilvus.decorators:RPC error: [__internal_register], <MilvusException: (code=800, message=database not found[database=beat_maker])>, <Time:{'RPC start': '2024-08-05 20:52:12.788340', 'RPC error': '2024-08-05 20:52:12.789780'}>
backend-api  | ERROR:pymilvus.milvus_client.milvus_client:Failed to create new connection using: 6c416e46d1924b38b25a48022a256e07
backend-api  | Traceback (most recent call last):
backend-api  |   File "/usr/local/bin/uvicorn", line 8, in <module>
backend-api  |     sys.exit(main())
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
backend-api  |     return self.main(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
backend-api  |     rv = self.invoke(ctx)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
backend-api  |     return ctx.invoke(self.callback, **ctx.params)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
backend-api  |     return __callback(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 410, in main
backend-api  |     run(
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 577, in run
backend-api  |     server.run()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
backend-api  |     return asyncio.run(self.serve(sockets=sockets))
backend-api  |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
backend-api  |     return loop.run_until_complete(main)
backend-api  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
backend-api  |     return future.result()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
backend-api  |     await self._serve(sockets)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in _serve
backend-api  |     config.load()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 434, in load
backend-api  |     self.loaded_app = import_from_string(self.app)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
backend-api  |     module = importlib.import_module(module_str)
backend-api  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
backend-api  |     return _bootstrap._gcd_import(name[level:], package, level)
backend-api  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
backend-api  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
backend-api  |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
backend-api  |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
backend-api  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
backend-api  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
backend-api  |   File "/app/main.py", line 29, in <module>
backend-api  |     app.music_database_client = MusicDatabaseClient(settings.music_database_url)
backend-api  |   File "/app/utils/search/music_database_client.py", line 28, in __init__
backend-api  |     self.milvus_client = MilvusClient(uri=url, db_name=self.db_name)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 53, in __init__
backend-api  |     self._using = self._create_connection(
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 639, in _create_connection
backend-api  |     raise ex from ex
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 636, in _create_connection
backend-api  |     connections.connect(using, user, password, db_name, token, uri=uri, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 420, in connect
backend-api  |     connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 371, in connect_milvus
backend-api  |     gh._wait_for_channel_ready(timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 151, in _wait_for_channel_ready
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 144, in _wait_for_channel_ready
backend-api  |     self._setup_identifier_interceptor(self._user, timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 262, in _setup_identifier_interceptor
backend-api  |     self._identifier = self.__internal_register(user, host, timeout=timeout)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 140, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 136, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 175, in handler
backend-api  |     return func(self, *args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 115, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 86, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 215, in handler
backend-api  |     raise e from e
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 205, in handler
backend-api  |     return func(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 1841, in __internal_register
backend-api  |     check_status(response.status)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/pymilvus/client/utils.py", line 54, in check_status
backend-api  |     raise MilvusException(status.code, status.reason, status.error_code)
backend-api  | pymilvus.exceptions.MilvusException: <MilvusException: (code=800, message=database not found[database=beat_maker])>

another notable difference from my code, is on your screen when running "docker-compose up -d" it displays this at the top:

WARN[0000] a network with name beat-maker exists but was not created for project "ai-beat-maker".
Set 'external: true' to use an existing network
Huy1711 commented 1 month ago

The "sudo" before "docker compose" commands should be consistent, when you use "sudo docker compose up -d" you should also do "sudo docker compose ps", and "docker compose up -d" with "docker compose ps", this is similar to "Running as administrator" terminal and a normal terminal in Windows.

Look like it's my fault to try to connect to "beat-maker" database before creating it using milvus_prepare scripts. The correct process should be: Turn the milvus database services on -> create the database named "beat-maker" and add data using milvus_prepare.sh script -> Turn the backend-api on. So that you can do a hotfix like this:

  1. Turn all the services on using "docker compose up -d"
  2. Run milvus_prepare scripts to create "beat-maker" database and add data to that database
  3. Reset all the services using "docker compose up -d --force-recreate" (This is similar to "docker compose down" + "docker compose up -d" again) Hope this can fix the issue.

For the network existed warning issue, you should do "docker-compose down" whenever you want to rerun the project, so it will delete existing container or network of previous run.

Stacks222 commented 1 month ago
             SERVICE             CREATED          STATUS                             PORTS
backend-music-embedding   nvcr.io/nvidia/tritonserver:23.12-py3      "/opt/nvidia/nvidia_…"   music-embedding     22 seconds ago   Up 15 seconds                      0.0.0.0:8000-8002->8000-8002/tcp
milvus-etcd               quay.io/coreos/etcd:v3.5.5                 "etcd -advertise-cli…"   milvus-etcd         22 seconds ago   Up 15 seconds (health: starting)   2379-2380/tcp
milvus-minio              minio/minio:RELEASE.2023-03-20T20-16-18Z   "/usr/bin/docker-ent…"   milvus-minio        22 seconds ago   Up 15 seconds (health: starting)   0.0.0.0:9000-9001->9000-9001/tcp
milvus-standalone         milvusdb/milvus:v2.3.16                    "/tini -- milvus run…"   milvus-standalone   21 seconds ago   Up 15 seconds (health: starting)   0.0.0.0:9091->9091/tcp, 0.0.0.0:19530->19530/tcp
Stacks222 commented 1 month ago
AI-beat-maker$ docker compose ps
NAME                      IMAGE                                      COMMAND                  SERVICE             CREATED         STATUS                   PORTS
backend-music-embedding   nvcr.io/nvidia/tritonserver:23.12-py3      "/opt/nvidia/nvidia_…"   music-embedding     4 minutes ago   Up 4 minutes             0.0.0.0:8000-8002->8000-8002/tcp
milvus-etcd               quay.io/coreos/etcd:v3.5.5                 "etcd -advertise-cli…"   milvus-etcd         4 minutes ago   Up 4 minutes (healthy)   2379-2380/tcp
milvus-minio              minio/minio:RELEASE.2023-03-20T20-16-18Z   "/usr/bin/docker-ent…"   milvus-minio        4 minutes ago   Up 4 minutes (healthy)   0.0.0.0:9000-9001->9000-9001/tcp
milvus-standalone         milvusdb/milvus:v2.3.16                    "/tini -- milvus run…"   milvus-standalone   4 minutes ago   Up 4 minutes (healthy)   0.0.0.0:9091->9091/tcp, 0.0.0.0:19530->19530/tcp
Stacks222 commented 1 month ago
AI-beat-maker$ docker compose logs backend-api
backend-api  | ERROR:    Error loading ASGI app. Could not import module "main".
AI-beat-maker$ docker compose logs frontend-streamlit
frontend-streamlit  | Usage: streamlit run [OPTIONS] TARGET [ARGS]...
frontend-streamlit  | Try 'streamlit run --help' for help.
frontend-streamlit  | 
frontend-streamlit  | Error: Invalid value: File does not exist: Music_Generate.py
Stacks222 commented 1 month ago
(beat-maker) ubuntumusic@ubuntumusic-virtual-machine:~/demo/AI-beat-maker$ docker compose logs backend-api
/usr/local/lib/python3.10/site-packages/tritonclient/grpc/service_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.60.0, but the generated code in grpc_service_pb2_grpc.py depends on grpcio>=1.64.1. Please upgrade your grpc module to grpcio>=1.64.1 or downgrade your generated code using grpcio-tools<=1.60.0. This warning will become an error in 1.65.0, scheduled for release on June 25, 2024.
backend-api  | /usr/local/lib/python3.10/site-packages/tritonclient/grpc/service_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.60.0, but the generated code in grpc_service_pb2_grpc.py depends on grpcio>=1.64.1. Please upgrade your grpc module to grpcio>=1.64.1 or downgrade your generated code using grpcio-tools<=1.60.0. This warning will become an error in 1.65.0, scheduled for release on June 25, 2024.
backend-api  |   warnings.warn(
backend-api  | Traceback (most recent call last):
backend-api  |   File "/usr/local/bin/uvicorn", line 8, in <module>
backend-api  |     sys.exit(main())
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
backend-api  |     return self.main(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
backend-api  |     rv = self.invoke(ctx)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
backend-api  |     return ctx.invoke(self.callback, **ctx.params)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
backend-api  |     return __callback(*args, **kwargs)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 410, in main
backend-api  |     run(
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 577, in run
backend-api  |     server.run()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
backend-api  |     return asyncio.run(self.serve(sockets=sockets))
backend-api  |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
backend-api  |     return loop.run_until_complete(main)
backend-api  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
backend-api  |     return future.result()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
backend-api  |     await self._serve(sockets)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 76, in _serve
backend-api  |     config.load()
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 434, in load
backend-api  |     self.loaded_app = import_from_string(self.app)
backend-api  |   File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
backend-api  |     module = importlib.import_module(module_str)
backend-api  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
backend-api  |     return _bootstrap._gcd_import(name[level:], package, level)
backend-api  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
backend-api  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
backend-api  |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
backend-api  |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
backend-api  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
backend-api  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
backend-api  |   File "/app/main.py", line 11, in <module>
backend-api  |     from utils.search.summary import get_song_path, summary_result
backend-api  |   File "/app/utils/search/summary.py", line 7, in <module>
backend-api  |     with open("./datasets/neural-audio-fp-dataset/id2path.txt", "r") as f:
backend-api  | FileNotFoundError: [Errno 2] No such file or directory: './datasets/neural-audio-fp-dataset/id2path.txt'
Stacks222 commented 1 month ago

/usr/local/lib/python3.10/site-packages/tritonclient/grpc/service_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.60.0, but the generated code in grpc_service_pb2_grpc.py depends on grpcio>=1.64.1. Please upgrade your grpc module to grpcio>=1.64.1 or downgrade your generated code using grpcio-tools<=1.60.0. This warning will become an error in 1.65.0, scheduled for release on June 25, 2024.