Skip to content
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

error while mounting volume connection refused #1778

Open
tomalphacred opened this issue May 26, 2023 · 3 comments
Open

error while mounting volume connection refused #1778

tomalphacred opened this issue May 26, 2023 · 3 comments

Comments

@tomalphacred
Copy link

Hi,
I've an issue when trying to run a Docksal project. Same result for a D7 boiler plate test.

Description

can not start the project using drupal10 boiler plate. I guess there is something that prevents address 192.168.64.1 to be reached but what... ?

Steps to reproduce the issue:

  1. fin start

Describe the results you received:

fin start
(Re)creating resources...
Connected vhost-proxy to "d10_default" network.
Starting services...
[+] Running 0/2
⠙ Container d10_cli_1 Starting 0.1s
⠙ Container d10_db_1 Starting 0.1s
Error response from daemon: error while mounting volume '/var/lib/docker/volumes/d10_project_root/_data': failed to mount local volume: mount :/Users/thomas/Projects/myproject/d10:/var/lib/docker/volumes/d10_project_root/_data, flags: 0xc00, data: addr=192.168.64.1,vers=3,nolock,noacl,nocto,actimeo=1,wsize=32768,rsize=32768: connection refused

Describe the results you expected:

Expected behavior...

Output of fin config:

fin config output
---------------------
COMPOSE_PROJECT_NAME_SAFE: d10
COMPOSE_FILE:
/Users/thomas/.docksal/stacks/volumes-nfs.yml
/Users/thomas/.docksal/stacks/stack-default.yml
/Users/thomas/Projects/myproject/d10/.docksal/docksal.yml
ENV_FILE:
/Users/thomas/Projects/myproject/d10/.docksal/docksal.env

PROJECT_ROOT: /Users/thomas/Projects/myproject/d10
DOCROOT: web
VIRTUAL_HOST: d10.docksal
VIRTUAL_HOST_ALIASES: *.d10.docksal
IP: 192.168.64.100

MySQL endpoint:
Public URL:

Docker Compose configuration
---------------------
name: d10
services:
  cli:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    environment:
      BLACKFIRE_CLIENT_ID: null
      BLACKFIRE_CLIENT_TOKEN: null
      COMPOSER_ALLOW_XDEBUG: "0"
      COMPOSER_DEFAULT_VERSION: null
      COMPOSER_DISABLE_XDEBUG_WARN: "0"
      DOCROOT: web
      DRUSH_ALLOW_XDEBUG: "0"
      DRUSH_OPTIONS_URI: d10.docksal
      GIT_USER_EMAIL: ""
      GIT_USER_NAME: ""
      HOST_GID: "20"
      HOST_UID: "501"
      MYSQL_DATABASE: default
      MYSQL_HOST: db
      MYSQL_PASSWORD: user
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: user
      PHP_IDE_CONFIG: null
      SECRET_ACQUIA_CLI_KEY: null
      SECRET_ACQUIA_CLI_SECRET: null
      SECRET_PLATFORMSH_CLI_TOKEN: null
      SECRET_SSH_PRIVATE_KEY: null
      SECRET_TERMINUS_TOKEN: null
      SSH_AUTH_SOCK: /.ssh-agent/proxy-socket
      VIRTUAL_HOST: d10.docksal
      XDEBUG_CONFIG: client_host=192.168.64.1
      XDEBUG_ENABLED: "0"
    extends:
      file: /Users/thomas/.docksal/stacks/services.yml
      service: cli
    hostname: cli
    healthcheck:
      interval: 10s
    image: docker.artifactory-dogen.group.echonet/docksal/cli:php8.1-3.2
    labels:
      io.docksal.shell: bash
      io.docksal.user: docker
    logging:
      options:
        max-file: "10"
        max-size: 1m
    networks:
      default: null
    volumes:
    - type: volume
      source: docksal_ssh_agent
      target: /.ssh-agent
      read_only: true
      volume: {}
    - type: volume
      source: cli_home
      target: /home/docker
      volume: {}
    - type: bind
      source: /tmp/.docksal/d10
      target: /tmp/.docksal/d10
      read_only: true
      bind:
        create_host_path: true
    - type: volume
      source: project_root
      target: /var/www
      volume:
        nocopy: true
  db:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: null
      MYSQL_DATABASE: default
      MYSQL_INITDB_SKIP_TZINFO: null
      MYSQL_ONETIME_PASSWORD: null
      MYSQL_PASSWORD: user
      MYSQL_RANDOM_ROOT_PASSWORD: null
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: user
    extends:
      file: /Users/thomas/.docksal/stacks/services.yml
      service: mariadb
    hostname: db
    healthcheck:
      interval: 10s
    image: docker.artifactory-dogen.group.echonet/docksal/mariadb:10.6-1.3
    logging:
      options:
        max-file: "10"
        max-size: 1m
    networks:
      default: null
    ports:
    - mode: ingress
      target: 3306
      published: "0"
      protocol: tcp
    volumes:
    - type: volume
      source: db_data
      target: /var/lib/mysql
      volume: {}
    - type: volume
      source: project_root
      target: /var/www
      read_only: true
      volume:
        nocopy: true
  web:
    depends_on:
      cli:
        condition: service_started
    dns:
    - 192.168.64.100
    - 8.8.8.8
    environment:
      APACHE_BASIC_AUTH_PASS: null
      APACHE_BASIC_AUTH_USER: null
      APACHE_DOCUMENTROOT: /var/www/web
      APACHE_FCGI_HOST_PORT: cli:9000
    extends:
      file: /Users/thomas/.docksal/stacks/services.yml
      service: apache
    hostname: web
    healthcheck:
      interval: 10s
    image: docker.artifactory-dogen.group.echonet/docksal/apache:2.4-2.5
    labels:
      io.docksal.cert-name: none
      io.docksal.permanent: "false"
      io.docksal.project-root: /Users/thomas/Projects/myproject/d10
      io.docksal.virtual-host: d10.docksal,*.d10.docksal,d10.docksal.*
    logging:
      options:
        max-file: "10"
        max-size: 1m
    networks:
      default: null
    volumes:
    - type: volume
      source: project_root
      target: /var/www
      read_only: true
      volume:
        nocopy: true
