New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind mount source path does not exist: /captain #352

Closed
bootsie123 opened this Issue Jan 22, 2019 · 16 comments

Comments

Projects
None yet
2 participants
@bootsie123
Copy link

bootsie123 commented Jan 22, 2019

Hi. For some reason after I run the docker run command for caprover the output finishes and the swarm is setup, but when I go to myserverip:3000 I don't get a connection. I checked the output by running

docker service ps captain-captain --no-trunc

and I get the following output

iu7lzrxozyy2zkui6awvakbm2 _ captain-captain.1 dockersaturn/captainduckduck:0.7.3 caprover Shutdown Rejected 24 seconds ago "invalid mount config for type "bind": bind mount source path does not exist: /captain"

here's the command I'm using for docker

mkdir /captain && docker run -e MAIN_NODE_IP_ADDRESS='192.168.1.20' -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -v /captain caprover/caprover

I have also tried to add

-v /captain:/captain

but I run into another issue

docker: Error response from daemon: error while creating mount source path '/captain': mkdir /captain: read-only file system. ERRO[0000] error waiting for container: context canceled

Specs: (Running on a VM, specs can be changed)

OS: Ubuntu 18.10
Kernal: 4.18.0-13-generic
RAM: 2GB
STORAGE: 32GB

Let me know if you need any other logs or anything. Thanks for helping!

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Jan 22, 2019

Where did you get your installation script from? It's wrong. If you get it from the docs somewhere, please let me know so I can fix the doc. There shouldn't be any -v option in the script. CapRover installation script automatically adds this volume.

This is the correct script:

 mkdir /captain && docker run -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock caprover/caprover

If you want to set your MAIN_NODE_IP_ADDRESS, then just add that:

 mkdir /captain && docker run -e MAIN_NODE_IP_ADDRESS='192.168.1.20' -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock caprover/caprover

Before you try re-installing using the correct script. Make sure to remove all the services and destroy the swarm and remove the /captain directory.

docker service rm $(docker service ls -q)
docker swarm leave --force
rm -rf /captain

Please update here if this doesn't work.

@bootsie123

This comment has been minimized.

Copy link
Author

bootsie123 commented Jan 23, 2019

Hi. I probably should have looked more closely at what I put before I posted this. The -v /captain was there from when I was testing and trying different ways to see if I can fix it. I will however try what you are proposing again when I get a chance to. It might be because of the way I'm shutting docker down as I have tried it without the -v /captain and the rest the same.

@bootsie123

This comment has been minimized.

Copy link
Author

bootsie123 commented Jan 24, 2019

Ran it again just to make sure. Still the same problem.

invalid mount config for type "bind": bind mount source path does not exist: /captain

using

mkdir /captain && docker run -e MAIN_NODE_IP_ADDRESS='192.168.1.20' -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock caprover/caprover

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Jan 24, 2019

Something on your system is causing the problem. I've tried this on play-with-docker.com and it works just fine.

I'll write up a few things for you to run so we can get to the bottom of this.

@bootsie123

This comment has been minimized.

Copy link
Author

bootsie123 commented Jan 24, 2019

Thanks! I'm using Proxmox to manage my VMs, although there shouldn't be any issues because of that. I tried to run caprover in a container, however, I ran into some issues with that.

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Jan 26, 2019

Is your VM an ubuntu box? I don't think Proxmox is an issue. As far as I know it just a VM manager.

Anyways, run this command and copy the output from debug-log.txt file here so we can find where the problem lies.

wget https://gist.githubusercontent.com/githubsaturn/14879083001ff9d4d0ed25cd8886ce84/raw/6e54a1a9d88f2617a9a702d01cce044c0a0d9f65/debug-captain-temp

chmod +x debug-captain-temp

./debug-captain-temp 192.168.1.20 |& tee -a debug-log.txt

ps: replace 192.168.1.20 with your local IP if this is not correct.

@bootsie123

This comment has been minimized.

Copy link
Author

bootsie123 commented Jan 26, 2019

Yes. The VM is running Ubuntu 18.10. Here's the output from debug-log.txt.

