openchatai / OpenChat

LLMs custom-chatbots console ⚡
https://open.cx
MIT License
5.2k stars 639 forks source link

Mac `make install error` (Bind for 0.0.0.0:6379 failed: port is already allocated make: *** [install] Error 1) #24

Closed blueberrychopsticks closed 1 year ago

blueberrychopsticks commented 1 year ago

Steps to reproduce:

1) Download repo 2) Run Docker 3) Add API Keys 4) Run make install

❯ make install
=== Putting the services down (if already running) ===
docker-compose down --remove-orphans
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
make: *** [install] Error 1
❯ make install
=== Putting the services down (if already running) ===
docker-compose down --remove-orphans
=== Setting up Docker environment ===
=== This will overwrite your .env files, you still have some time to abort ===
=== Copying .env files ===
cp -n backend-server/.env.example backend-server/.env 2>/dev/null || true
cp -n common.env llm-server/.env 2>/dev/null || true
docker-compose build #--no-cache
[+] Building 47.3s (11/11) FINISHED                                                                                                                                                                                                                                    
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                              0.0s
 => => transferring dockerfile: 473B                                                                                                                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/node:18                                                                                                                                                                                                        1.5s
 => [1/6] FROM docker.io/library/node:18@sha256:8cdf7234449f35e579f7491137807ddb3a089f028862f7ab69af437cc9f47ff1                                                                                                                                                  8.3s
 => => resolve docker.io/library/node:18@sha256:8cdf7234449f35e579f7491137807ddb3a089f028862f7ab69af437cc9f47ff1                                                                                                                                                  0.0s
 => => sha256:8cdf7234449f35e579f7491137807ddb3a089f028862f7ab69af437cc9f47ff1 1.21kB / 1.21kB                                                                                                                                                                    0.0s
 => => sha256:21830b9459ba3021657dccbb50204d1ec446012ad46fa46a24cb77e1f21264bd 2.00kB / 2.00kB                                                                                                                                                                    0.0s
 => => sha256:b04fae59f135dd79280e4a6da39408e04c6d703c617cbcb1c524dfe6f2962fe5 53.69MB / 53.69MB                                                                                                                                                                  1.0s
 => => sha256:518786b6252a49183be5ea11de846132127364b24781cd7fef451b9c138a36f3 7.25kB / 7.25kB                                                                                                                                                                    0.0s
 => => sha256:24cef00b9ad96bea3be667b285f4b22763747912cc8e4f2c3f145facb418d71d 15.75MB / 15.75MB                                                                                                                                                                  1.6s
 => => sha256:1db91b65282bc9aae941329f294e69b2671a6429827e8b357b950a2c112ef783 54.68MB / 54.68MB                                                                                                                                                                  2.6s
 => => sha256:54db3e52d959511497ff15bfc413d13a6743a3cb6a314971f1b31be790e2b347 189.78MB / 189.78MB                                                                                                                                                                4.5s
 => => extracting sha256:b04fae59f135dd79280e4a6da39408e04c6d703c617cbcb1c524dfe6f2962fe5                                                                                                                                                                         1.1s
 => => sha256:2b2d5a4c9703ad570d1274590098dc288d3038dbdad5741bc737abb2a6ac43b1 4.21kB / 4.21kB                                                                                                                                                                    1.8s
 => => sha256:baf63efb2a2285063bceca686b5f3446191f8927165177e82fa79a079586a00c 45.58MB / 45.58MB                                                                                                                                                                  3.8s
 => => extracting sha256:24cef00b9ad96bea3be667b285f4b22763747912cc8e4f2c3f145facb418d71d                                                                                                                                                                         0.3s
 => => sha256:1b48a5df7d530cdf6a7b622b745c8ca8a984d92f91eb89f25fb73de6bc5cdf3a 2.28MB / 2.28MB                                                                                                                                                                    2.7s
 => => extracting sha256:1db91b65282bc9aae941329f294e69b2671a6429827e8b357b950a2c112ef783                                                                                                                                                                         1.3s
 => => sha256:42d784b7d586eec0e369073056d0aaea28c8e477c97802b134f3dcdf2322c0a9 449B / 449B                                                                                                                                                                        2.9s
 => => extracting sha256:54db3e52d959511497ff15bfc413d13a6743a3cb6a314971f1b31be790e2b347                                                                                                                                                                         2.4s
 => => extracting sha256:2b2d5a4c9703ad570d1274590098dc288d3038dbdad5741bc737abb2a6ac43b1                                                                                                                                                                         0.0s
 => => extracting sha256:baf63efb2a2285063bceca686b5f3446191f8927165177e82fa79a079586a00c                                                                                                                                                                         0.8s
 => => extracting sha256:1b48a5df7d530cdf6a7b622b745c8ca8a984d92f91eb89f25fb73de6bc5cdf3a                                                                                                                                                                         0.1s
 => => extracting sha256:42d784b7d586eec0e369073056d0aaea28c8e477c97802b134f3dcdf2322c0a9                                                                                                                                                                         0.0s
 => [internal] load build context                                                                                                                                                                                                                                 0.0s
 => => transferring context: 214.52kB                                                                                                                                                                                                                             0.0s
 => [2/6] WORKDIR /usr/src/app                                                                                                                                                                                                                                    0.2s
 => [3/6] COPY package*.json yarn.lock ./                                                                                                                                                                                                                         0.0s
 => [4/6] COPY .env .env                                                                                                                                                                                                                                          0.0s
 => [5/6] RUN yarn install                                                                                                                                                                                                                                       31.7s
 => [6/6] COPY . .                                                                                                                                                                                                                                                0.0s
 => exporting to image                                                                                                                                                                                                                                            5.5s
 => => exporting layers                                                                                                                                                                                                                                           5.5s
 => => writing image sha256:c09e1e892c05835a81e9ba2cd173519d2d1a98bca3ff2b5c8d3abe6af7b276b0                                                                                                                                                                      0.0s
 => => naming to docker.io/library/openchat-llm-server                                                                                                                                                                                                            0.0s
