Hubs-Foundation / hubs-compose

Local development setup for Hubs
Mozilla Public License 2.0
41 stars 32 forks source link

bin/init gives mutagen daemon error #28

Closed S0nathan closed 1 year ago

S0nathan commented 1 year ago

This is probably not an issue, but I'm not sure where else to ask for help.

I'm on Ubuntu 22.04, I have installed docker-compose-plugin (2.16.0) along the other docker stuff and docker-compose (1.29.2), as this repo uses "docker-compose" and not "docker compose". I downloaded the mutagen-compose binary (0.16.5), put it in /usr/local/bin and rebooted. (Also edited /etc/hosts.)

When I run sudo bin/init, I get the following output:

Cloning source repositories

fatal: destination path '/home/student/hubs-compose/services/reticulum' already exists and is not an empty directory.
fatal: destination path '/home/student/hubs-compose/services/dialog' already exists and is not an empty directory.
fatal: destination path '/home/student/hubs-compose/services/hubs' already exists and is not an empty directory.
fatal: destination path '/home/student/hubs-compose/services/spoke' already exists and is not an empty directory.

Initializing Reticulum

Building reticulum
[+] Building 1.7s (13/13) FINISHED                                                                                                                                                                         
 => [internal] load build definition from reticulum.Dockerfile                                                                                                                                        0.0s
 => => transferring dockerfile: 648B                                                                                                                                                                  0.0s
 => [internal] load .dockerignore                                                                                                                                                                     0.0s
 => => transferring context: 240B                                                                                                                                                                     0.0s
 => resolve image config for docker.io/docker/dockerfile:1                                                                                                                                            0.9s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14                                                                       0.0s
 => [internal] load metadata for docker.io/hexpm/elixir:1.14.3-erlang-23.3.4.18-alpine-3.16.2                                                                                                         0.6s
 => [internal] load build context                                                                                                                                                                     0.0s
 => => transferring context: 102B                                                                                                                                                                     0.0s
 => [1/6] FROM docker.io/hexpm/elixir:1.14.3-erlang-23.3.4.18-alpine-3.16.2@sha256:6414e82c018e12610390407cf448c0d6279a3fd980948f17705f63ff0613eab6                                                   0.0s
 => CACHED [2/6] RUN mix do local.hex --force, local.rebar --force                                                                                                                                    0.0s
 => CACHED [3/6] RUN apk add --no-cache    git    inotify-tools                                                                                                                                       0.0s
 => CACHED [4/6] COPY files/dev-perms.pem /etc/perms.pem                                                                                                                                              0.0s
 => CACHED [5/6] COPY files/trapped-mix /usr/local/bin/trapped-mix                                                                                                                                    0.0s
 => CACHED [6/6] WORKDIR /code                                                                                                                                                                        0.0s
 => exporting to image                                                                                                                                                                                0.0s
 => => exporting layers                                                                                                                                                                               0.0s
 => => writing image sha256:adc434a5b82872dbaba19d9c8139a476be89a8e646460056c120b63eb8c83e3a                                                                                                          0.0s
 => => naming to docker.io/library/hubs-compose_reticulum                                                                                                                                             0.0s
[+] Running 0/2
[+] Running 0/2bs-compose-mutagen-1  Recreate                                                                                                                                                         6.5s
 ⠴ Container hubs-compose-mutagen-1  Recreate                                                                                                                                                         6.5s
 ⠿ Mutagen                           Error: unable to connect to Mutagen daemon: connection timed out (is the daemon running?)                                                                        6.5s
unable to create Mutagen Compose sidecar service: unable to pause Mutagen sessions: unable to connect to Mutagen daemon: connection timed out (is the daemon running?)
[+] Running 0/2
[+] Running 0/2bs-compose-mutagen-1  Stopping                                                                                                                                                         6.5s
 ⠿ Container hubs-compose-mutagen-1  Error while Stopping                                                                                                                                             6.5s
 ⠿ Mutagen                           Error: unable to connect to Mutagen daemon: connection timed out (is the daemon running?)                                                                        6.5s
unable to pause Mutagen sessions: unable to connect to Mutagen daemon: connection timed out (is the daemon running?)

This also happens on a complete fresh run (= after deleting all images & the repo).

ps auxf | grep mutagen gives:

student     4099  0.0  0.0  17864  2588 pts/0    S+   16:09   0:00  |       \_ grep --color=auto mut
student     4088  0.0  0.0 721736  9840 ?        Ssl  16:09   0:00  \_ mutagen daemon run

My only idea is a version mismatch, but I don't properly know what's going on anyway.

S0nathan commented 1 year ago

root wasn't finding the mutagen command (student was though for some reason), which means if you ran as sudo, "mutagen daemon start" couldn't be executed. I ended up putting the mutagen binary in /usr/local/bin as well, which fixed it.