./debug-captain-temp: 7: ./debug-captain-temp: [[: not found
+ docker service ls -q
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
+ docker service rm
"docker service rm" requires at least 1 argument.
See 'docker service rm --help'.

Usage:  docker service rm SERVICE [SERVICE...]

Remove one or more services
+ docker swarm leave --force
Error response from daemon: This node is not part of a swarm
+ rm -rf /captain
+ docker system prune --force --all
Deleted Networks:
docker_gwbridge

Deleted Images:
untagged: nginx@sha256:385fbcf0f04621981df6c6f1abd896101eb61a439746ee2921b26abc78f45571
deleted: sha256:315798907716a51610bb3c270c191e0e61112b19aae9a3bb0c2a60c53d074750
deleted: sha256:58c613f2e077514f1ddabeb27afac3306bf535f92f09f3aaf54255d50311d236
deleted: sha256:d89f64f07e667cdf1edf171f6945a5f8a800fdde6cbac139fb6923ba1460292e
deleted: sha256:80a00f138ba8a296b602f5d034da08bcf70230947551e9b30dbf3068c097fdfa
deleted: sha256:7bff100f35cb359a368537bb07829b055fe8e0b1cb01085a3a628ae9c187c7b8

Total reclaimed space: 17.76MB
+ echo Debug Logs
Debug Logs
+ echo Services:
Services:
+ docker service ls
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
+ echo Containers:
Containers:
+ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
+ mkdir /captain
+ docker run -e MAIN_NODE_IP_ADDRESS=192.168.1.20 -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock caprover/caprover
Unable to find image 'caprover/caprover:latest' locally
latest: Pulling from caprover/caprover
cd8eada9c7bb: Pulling fs layer
c2677faec825: Pulling fs layer
fcce419a96b1: Pulling fs layer
045b51e26e75: Pulling fs layer
3b969ad6f147: Pulling fs layer
a81151df0bcd: Pulling fs layer
da110374024c: Pulling fs layer
382c7798d45f: Pulling fs layer
6e805957ac4b: Pulling fs layer
5e188b257521: Pulling fs layer
35394d391902: Pulling fs layer
830a3bf84ba5: Pulling fs layer
9c490782e5f3: Pulling fs layer
382c7798d45f: Waiting
6e805957ac4b: Waiting
5e188b257521: Waiting
35394d391902: Waiting
830a3bf84ba5: Waiting
9c490782e5f3: Waiting
045b51e26e75: Waiting
3b969ad6f147: Waiting
a81151df0bcd: Waiting
da110374024c: Waiting
fcce419a96b1: Verifying Checksum
fcce419a96b1: Download complete
c2677faec825: Download complete
cd8eada9c7bb: Verifying Checksum
cd8eada9c7bb: Download complete
a81151df0bcd: Download complete
045b51e26e75: Verifying Checksum
045b51e26e75: Download complete
382c7798d45f: Download complete
6e805957ac4b: Verifying Checksum
6e805957ac4b: Download complete
da110374024c: Download complete
cd8eada9c7bb: Pull complete
5e188b257521: Verifying Checksum
5e188b257521: Download complete
830a3bf84ba5: Verifying Checksum
830a3bf84ba5: Download complete
c2677faec825: Pull complete
fcce419a96b1: Pull complete
35394d391902: Verifying Checksum
35394d391902: Download complete
045b51e26e75: Pull complete
9c490782e5f3: Download complete
3b969ad6f147: Download complete
3b969ad6f147: Pull complete
a81151df0bcd: Pull complete
da110374024c: Pull complete
382c7798d45f: Pull complete
6e805957ac4b: Pull complete
5e188b257521: Pull complete
35394d391902: Pull complete
830a3bf84ba5: Pull complete
9c490782e5f3: Pull complete
Digest: sha256:e6756f5ac1c8f0f18855305726e023e49373ace5cf491eb6e7c7929ee8c000a0
Status: Downloaded newer image for caprover/caprover:latest

> caprover@0.0.0 start /usr/src/app
> node ./bin/www

Captain Starting ...
Installing Captain Service ...
 
 
 
 >>>> Checking System Compatibility <<<<
   Docker Version passed.
   Ubuntu detected.
   X86 CPU detected.
   Total RAM 2089 MB
�[36mJanuary 26th 2019, 2:50:25.167 pm    �[0mStarting swarm at 192.168.1.20:2377
Swarm started: fil314hld6e6gk5sspib3hq16
+ echo Sleeping for 10 seconds...
Sleeping for 10 seconds...
+ sleep 10s
+ echo Services:
Services:
+ docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE                     PORTS
r73d9xor6ehm        captain-captain     replicated          0/1                 caprover/caprover:1.0.0   *:3000->3000/tcp
+ echo Services PS:
Services PS:
+ docker service ps captain-captain --no-trunc
ID                          NAME                    IMAGE                     NODE                DESIRED STATE       CURRENT STATE                     ERROR                                                                                     PORTS
k8r7oaxuxnljq6bnto54tvi5s   captain-captain.1       caprover/caprover:1.0.0   caprover            Ready               Accepted less than a second ago                                                                                             
r6y5pacmxw4q8harx6e8u5eau    \_ captain-captain.1   caprover/caprover:1.0.0   caprover            Shutdown            Rejected 4 seconds ago            "invalid mount config for type "bind": bind mount source path does not exist: /captain"   
weeemv50253xjywyzzaqgouae    \_ captain-captain.1   caprover/caprover:1.0.0   caprover            Shutdown            Rejected 9 seconds ago            "invalid mount config for type "bind": bind mount source path does not exist: /captain"   
8zifjqgsuk3oly6qq7ti74jln    \_ captain-captain.1   caprover/caprover:1.0.0   caprover            Shutdown            Rejected 10 seconds ago           "invalid mount config for type "bind": bind mount source path does not exist: /captain"   
+ echo Inside /captain
Inside /captain
+ ls /captain
+ echo service inspect
service inspect
+ docker service inspect captain-captain
[
    {
        "ID": "r73d9xor6ehmczmhub800j16f",
        "Version": {
            "Index": 13
        },
        "CreatedAt": "2019-01-26T14:50:25.988318242Z",
        "UpdatedAt": "2019-01-26T14:50:26.00881547Z",
        "Spec": {
            "Name": "captain-captain",
            "Labels": {},
            "TaskTemplate": {
                "ContainerSpec": {
                    "Image": "caprover/caprover:1.0.0",
                    "Env": [
                        "IS_CAPTAIN_INSTANCE=1"
                    ],
                    "Mounts": [
                        {
                            "Type": "bind",
                            "Source": "/captain",
                            "Target": "/captain"
                        },
                        {
                            "Type": "bind",
                            "Source": "/var/run/docker.sock",
                            "Target": "/var/run/docker.sock"
                        }
                    ],
                    "StopGracePeriod": 10000000000,
                    "DNSConfig": {},
                    "Isolation": "default"
                },
                "Resources": {},
                "RestartPolicy": {
                    "Condition": "any",
                    "Delay": 5000000000,
                    "MaxAttempts": 0
                },
                "Placement": {
                    "Constraints": [
                        "node.id == fil314hld6e6gk5sspib3hq16"
                    ]
                },
                "LogDriver": {
                    "Name": "json-file",
                    "Options": {
                        "max-size": "512m"
                    }
                },
                "ForceUpdate": 0,
                "Runtime": "container"
            },
            "Mode": {
                "Replicated": {
                    "Replicas": 1
                }
            },
            "UpdateConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "stop-first"
            },
            "RollbackConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "stop-first"
            },
            "EndpointSpec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 3000,
                        "PublishedPort": 3000,
                        "PublishMode": "ingress"
                    }
                ]
            }
        },
        "Endpoint": {
            "Spec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 3000,
                        "PublishedPort": 3000,
                        "PublishMode": "ingress"
                    }
                ]
            },
            "Ports": [
                {
                    "Protocol": "tcp",
                    "TargetPort": 3000,
                    "PublishedPort": 3000,
                    "PublishMode": "ingress"
                }
            ],
            "VirtualIPs": [
                {
                    "NetworkID": "quebaeczh5ke7z9afyvkihmev",
                    "Addr": "10.255.0.3/16"
                }
            ]
        }
    }
]
+ echo Removing all services...
Removing all services...
+ docker service ls -q
+ docker service rm r73d9xor6ehm
r73d9xor6ehm
+ rm -rf /captain
+ docker system prune --force --all
Deleted Containers:
f994ce0012a47eb058bab7d0eafa988e2a513fd80f35d3e94a177a9a1c168946