[+] Building 28.9s (14/14) FINISHED                                                                                                                                                                                                                                    
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                              0.0s
 => => transferring dockerfile: 961B                                                                                                                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/php:8.1-cli                                                                                                                                                                                                    1.3s
 => [internal] load build context                                                                                                                                                                                                                                 0.1s
 => => transferring context: 8.62MB                                                                                                                                                                                                                               0.1s
 => [1/9] FROM docker.io/library/php:8.1-cli@sha256:1e2526b7fa73a1da7ebffa6773aee9a79c6e05603110b496bb8737651e33230a                                                                                                                                              5.3s
 => => resolve docker.io/library/php:8.1-cli@sha256:1e2526b7fa73a1da7ebffa6773aee9a79c6e05603110b496bb8737651e33230a                                                                                                                                              0.0s
 => => sha256:bb545ee357b47ccf2d492f1d492ade64374a0fd821d59edd97904605ec1d21bd 271B / 271B                                                                                                                                                                        0.3s
 => => sha256:082044eb0664434956d83b1db0a61d8275c80d5952d902ca1711e31c62825775 2.20kB / 2.20kB                                                                                                                                                                    0.0s
 => => sha256:74780f41e660436e8172fefb2a76ba5d01db251a97028db0487354cab4d69240 224B / 224B                                                                                                                                                                        0.1s
 => => sha256:94b76edccccbe5393c86074de826eff56dfac107228b68f5fc81c4c79daa88ba 86.93MB / 86.93MB                                                                                                                                                                  3.2s
 => => sha256:1e2526b7fa73a1da7ebffa6773aee9a79c6e05603110b496bb8737651e33230a 1.86kB / 1.86kB                                                                                                                                                                    0.0s
 => => sha256:da3d7a661c5121186d6b60641120ad1cc6dd4d33b1ccfb75ff88140310e070ff 9.77kB / 9.77kB                                                                                                                                                                    0.0s
 => => sha256:d981f2c20c93e1c57a46cd87bc5b9a554be5323072a0d0ab4b354aabd237bbcf 30.05MB / 30.05MB                                                                                                                                                                  1.0s
 => => sha256:b15ac1e873d7d6f3c96c6fd14014a1aabb14ee9394128b29e417e7e8b2d9b15a 12.17MB / 12.17MB                                                                                                                                                                  1.0s
 => => extracting sha256:d981f2c20c93e1c57a46cd87bc5b9a554be5323072a0d0ab4b354aabd237bbcf                                                                                                                                                                         0.5s
 => => sha256:132ad3c58432d34fe909a6a79deae3ef91e2110f0d896008a43d32cb63a4bc52 490B / 490B                                                                                                                                                                        1.1s
 => => sha256:9b811869c1c3efe0a1083935a0443e20db38c1f16c56890792a50ebc89d3c5ab 33.91MB / 33.91MB                                                                                                                                                                  1.7s
 => => sha256:3ddf545ea9d4d240168de2df7a9823cabf69987ae12db888935b183df91fbe99 2.45kB / 2.45kB                                                                                                                                                                    1.2s
 => => sha256:75602aec6ef7eb85967c18e1ac55785b6fe87c62c5efe3a2e5284c0d50d47d51 247B / 247B                                                                                                                                                                        1.3s
 => => extracting sha256:74780f41e660436e8172fefb2a76ba5d01db251a97028db0487354cab4d69240                                                                                                                                                                         0.0s
 => => extracting sha256:94b76edccccbe5393c86074de826eff56dfac107228b68f5fc81c4c79daa88ba                                                                                                                                                                         1.1s
 => => extracting sha256:bb545ee357b47ccf2d492f1d492ade64374a0fd821d59edd97904605ec1d21bd                                                                                                                                                                         0.0s
 => => extracting sha256:b15ac1e873d7d6f3c96c6fd14014a1aabb14ee9394128b29e417e7e8b2d9b15a                                                                                                                                                                         0.1s
 => => extracting sha256:132ad3c58432d34fe909a6a79deae3ef91e2110f0d896008a43d32cb63a4bc52                                                                                                                                                                         0.0s
 => => extracting sha256:9b811869c1c3efe0a1083935a0443e20db38c1f16c56890792a50ebc89d3c5ab                                                                                                                                                                         0.5s
 => => extracting sha256:3ddf545ea9d4d240168de2df7a9823cabf69987ae12db888935b183df91fbe99                                                                                                                                                                         0.0s
 => => extracting sha256:75602aec6ef7eb85967c18e1ac55785b6fe87c62c5efe3a2e5284c0d50d47d51                                                                                                                                                                         0.0s
 => [2/9] RUN apt-get update && apt-get install -y     libpq-dev     libzip-dev     zip     unzip     git                                                                                                                                                         4.0s
 => [3/9] RUN docker-php-ext-install pdo pdo_mysql                                                                                                                                                                                                                9.4s
 => [4/9] WORKDIR /var/www/html                                                                                                                                                                                                                                   0.0s
 => [5/9] COPY . .                                                                                                                                                                                                                                                0.0s
 => [6/9] COPY .env .env                                                                                                                                                                                                                                          0.0s
 => [7/9] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer                                                                                                                                                1.7s
 => [8/9] RUN composer install --no-plugins --no-scripts                                                                                                                                                                                                          6.0s
 => [9/9] RUN php artisan key:generate                                                                                                                                                                                                                            0.4s
 => exporting to image                                                                                                                                                                                                                                            0.6s
 => => exporting layers                                                                                                                                                                                                                                           0.6s
 => => writing image sha256:41b2bf7b715d7c358560802f49c6efc8c080a310401d7bc086c0cf1b2a19b9cf                                                                                                                                                                      0.0s
 => => naming to docker.io/library/openchat-backend-server                                                                                                                                                                                                        0.0s
docker-compose up -d #--force-recreate
[+] Running 19/19
 ⠿ redis Pulled                                                                                                                                                                                                                                                   4.8s
   ⠿ 141796bfcf0d Pull complete                                                                                                                                                                                                                                   3.0s
   ⠿ e04371d693c0 Pull complete                                                                                                                                                                                                                                   3.1s
   ⠿ e9a750879aa6 Pull complete                                                                                                                                                                                                                                   3.2s
   ⠿ 9a350e3fcc54 Pull complete                                                                                                                                                                                                                                   3.4s
   ⠿ ac36e585cb97 Pull complete                                                                                                                                                                                                                                   3.5s
   ⠿ ac2676b39eae Pull complete                                                                                                                                                                                                                                   3.5s
 ⠿ mysql Pulled                                                                                                                                                                                                                                                   7.3s
   ⠿ e83e8f2e82cc Pull complete                                                                                                                                                                                                                                   2.3s
   ⠿ 0f23deb01b84 Pull complete                                                                                                                                                                                                                                   2.3s
   ⠿ f5bda3b184ea Pull complete                                                                                                                                                                                                                                   2.4s
   ⠿ ed17edbc6604 Pull complete                                                                                                                                                                                                                                   2.6s
   ⠿ 33a94a6acfa7 Pull complete                                                                                                                                                                                                                                   2.6s
   ⠿ f153bd2953e4 Pull complete                                                                                                                                                                                                                                   2.7s
   ⠿ ab532edfb813 Pull complete                                                                                                                                                                                                                                   3.5s
   ⠿ c76bdfe4f3d0 Pull complete                                                                                                                                                                                                                                   3.5s
   ⠿ 8a7ffe2f2551 Pull complete                                                                                                                                                                                                                                   6.0s
   ⠿ 857ada4fbbcc Pull complete                                                                                                                                                                                                                                   6.1s
   ⠿ b7c508404c3c Pull complete                                                                                                                                                                                                                                   6.1s
[+] Running 6/7
 ⠿ Network openchat_openchat_network    Created                                                                                                                                                                                                                   0.0s
 ⠿ Volume "openchat_shared_data"        Created                                                                                                                                                                                                                   0.0s
 ⠿ Volume "openchat_database"           Created                                                                                                                                                                                                                   0.0s
 ⠿ Container openchat-redis-1           Starting                                                                                                                                                                                                                  1.0s
 ⠿ Container openchat-llm-server-1      Started                                                                                                                                                                                                                   0.7s
 ⠿ Container openchat-mysql-1           Started                                                                                                                                                                                                                   1.0s
 ⠿ Container openchat-backend-server-1  Created                                                                                                                                                                                                                   0.0s
Error response from daemon: driver failed programming external connectivity on endpoint openchat-redis-1 (9b7814509190f2ce6cd501f0dc1ae1178509abeee45da23550c5df0b333c0021): Bind for 0.0.0.0:6379 failed: port is already allocated
make: *** [install] Error 1
❯ make install
=== Putting the services down (if already running) ===
docker-compose down --remove-orphans
[+] Running 5/4
 ⠿ Container openchat-backend-server-1  Removed                                                                                                                                                                                                                   0.0s
 ⠿ Container openchat-mysql-1           Removed                                                                                                                                                                                                                   1.3s
 ⠿ Container openchat-redis-1           Removed                                                                                                                                                                                                                   0.0s
 ⠿ Container openchat-llm-server-1      Removed                                                                                                                                                                                                                   0.8s
 ⠿ Network openchat_openchat_network    Removed                                                                                                                                                                                                                   0.0s
=== Setting up Docker environment ===
=== This will overwrite your .env files, you still have some time to abort ===
=== Copying .env files ===
cp -n backend-server/.env.example backend-server/.env 2>/dev/null || true
cp -n common.env llm-server/.env 2>/dev/null || true
docker-compose build #--no-cache
[+] Building 0.6s (11/11) FINISHED                                                                                                                                                                                                                                     
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                              0.0s
 => => transferring dockerfile: 69B                                                                                                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/node:18                                                                                                                                                                                                        0.5s
 => [1/6] FROM docker.io/library/node:18@sha256:8cdf7234449f35e579f7491137807ddb3a089f028862f7ab69af437cc9f47ff1                                                                                                                                                  0.0s
 => [internal] load build context                                                                                                                                                                                                                                 0.0s
 => => transferring context: 2.15kB                                                                                                                                                                                                                               0.0s
 => CACHED [2/6] WORKDIR /usr/src/app                                                                                                                                                                                                                             0.0s
 => CACHED [3/6] COPY package*.json yarn.lock ./                                                                                                                                                                                                                  0.0s
 => CACHED [4/6] COPY .env .env                                                                                                                                                                                                                                   0.0s
 => CACHED [5/6] RUN yarn install                                                                                                                                                                                                                                 0.0s
 => CACHED [6/6] COPY . .                                                                                                                                                                                                                                         0.0s
 => exporting to image                                                                                                                                                                                                                                            0.0s
 => => exporting layers                                                                                                                                                                                                                                           0.0s
 => => writing image sha256:c09e1e892c05835a81e9ba2cd173519d2d1a98bca3ff2b5c8d3abe6af7b276b0                                                                                                                                                                      0.0s
 => => naming to docker.io/library/openchat-llm-server                                                                                                                                                                                                            0.0s
[+] Building 0.5s (14/14) FINISHED                                                                                                                                                                                                                                     
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                              0.0s
 => => transferring dockerfile: 69B                                                                                                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/php:8.1-cli                                                                                                                                                                                                    0.4s
 => [1/9] FROM docker.io/library/php:8.1-cli@sha256:1e2526b7fa73a1da7ebffa6773aee9a79c6e05603110b496bb8737651e33230a                                                                                                                                              0.0s
 => [internal] load build context                                                                                                                                                                                                                                 0.0s
 => => transferring context: 36.47kB                                                                                                                                                                                                                              0.0s
 => CACHED [2/9] RUN apt-get update && apt-get install -y     libpq-dev     libzip-dev     zip     unzip     git                                                                                                                                                  0.0s
 => CACHED [3/9] RUN docker-php-ext-install pdo pdo_mysql                                                                                                                                                                                                         0.0s
 => CACHED [4/9] WORKDIR /var/www/html                                                                                                                                                                                                                            0.0s
 => CACHED [5/9] COPY . .                                                                                                                                                                                                                                         0.0s
 => CACHED [6/9] COPY .env .env                                                                                                                                                                                                                                   0.0s
 => CACHED [7/9] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer                                                                                                                                         0.0s
 => CACHED [8/9] RUN composer install --no-plugins --no-scripts                                                                                                                                                                                                   0.0s
 => CACHED [9/9] RUN php artisan key:generate                                                                                                                                                                                                                     0.0s
 => exporting to image                                                                                                                                                                                                                                            0.0s
 => => exporting layers                                                                                                                                                                                                                                           0.0s
 => => writing image sha256:41b2bf7b715d7c358560802f49c6efc8c080a310401d7bc086c0cf1b2a19b9cf                                                                                                                                                                      0.0s
 => => naming to docker.io/library/openchat-backend-server                                                                                                                                                                                                        0.0s
docker-compose up -d #--force-recreate
[+] Running 4/5
 ⠿ Network openchat_openchat_network    Created                                                                                                                                                                                                                   0.0s
 ⠿ Container openchat-llm-server-1      Started                                                                                                                                                                                                                   0.5s
 ⠿ Container openchat-redis-1           Starting                                                                                                                                                                                                                  0.7s
 ⠿ Container openchat-mysql-1           Started                                                                                                                                                                                                                   0.7s
 ⠿ Container openchat-backend-server-1  Created                                                                                                                                                                                                                   0.0s
Error response from daemon: driver failed programming external connectivity on endpoint openchat-redis-1 (3f6ea4f3a9bbc3340a4c5437583385c597cbd0bc1814297102103555e38091bb): Bind for 0.0.0.0:6379 failed: port is already allocated
make: *** [install] Error 1
❯ npx kill-port 6379
Process on port 6379 killed
❯ make install
=== Putting the services down (if already running) ===
docker-compose down --remove-orphans
Cannot connect to the Docker daemon at unix:///Users/laptop/.docker/run/docker.sock. Is the docker daemon running?
make: *** [install] Error 1
❯ make install
=== Putting the services down (if already running) ===
docker-compose down --remove-orphans
[+] Running 5/5
 ✔ Container openchat-backend-server-1  Removed                                                                                                                                                                                                                   0.0s 
 ✔ Container openchat-llm-server-1      Removed                                                                                                                                                                                                                   0.7s 
 ✔ Container openchat-mysql-1           Removed                                                                                                                                                                                                                   1.5s 
 ✔ Container openchat-redis-1           Removed                                                                                                                                                                                                                   0.0s 
 ✔ Network openchat_openchat_network    Removed                                                                                                                                                                                                                   0.0s 
=== Setting up Docker environment ===
=== This will overwrite your .env files, you still have some time to abort ===
=== Copying .env files ===
cp -n backend-server/.env.example backend-server/.env 2>/dev/null || true
cp -n common.env llm-server/.env 2>/dev/null || true
docker-compose build #--no-cache
[+] Building 1.7s (11/11) FINISHED                                                                                                                                                                                                                                     
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                              0.0s
 => => transferring dockerfile: 473B                                                                                                                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/node:18                                                                                                                                                                                                        1.6s
 => [internal] load build context                                                                                                                                                                                                                                 0.0s
 => => transferring context: 2.15kB                                                                                                                                                                                                                               0.0s
 => [1/6] FROM docker.io/library/node:18@sha256:8cdf7234449f35e579f7491137807ddb3a089f028862f7ab69af437cc9f47ff1                                                                                                                                                  0.0s
 => CACHED [2/6] WORKDIR /usr/src/app                                                                                                                                                                                                                             0.0s
 => CACHED [3/6] COPY package*.json yarn.lock ./                                                                                                                                                                                                                  0.0s
 => CACHED [4/6] COPY .env .env                                                                                                                                                                                                                                   0.0s
 => CACHED [5/6] RUN yarn install                                                                                                                                                                                                                                 0.0s
 => CACHED [6/6] COPY . .                                                                                                                                                                                                                                         0.0s
 => exporting to image                                                                                                                                                                                                                                            0.0s
 => => exporting layers                                                                                                                                                                                                                                           0.0s
 => => writing image sha256:e237f6192d01fb35dba24776025422954fba905d6dee0522d4df35f8a59bf0f9                                                                                                                                                                      0.0s
 => => naming to docker.io/library/openchat-llm-server                                                                                                                                                                                                            0.0s
[+] Building 1.2s (14/14) FINISHED                                                                                                                                                                                                                                     
 => [internal] load .dockerignore                                                                                                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                   0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                              0.0s
 => => transferring dockerfile: 961B                                                                                                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/php:8.1-cli                                                                                                                                                                                                    1.2s
 => [1/9] FROM docker.io/library/php:8.1-cli@sha256:1e2526b7fa73a1da7ebffa6773aee9a79c6e05603110b496bb8737651e33230a                                                                                                                                              0.0s
 => [internal] load build context                                                                                                                                                                                                                                 0.0s
 => => transferring context: 36.47kB                                                                                                                                                                                                                              0.0s
 => CACHED [2/9] RUN apt-get update && apt-get install -y     libpq-dev     libzip-dev     zip     unzip     git                                                                                                                                                  0.0s
 => CACHED [3/9] RUN docker-php-ext-install pdo pdo_mysql                                                                                                                                                                                                         0.0s
 => CACHED [4/9] WORKDIR /var/www/html                                                                                                                                                                                                                            0.0s
 => CACHED [5/9] COPY . .                                                                                                                                                                                                                                         0.0s
 => CACHED [6/9] COPY .env .env                                                                                                                                                                                                                                   0.0s
 => CACHED [7/9] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer                                                                                                                                         0.0s
 => CACHED [8/9] RUN composer install --no-plugins --no-scripts                                                                                                                                                                                                   0.0s
 => CACHED [9/9] RUN php artisan key:generate                                                                                                                                                                                                                     0.0s
 => exporting to image                                                                                                                                                                                                                                            0.0s
 => => exporting layers                                                                                                                                                                                                                                           0.0s
 => => writing image sha256:d0541fc8152a57cc43cac75456cc4b789a5717b28a1573ba917e005842d3d555                                                                                                                                                                      0.0s
 => => naming to docker.io/library/openchat-backend-server                                                                                                                                                                                                        0.0s
docker-compose up -d #--force-recreate
[+] Running 4/5
 ✔ Network openchat_openchat_network    Created                                                                                                                                                                                                                   0.0s 
 ⠿ Container openchat-redis-1           Starting                                                                                                                                                                                                                  0.6s 
 ✔ Container openchat-llm-server-1      Started                                                                                                                                                                                                                   0.6s 
 ✔ Container openchat-mysql-1           Started                                                                                                                                                                                                                   0.6s 
 ✔ Container openchat-backend-server-1  Created                                                                                                                                                                                                                   0.0s 
Error response from daemon: driver failed programming external connectivity on endpoint openchat-redis-1 (e5cfa636640e0339894f53c7192106058714dd0818debe63327c937fd6330d26): Bind for 0.0.0.0:6379 failed: port is already allocated
make: *** [install] Error 1

~/Development/Learning/llm/OpenChat on bc/gitignore…cker-running ────
blueberrychopsticks commented 1 year ago

CHATGPT (gpt4) CONSULTATION

The error message says:

vbnet Copy code Error response from daemon: driver failed programming external connectivity on endpoint openchat-redis-1 (e5cfa636640e0339894f53c7192106058714dd0818debe63327c937fd6330d26): Bind for 0.0.0.0:6379 failed: port is already allocated make: *** [install] Error 1 This indicates that the Docker engine is trying to bind to port 6379, which is the default port for Redis, but that port is already in use by another process. As a result, the container openchat-redis-1 cannot start and your make install command fails with an error.

You can confirm this by running the command:

bash Copy code netstat -tuln | grep 6379 If there's already a process running on port 6379, it will show up in the results.

To solve the problem, you have two options:

Stop the current process that's using port 6379. If that process is also a Docker container, you can stop it using the docker stop [container_id] command. If it's a local service, you'll need to stop it using the appropriate commands for your operating system. Change the port that your Redis container is using in the Docker Compose file. You'll need to update the ports section of the redis service. For example, you might change it to 6380:6379 to use port 6380 on your host machine. Before suggesting a solution, it would be helpful to know what the output of the netstat command is and whether or not you have control over the processes running on your machine. Also, I would need to know if changing the Redis port in your Docker Compose file is a viable option for your use case.

blueberrychopsticks commented 1 year ago

SOLUTION

I STOPPED all of my Docker containers via the Docker GUI and then ran make install again.

image

Evidence of solution

image