networks:
  default:
    name: d10_default
volumes:
  cli_home:
    name: d10_cli_home
  db_data:
    name: d10_db_data
  docksal_ssh_agent:
    name: docksal_ssh_agent
    external: true
  project_root:
    name: d10_project_root
    driver: local
    driver_opts:
      device: :/Users/thomas/Projects/myproject/d10
      o: addr=192.168.64.1,vers=3,nolock,noacl,nocto,noatime,nodiratime,actimeo=1,wsize=32768,rsize=32768
      type: nfs


Output of fin sysinfo:

fin sysinfo output
███  DOCKSAL
Docksal version: v1.18.2
fin version:     v1.113.2

███  OS
Darwin macOS 13.3.1
Darwin bruwxn252739 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64

███  ENVIRONMENT
MODE : Docker Desktop
DOCKER_HOST : 

███  NFS
DOCKSAL_NFS_PATH : /Users

nfsd service is enabled
nfsd is running (pid 407, 8 threads)

NFS EXPORTS
----------

# <ds-nfs docksal
/Users 127.0.0.1 192.168.64.1 -alldirs -maproot=0:0
# ds-nfs>
----------

Exports list on localhost:
/Users                              127.0.0.1 192.168.64.1

███  DOCKER
Expected client version: 20.10.23
Expected server version: 20.10.23

Installed versions:

Client:
Version:           20.10.23
API version:       1.41
Go version:        go1.18.10
Git commit:        7155243
Built:             Thu Jan 19 17:35:19 2023
OS/Arch:           darwin/arm64
Context:           default
Experimental:      true

Server: Docker Desktop 4.19.0 (106363)
Engine:
Version:          23.0.5
API version:      1.42 (minimum version 1.12)
Go version:       go1.19.8
Git commit:       94d3ad6
Built:            Wed Apr 26 16:17:14 2023
OS/Arch:          linux/arm64
Experimental:     false
containerd:
Version:          1.6.20
GitCommit:        2806fc1057397dbaeefbea0e4e17bddfbd388f38
runc:
Version:          1.1.5
GitCommit:        v1.1.5-0-gf19387a
docker-init:
Version:          0.19.0
GitCommit:        de40ad0

███  DOCKER COMPOSE
Expected version:  2.15.1
Installed version: 2.15.1

███  DOCKSAL: PROJECTS
project   STATUS    virtual host                              project root
d10       Created   d10.docksal,*.d10.docksal,d10.docksal.*   /Users/thomas/Projects/myproject/d10
d7        Created   d7.docksal,*.d7.docksal,d7.docksal.*      /Users/thomas/Projects/myproject/d7

███  DOCKSAL: VIRTUAL HOSTS