Deleted Images:
untagged: caprover/caprover:1.0.0
untagged: caprover/caprover:latest
untagged: caprover/caprover@sha256:e6756f5ac1c8f0f18855305726e023e49373ace5cf491eb6e7c7929ee8c000a0
deleted: sha256:b7bcef596979d720f9765bf36cc92aaaa65dc7a01fba03754035998cb1dc9238
deleted: sha256:681054753391a3d25424295f93e8b8bbdb93a5c45898f64a29920b14ac586b59
deleted: sha256:9649c94bef77a295764ffd1c6ad385ddeb51090794025b15495b7a93b5b32fb9
deleted: sha256:2dd865e2b15c515bbd08bae685c3badbf98cc6e70c35daae736c13834794b2e5
deleted: sha256:d6f1fc166bb95a29d315852eef64b70b166779090809299d1eec68dea5f6d8a6
deleted: sha256:839b507fc2d8c366b4a65079912ea8db8b3caa2fd394192707f4593e55f5be3a
deleted: sha256:f136d4718bf0c6830e37e0a575fbabcf78f9fda7cd28a4fbc967093b27094f08
deleted: sha256:5d8c04f04abf864092408ca0709c152660f843053db912d29c88486677c4c033
deleted: sha256:fcbce87212c8968c15f833ee3feb396a2a27d2309017d480b11b24c9b1dc416d
deleted: sha256:2d723b33a3afa20316defb8ab52fcd6c90b25d17e1319a1985b2006a601e99f6
deleted: sha256:b20c1bb531c75f99c240f469c7faedb82ea992a4c6c8bf512f613e217b62b03d
deleted: sha256:d3fa036476471feaccc0c664b8dd71eafdd154549e7aea0d6e5c55a8ffd41d13
deleted: sha256:0b1d811cf3c047bf923946321a6f91ff2ae2011cb9ef59dff00dee9f98f9734f
deleted: sha256:c581f4ede92df7272da388a45126ddd2944a4eeb27d3b0d80ee71cd633761394

Total reclaimed space: 1.315GB
+ echo Services:
Services:
+ docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
+ echo Containers:
Containers:
+ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
+ echo Inside /captain before
Inside /captain before
+ ls /captain
ls: cannot access '/captain': No such file or directory
+ mkdir /captain
+ echo Inside /captain after
Inside /captain after
+ ls /captain
+ docker service create --name my-service --mount type=bind,source=/captain,destination=/captain nginx:alpine
em23ajafsqrsxumbrhkuf8646
overall progress: 0 out of 1 tasks
1/1:  
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
1/1: invalid mount config for type "bind": bind mount source path does not exis…
overall progress: 0 out of 1 tasks
@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Jan 26, 2019

Awesome! We are one step closer. So this is not a CapRover problem. Your system even fails to run:

 docker service create --name my-service --mount type=bind,source=/captain,destination=/captain nginx:alpine

Which is just a plain nginx image with a simple mapping. Seems like your disk mapping in your system confuses Docker. Let's write up a

Also, because your script got into an infinite loop, it didn't run the last few commands. Can you please run these commands manually and copy the output here:

docker service rm $(docker service ls -q)
docker swarm leave --force
rm -rf /captain
docker system prune --force --all


docker run --name my-service -d -v /captain:/captain nginx:alpine

echo "Sleeping for 10 seconds..."
sleep 10s

echo "Containers:"
docker ps -a

Meanwhile, I'll do some research do see if I find any hints on what could be the cause. Like I said, this is not a CapRover issue, but I still want to find the root cause and add it to troubleshooting section for future users. Thanks a lot for helping out!

PS:
Before doing the additional debugging script that I explained above, can you please run this? It "may" be the solution!

# First: Cleanup your system:
docker service rm $(docker service ls -q)
docker swarm leave --force
rm -rf /captain
docker system prune --force --all

# Next, run the installation command with one modification:
docker run -v /captain:/captain busybox && docker run -e MAIN_NODE_IP_ADDRESS=192.168.1.20 -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock caprover/caprover
@bootsie123

This comment has been minimized.

Copy link
Author

bootsie123 commented Jan 26, 2019

Thanks for helping out. I really appreciate it. Here's the output to the last couple commands that didn't run due to the infinite loop.


Remove one or more services
root@caprover:~# docker swarm leave --force

Error response from daemon: This node is not part of a swarm
root@caprover:~# rm -rf /captain
root@caprover:~# docker system prune --force --all
Deleted Containers:
fa81c2eb485c54e6b0d3bd3f7775d23de67d371c1d7219dc288fb2dbbccc717a

Deleted Images:
untagged: nginx:alpine
untagged: nginx@sha256:385fbcf0f04621981df6c6f1abd896101eb61a439746ee2921b26abc78f45571
deleted: sha256:315798907716a51610bb3c270c191e0e61112b19aae9a3bb0c2a60c53d074750
deleted: sha256:58c613f2e077514f1ddabeb27afac3306bf535f92f09f3aaf54255d50311d236
deleted: sha256:d89f64f07e667cdf1edf171f6945a5f8a800fdde6cbac139fb6923ba1460292e
deleted: sha256:80a00f138ba8a296b602f5d034da08bcf70230947551e9b30dbf3068c097fdfa
deleted: sha256:7bff100f35cb359a368537bb07829b055fe8e0b1cb01085a3a628ae9c187c7b8

Total reclaimed space: 17.76MB
root@caprover:~# clear
root@caprover:~# docker service rm $(docker service ls -q)
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
"docker service rm" requires at least 1 argument.
See 'docker service rm --help'.

Usage:  docker service rm SERVICE [SERVICE...]

Remove one or more services
root@caprover:~# docker swarm leave --force
Error response from daemon: This node is not part of a swarm
root@caprover:~# rm -rf /captain
root@caprover:~# docker system prune --force --all
Total reclaimed space: 0B
root@caprover:~#
root@caprover:~#
root@caprover:~# docker run --name my-service -d -v /captain:/captain nginx:alpine
Unable to find image 'nginx:alpine' locally
alpine: Pulling from library/nginx
cd784148e348: Pull complete
6e3058b2db8a: Pull complete
7ca4d29669c1: Pull complete
a14cf6997716: Pull complete
Digest: sha256:385fbcf0f04621981df6c6f1abd896101eb61a439746ee2921b26abc78f45571
Status: Downloaded newer image for nginx:alpine
e7931aacda307ccd3263872049fd014d8e87e5fda2de0f0ec8d18c28354fdf93
docker: Error response from daemon: error while creating mount source path '/captain': mkdir /captain: read-only file system.
root@caprover:~#
root@caprover:~# echo "Sleeping for 10 seconds..."
Sleeping for 10 seconds...
root@caprover:~# sleep 10s
root@caprover:~#
root@caprover:~# echo "Containers:"
Containers:
root@caprover:~# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
e7931aacda30        nginx:alpine        "nginx -g 'daemon of…"   24 seconds ago      Created             80/tcp              my-service

and here's the output from the modified installation command

docker: Error response from daemon: error while creating mount source path '/captain': mkdir /captain: read-only file system. ERRO[0003] error waiting for container: context canceled

It looks like it's pretty much the same issue causing it. I'll start doing some researching of my own to see if I can find a solution.

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Jan 26, 2019

It seems to be a bug with Docker: moby/moby#34427

Either it's a bug with Docker, or your Docker installation is non-standard and does not have root access.

I'd recommend posting an issue on (Docker) moby's issues here: https://github.com/moby/moby/issues with all details about your setup, VM, disk mappings and etc. Make sure to copy this last output:

docker run -v /captain:/captain busybox

     docker: Error response from daemon: error while creating mount source path '/captain': mkdir /captain: read-only file system. ERRO[0003] error waiting for container: context canceled
@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Jan 26, 2019

Also, please link this issue so we can reference it. Docker team will probably ask for more details.

@bootsie123

This comment has been minimized.

Copy link
Author

bootsie123 commented Jan 26, 2019

Will do. Thanks for your help!

@bootsie123

This comment has been minimized.

Copy link
Author

bootsie123 commented Jan 26, 2019

Completely unrelated issue, but I got docker working in a container with Proxmox. However, now I'm running into another issue.

mkdir /captain && docker run -e "MAIN_NODE_IP_ADDRESS=192.168.1.111" -e BY_PASS_PROXY_CHECK='TRUE' -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock caprover/caprover

Starts up fine, however after checking docker service ps captain-captain --no-trunc I get an error.

error creating external connectivity network: cannot restrict inter-container communication: please ensure that br_netfilter kernel module is loaded

I'm currently looking into some solutions for this.

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Jan 26, 2019

It's a kernel issue. Some linux distributions have particular kernel modules disabled for "optimization" purposes and it breaks Docker. Have a look at this: #269

@bootsie123

This comment has been minimized.

Copy link
Author

bootsie123 commented Jan 26, 2019

Hm. It seems that I don't even have the br_netfilter kernel module. I'm gonna try this on a fresh Ubuntu 16.04 VM and see if that works. If not, I'll stop by the Docker team.

@bootsie123

This comment has been minimized.

Copy link
Author

bootsie123 commented Jan 27, 2019

Interesting. That surprisingly worked on a fresh installed Ubuntu 16.04 VM.

@bootsie123 bootsie123 closed this Jan 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment