AIO - The 'nextcloud-aio-mastercontainer' container was not found

Using docker composer and getting this error when starting container. I triple-checked the composer yaml and can’t see anything wrong with the container name:

version: '3'
services:
  nextcloud:
    image: nextcloud/all-in-one:latest
    restart: no
    container_name: nextcloud-aio-mastercontainer
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
#      - '80:80'
      - '11000:11000'
      - '8080:8080'
      - '8443:8443'
    environment:
      - APACHE_PORT=11000
      - APACHE_IP_BINDING=127.0.0.1
      - NEXTCLOUD_DATADIR=/home/ubuntu/nextclouddados
  watchtower:
    image: containrrr/watchtower
    container_name: watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: nextcloud
volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer

Such a basic error and can’t get through it… urgh

Any help appreciated.

I don’t know how the detection of the container is done, but I thought of the fact I’m running docker with vfs storage driver… if that matter?

Thanks

Hi, can you post the whole logs here?

sure:

docker compose up
[+] Building 0.0s (0/0)
[+] Running 2/0
 âś” Container watchtower                     Created                                                                                                                                                                                            0.0s
 âś” Container nextcloud-aio-mastercontainer  Created                                                                                                                                                                                            0.0s
Attaching to nextcloud-aio-mastercontainer, watchtower
nextcloud-aio-mastercontainer  | WARNING: bridge-nf-call-iptables is disabled
nextcloud-aio-mastercontainer  | WARNING: bridge-nf-call-ip6tables is disabled
nextcloud-aio-mastercontainer  |  Storage Driver: vfs
nextcloud-aio-mastercontainer  | Warning: It seems like the storage driver vfs is used. This will lead to problems with disk space and performance and is disrecommended!
nextcloud-aio-mastercontainer  | It seems like you did not give the mastercontainer the correct name? (The 'nextcloud-aio-mastercontainer' container was not found.)
nextcloud-aio-mastercontainer  | Using a different name is not supported since mastercontainer updates will not work in that case!
nextcloud-aio-mastercontainer  | If you are on docker swarm and try to run AIO, see https://github.com/nextcloud/all-in-one#can-i-run-this-with-docker-swarm
nextcloud-aio-mastercontainer exited with code 1
watchtower                     | time="2023-06-24T21:39:32Z" level=info msg="Watchtower 1.5.3"
watchtower                     | time="2023-06-24T21:39:32Z" level=info msg="Using no notifications"
watchtower                     | time="2023-06-24T21:39:32Z" level=info msg="Only checking containers which name matches \"nextcloud\""
watchtower                     | time="2023-06-24T21:39:32Z" level=info msg="Scheduling first run: 2023-06-25 21:39:32 +0000 UTC"
watchtower                     | time="2023-06-24T21:39:32Z" level=info msg="Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"

Are you using docker swarm?

no, just docker compose. I’m hosting inside a lxd os container but that shouldn’t matter I think.

Hm… can you post the output of sudo docker ps --format "{{.Names}}" ?

it returns nothing

$ sudo docker ps --format "{{.Names}}"
$

ok, without sudo:

$ docker ps --format "{{.Names}}"
watchtower

Does it work if you set this to restart: always ?

no. my understanding is that since it “thinks” the container has a different name it exits with code 1…
if I use restart:always it keeps trying and failing.

I see. The question is why that is the case. Can you post the output of
docker ps --format "{{.Names}}" again when it is in the startup loop due to restart: always?

sure:

$ docker ps --format "{{.Names}}"
nextcloud-aio-mastercontainer

Hm, this is weird.

Can you post the output of the following commands?

docker inspect nextcloud-aio-mastercontainer
docker info
docker ps --format "{{.Names}}" | grep "^nextcloud-aio-mastercontainer$"

docker inspect nextcloud-aio-mastercontainer

[
    {
        "Id": "373d871fcbefadee64836f24c14080bb0371d1d1cbf14d78bef99e4753c81fd1",
        "Created": "2023-06-25T11:32:09.556189711Z",
        "Path": "/start.sh",
        "Args": [
            "/usr/bin/supervisord",
            "-c",
            "/supervisord.conf"
        ],
        "State": {
            "Status": "restarting",
            "Running": true,
            "Paused": false,
            "Restarting": true,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 1,
            "Error": "",
            "StartedAt": "2023-06-25T11:51:04.540898011Z",
            "FinishedAt": "2023-06-25T11:51:04.974036928Z",
            "Health": {
                "Status": "unhealthy",
                "FailingStreak": 0,
                "Log": []
            }
        },
        "Image": "sha256:860a49f3e4e3e3d11232d72d6a6fb6d15d53d9ff5028f411372f0d71e9bf7583",
        "ResolvConfPath": "/home/ubuntu/.local/share/docker/containers/373d871fcbefadee64836f24c14080bb0371d1d1cbf14d78bef99e4753c81fd1/resolv.conf",
        "HostnamePath": "/home/ubuntu/.local/share/docker/containers/373d871fcbefadee64836f24c14080bb0371d1d1cbf14d78bef99e4753c81fd1/hostname",
        "HostsPath": "/home/ubuntu/.local/share/docker/containers/373d871fcbefadee64836f24c14080bb0371d1d1cbf14d78bef99e4753c81fd1/hosts",
        "LogPath": "/home/ubuntu/.local/share/docker/containers/373d871fcbefadee64836f24c14080bb0371d1d1cbf14d78bef99e4753c81fd1/373d871fcbefadee64836f24c14080bb0371d1d1cbf14d78bef99e4753c81fd1-json.log",
        "Name": "/nextcloud-aio-mastercontainer",
        "RestartCount": 10,
        "Driver": "vfs",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "nextcloud_aio_mastercontainer:/mnt/docker-aio-config",
                "/var/run/docker.sock:/var/run/docker.sock:ro"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {
                "11000/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "11000"
                    }
                ],
                "8080/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "8080"
                    }
                ],
                "8443/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "8443"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "always",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                51,
                107
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": [],
            "BlkioDeviceWriteBps": [],
            "BlkioDeviceReadIOps": [],
            "BlkioDeviceWriteIOps": [],
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": null,
            "Name": "vfs"
        },
        "Mounts": [
            {
                "Type": "volume",
                "Name": "nextcloud_aio_mastercontainer",
                "Source": "/home/ubuntu/.local/share/docker/volumes/nextcloud_aio_mastercontainer/_data",
                "Destination": "/mnt/docker-aio-config",
                "Driver": "local",
                "Mode": "z",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "/var/run/docker.sock",
                "Destination": "/var/run/docker.sock",
                "Mode": "ro",
                "RW": false,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "373d871fcbef",
            "Domainname": "",
            "User": "root",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "11000/tcp": {},
                "80/tcp": {},
                "8080/tcp": {},
                "8443/tcp": {},
                "9000/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "APACHE_PORT=11000",
                "APACHE_IP_BINDING=0.0.0.0",
                "NEXTCLOUD_DATADIR=/home/ubuntu/nextclouddados",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "PHPIZE_DEPS=autoconf \t\tdpkg-dev dpkg \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkgconf \t\tre2c",
                "PHP_INI_DIR=/usr/local/etc/php",
                "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_LDFLAGS=-Wl,-O1 -pie",
                "GPG_KEYS=39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A 1198C0117593497A5EC5C199286AF1F9897469DC",
                "PHP_VERSION=8.2.7",
                "PHP_URL=https://www.php.net/distributions/php-8.2.7.tar.xz",
                "PHP_ASC_URL=https://www.php.net/distributions/php-8.2.7.tar.xz.asc",
                "PHP_SHA256=4b9fb3dcd7184fe7582d7e44544ec7c5153852a2528de3b6754791258ffbdfa0"
            ],
            "Cmd": [
                "/usr/bin/supervisord",
                "-c",
                "/supervisord.conf"
            ],
            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "/healthcheck.sh"
                ]
            },
            "Image": "nextcloud/all-in-one:latest",
            "Volumes": null,
            "WorkingDir": "/var/www/docker-aio",
            "Entrypoint": [
                "/start.sh"
            ],
            "OnBuild": null,
            "Labels": {},
            "StopSignal": "SIGQUIT"
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "be1fec5ff4d6127c1e16bb7731b9a91dad048761141b1271f8b09732b034fde4",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/run/user/1000/docker/netns/be1fec5ff4d6",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "6d2068ccf3f508dbaa9988df6e88a0447e5fb0352ce3b39a18aa4e40f5899448",
                    "EndpointID": "",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
        }
    }
]

docker info

Client: Docker Engine - Community
 Version:    24.0.2
 Context:    rootless
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.5
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.18.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 3
 Server Version: 24.0.2
 Storage Driver: vfs
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  rootless
  cgroupns
 Kernel Version: 5.15.0-75-generic
 Operating System: Ubuntu 22.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 31.21GiB
 Name: nextcloud
 ID: 4a486c9b-750e-4858-8a8a-541e98a04ab0
 Docker Root Dir: /home/ubuntu/.local/share/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No cpu shares support
WARNING: No cpuset support
WARNING: No io.weight support
WARNING: No io.weight (per device) support
WARNING: No io.max (rbps) support
WARNING: No io.max (wbps) support
WARNING: No io.max (riops) support
WARNING: No io.max (wiops) support
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

docker ps --format “{{.Names}}” | grep “^nextcloud-aio-mastercontainer$”

nextcloud-aio-mastercontainer

This is interesting

Ah I think I know what happened. Did you install normal docker first which is still running and then decided to install docker rootless afterwards? Apparently normal docker is still running which is mounted into the mastercontainer. However the container itself runs in rootless docker. Thus it obviously cannot find itself because it does not exist in normal docker but only in rootles docker.

Please follow all-in-one/docker-rootless.md at main · nextcloud/all-in-one · GitHub if you want to run AIO with rootless docker.

I was also reading on that… didn’t do anything different, just installed docker from the shell like it says on the aio instructions…
curl -fsSL https://get.docker.com | sudo sh

I then followed the post install docker steps to add my user to sudo users and docker group so I don’t need to use sudo with all docker commands

hmmm but I did have to chmod to docker.sock bc I was having access denied errors