███  DOCKSAL: NETWORKING

DOCKSAL_IP: 192.168.64.100
DOCKSAL_HOST_IP: 192.168.64.1
DOCKSAL_VHOST_PROXY_IP: 0.0.0.0
DOCKSAL_DNS_IP: 0.0.0.0
DOCKSAL_DNS_DISABLED: 0
DOCKSAL_NO_DNS_RESOLVER: 0
DOCKSAL_DNS_UPSTREAM: 
DOCKSAL_DNS_DOMAIN: docksal

███  DOCKSAL: CONNECTIVITY

Host to 192.168.64.100: 	PASS
Container to 192.168.64.100: 	PASS
Container to 192.168.64.1: 	PASS

Checking connectivity to http://dns-test.docksal...
Host: PASS
Containers: FAIL

███  DOCKER: RUNNING CONTAINERS
CONTAINER ID   IMAGE                               COMMAND                  CREATED             STATUS                       PORTS                                      NAMES
5a2ed58ae68f   docksal/ssh-agent:1.4               "docker-entrypoint.s…"   12 minutes ago      Up 12 minutes (healthy)                                                 docksal-ssh-agent
d77919c49774   docksal/dns:1.2                     "docker-entrypoint.s…"   12 minutes ago      Up 12 minutes (healthy)      0.0.0.0:53->53/udp                         docksal-dns
66ec3448dd9e   docksal/vhost-proxy:1.8             "docker-entrypoint.s…"   12 minutes ago      Up 12 minutes (healthy)      0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   docksal-vhost-proxy
1e77877ddb3d   drud/ddev-ssh-agent:v1.21.5-built   "/entry.sh ssh-agent"    About an hour ago   Up About an hour (healthy)                                              ddev-ssh-agent

███  DOCKER: NETWORKS
NETWORK ID     NAME           DRIVER    SCOPE
3eaee9f8ca47   _default       bridge    local
d1f545531163   bridge         bridge    local
7a1e0cb222d2   d7_default     bridge    local
a81174cc58a7   d10_default    bridge    local
626c610bb462   ddev_default   bridge    local
0cd5c0b8f5ee   host           host      local
4f042128c830   none           null      local

███  DOCKER DESKTOP
EXPECTED VERSION: 4.17.0
DETECTED VERSION: 4.19.0

███  HDD Usage
Filesystem       Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk3s1s1  460Gi  8.5Gi  391Gi     3%  356093 4097121240    0%   /
devfs           199Ki  199Ki    0Bi   100%     690          0  100%   /dev
/dev/disk3s6    460Gi   20Ki  391Gi     1%       0 4097121240    0%   /System/Volumes/VM
/dev/disk3s2    460Gi  4.5Gi  391Gi     2%     871 4097121240    0%   /System/Volumes/Preboot
/dev/disk3s4    460Gi  1.2Gi  391Gi     1%     706 4097121240    0%   /System/Volumes/Update
/dev/disk1s2    500Mi  6.0Mi  480Mi     2%       1    4916560    0%   /System/Volumes/xarts
/dev/disk1s1    500Mi  6.2Mi  480Mi     2%      30    4916560    0%   /System/Volumes/iSCPreboot
/dev/disk1s3    500Mi  2.9Mi  480Mi     1%      50    4916560    0%   /System/Volumes/Hardware
/dev/disk3s5    460Gi   55Gi  391Gi    13%  486412 4097121240    0%   /System/Volumes/Data
map auto_home     0Bi    0Bi    0Bi   100%       0          0  100%   /System/Volumes/Data/home
@lmakarov
Copy link
Member

lmakarov commented Jun 2, 2023

It seems like your Mac's firewall is blocking access to the NFS server o your Mac.

Try disabling the firewall or adjusting its settings. See docs here for details:
https://docs.docksal.io/troubleshooting/common-issues/#issue-15-firewall-blocking-access-to-docksal

Let me know if this does not does not help.

@tomalphacred
Copy link
Author

tomalphacred commented Jun 2, 2023

Hi,
This was related to NFS, no clue exactly why but when I changed to "bind" it worked

fin config set DOCKSAL_VOLUMES=bind
fin project reset

@lmakarov
Copy link
Member

lmakarov commented Jun 5, 2023

bind volume mode on Mac provides poor performance due to the underlying file system sharing approach use by Docker Desktop. You will see much better performance with NFS (when it works). Have you tried fine tuning or disabling the firewall?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants