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

fin share cannot find web container #1758

Open
mike-potter opened this issue Feb 23, 2023 · 2 comments
Open

fin share cannot find web container #1758

mike-potter opened this issue Feb 23, 2023 · 2 comments

Comments

@mike-potter
Copy link

Description

When I try using fin share I get the error:
" ERROR: Could not find running web container in this project"

even though fin ps shows:

❯ fin ps
NAME                COMMAND                  SERVICE             STATUS              PORTS
demo_cli_1          "/opt/startup.sh sup…"   cli                 running (healthy)   9000/tcp
demo_db_1           "docker-entrypoint.s…"   db                  running (healthy)   0.0.0.0:58607->3306/tcp
demo_solr_1         "docker-entrypoint.s…"   solr                running             0.0.0.0:8993->8983/tcp
demo_web_1          "httpd-foreground"       web                 running (healthy)   443/tcp

which shows that there IS a running web container.

I saw another thread talking about how fin share doesn't work with wildcard virtual hosts. And I see the virtual host (from fin config) like this:

io.docksal.virtual-host: demo.docksal.site,*.demo.docksal.site,demo.docksal.site.*

which might be related. But in my docksal.env file I only have this:

VIRTUAL_HOST=demo.docksal.site

so don't see how to remove those other wildcards.

I'm not on the absolute latest version of Docksal or Docker Desktop so maybe this is already fixed, but interested in how to debug or fix this in the existing version since this is an issue across several of our devs and projects. It's been a long time since I last tried using fin share so don't really know when it broke.

Output of fin config:

fin config output
---------------------
COMPOSE_PROJECT_NAME_SAFE: demo
COMPOSE_FILE:
/Users/michaelpotter/.docksal/stacks/volumes-none.yml
/Users/michaelpotter/.docksal/stacks/stack-default.yml
/Users/michaelpotter/Projects/demo/.docksal/docksal.yml
ENV_FILE:
/Users/michaelpotter/Projects/demo/.docksal/docksal.env
/Users/michaelpotter/Projects/demo/.docksal/docksal-local.env

PROJECT_ROOT: /Users/michaelpotter/Projects/demo
DOCROOT: docroot
VIRTUAL_HOST: demo.docksal.site
VIRTUAL_HOST_ALIASES: *.demo.docksal.site
IP: 192.168.64.100

MySQL endpoint:
Public URL:

Docker Compose configuration
---------------------
services:
  cli:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    environment:
      **redacted**
    expose:
    - "6006"
    - "6006"
    extends:
      file: /Users/michaelpotter/.docksal/stacks/services.yml
      service: cli
    hostname: cli
    healthcheck:
      interval: 10s
    image: phase2/docker-cli:php8.1
    labels:
      io.docksal.shell: bash
      io.docksal.user: docker
      io.docksal.virtual-host: design.demo.docksal.site
      io.docksal.virtual-port: "6006"
    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/demo
      target: /tmp/.docksal/demo
      read_only: true
      bind:
        create_host_path: true
    - type: volume
      source: project_root
      target: /var/www
      volume:
        nocopy: true
    - type: volume
      source: cmsfiles
      target: /var/www/files
      volume:
        nocopy: true
  db:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    environment:
      **redacted**
    extends:
      file: /Users/michaelpotter/.docksal/stacks/services.yml
      service: db
    hostname: db
    healthcheck:
      interval: 10s
    image: docksal/mysql:5.7
    logging:
      options:
        max-file: "10"
        max-size: 1m
    networks:
      default: null
    ports:
    - mode: ingress
      target: 3306
      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
  solr:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    extends:
      file: /Users/michaelpotter/.docksal/stacks/services.yml
      service: solr
    hostname: solr
    healthcheck:
      interval: 10s
    image: solr:8.3
    labels:
      io.docksal.cert-name: none
      io.docksal.virtual-host: solr.demo.docksal.site,solr.demo.docksal.site.*
      io.docksal.virtual-port: "8983"
    logging:
      options:
        max-file: "10"
        max-size: 1m
    networks:
      default: null
    ports:
    - mode: ingress
      target: 8983
      published: 8993
      protocol: tcp
    volumes:
    - type: volume
      source: solr_data
      target: /var/solr
      volume: {}
    - type: bind
      source: /Users/michaelpotter/Projects/demo/project/env/solr
      target: /var/solr/data
      bind:
        create_host_path: true
    - 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
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    environment:
      **redacted**
    extends:
      file: /Users/michaelpotter/.docksal/stacks/services.yml
      service: web
    hostname: web
    healthcheck:
      interval: 10s
    image: docksal/apache:2.4
    labels:
      io.docksal.cert-name: none
      io.docksal.permanent: "false"
      io.docksal.project-root: /Users/michaelpotter/Projects/demo
      io.docksal.virtual-host: demo.docksal.site,*.demo.docksal.site,demo.docksal.site.*
    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
    - type: volume
      source: cmsfiles
      target: /var/www/files
      volume:
        nocopy: true
networks:
  default:
    name: demo_default
volumes:
  cli_home:
    name: demo_cli_home
  cmsfiles:
    name: demo_cmsfiles
  db_data:
    name: demo_db_data
  docksal_ssh_agent:
    name: docksal_ssh_agent
    external: true
  project_root:
    name: demo_project_root
  solr_data:
    name: demo_solr_data
---------------------

Output of fin sysinfo:

fin sysinfo output
███  DOCKSAL
Docksal version: v1.17.0
fin version:     1.110.1

███  OS
Darwin macOS 12.6
Darwin Mike-Potter 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 x86_64

███  ENVIRONMENT
MODE : Docker Desktop
DOCKER_HOST : 

███  NFS
DOCKSAL_NFS_PATH : /Users

nfsd service is enabled
nfsd is running (pid 260, 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.12
Expected server version: 20.10.12

Installed versions:

Client:
Version:           20.10.12
API version:       1.41
Go version:        go1.16.12
Git commit:        e91ed57
Built:             Mon Dec 13 11:46:56 2021
OS/Arch:           darwin/amd64
Context:           default
Experimental:      true

Server: Docker Desktop 4.12.0 (85629)
Engine:
Version:          20.10.17
API version:      1.41 (minimum version 1.12)
Go version:       go1.17.11
Git commit:       a89b842
Built:            Mon Jun  6 23:01:23 2022
OS/Arch:          linux/amd64
Experimental:     true
containerd:
Version:          1.6.8
GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc:
Version:          1.1.4
GitCommit:        v1.1.4-0-g5fd4c4d
docker-init:
Version:          0.19.0
GitCommit:        de40ad0

███  DOCKER COMPOSE
Expected version:  2.1.0
Installed version: v2.1.0

███  DOCKSAL: PROJECTS
project          STATUS                       virtual host                                                                               project root
demo             Up 30 seconds (healthy)      demo.docksal.site,*.demo.docksal.site,demo.docksal.site.*                                  /Users/michaelpotter/Projects/demo

███  DOCKSAL: VIRTUAL HOSTS
*.demo.docksal.site
demo.docksal.site.*
demo.docksal.site
design.demo.docksal.site
solr.demo.docksal.site.*
solr.demo.docksal.site

███  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:    FAIL
Container to 192.168.64.1:      FAIL

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

Debug info:
----------
+ cat /etc/resolv.conf
+ grep 192.168.64.100
+ ping -c 1 -W 1 dns-test.docksal
ping: cannot resolve dns-test.docksal: Unknown host
+ nslookup -timeout=1 dns-test.docksal 192.168.64.100
;; connection timed out; no servers could be reached

+ set +x
----------

Containers: FAIL

███  DOCKER: RUNNING CONTAINERS
CONTAINER ID   IMAGE                      COMMAND                  CREATED              STATUS                        PORTS                                            NAMES
79871cde3f8e   docksal/apache:2.4         "httpd-foreground"       About a minute ago   Up About a minute (healthy)   80/tcp, 443/tcp                                  demo_web_1
53e74a6beefd   phase2/docker-cli:php8.1   "/opt/startup.sh sup…"   About a minute ago   Up About a minute (healthy)   22/tcp, 3000/tcp, 6006/tcp, 9000/tcp             demo_cli_1
4f428149e572   solr:8.3                   "docker-entrypoint.s…"   2 months ago         Up About a minute             0.0.0.0:8993->8983/tcp                           demo_solr_1
28723097b391   docksal/mysql:5.7          "docker-entrypoint.s…"   2 months ago         Up About a minute (healthy)   33060/tcp, 0.0.0.0:58607->3306/tcp               demo_db_1

███  DOCKER: NETWORKS
NETWORK ID     NAME                     DRIVER    SCOPE
ed5e46220f39   _default                 bridge    local
6ed307f8efa1   bridge                   bridge    local
58ddea0947db   demo_default             bridge    local
4c22f0b10676   docker_gwbridge          bridge    local
565cb66920ab   host                     host      local
eb62cb6479ca   none                     null      local

███  DOCKER DESKTOP
EXPECTED VERSION: 4.4.2
DETECTED VERSION: 4.12.0

███  HDD Usage
Filesystem       Size   Used  Avail Capacity  iused      ifree %iused  Mounted on
/dev/disk1s1s1  932Gi   20Gi  233Gi     9%   502068 2440798840    0%   /
devfs           197Ki  197Ki    0Bi   100%      680          0  100%   /dev
/dev/disk1s5    932Gi   23Gi  233Gi     9%       23 2440798840    0%   /System/Volumes/VM
/dev/disk1s3    932Gi  381Mi  233Gi     1%     2310 2440798840    0%   /System/Volumes/Preboot
/dev/disk1s6    932Gi  104Mi  233Gi     1%      466 2440798840    0%   /System/Volumes/Update
/dev/disk1s2    932Gi  654Gi  233Gi    74% 12042788 2440798840    0%   /System/Volumes/Data
map auto_home     0Bi    0Bi    0Bi   100%        0          0  100%   /System/Volumes/Data/home
/dev/disk1s1    932Gi   20Gi  233Gi     9%   502146 2440798840    0%   /System/Volumes/Update/mnt1
@lmakarov
Copy link
Member

@mike-potter try fin share-v2 and see if it works for you?

❯ fin help share-v2

Create a temporary public URL for the project using Cloudflare Tunnel

Usage: share-v2 [command]

Commands:
  start                    	Start tunnel and print public URL
  stop                     	Stop tunnel
  status                   	Prints tunnel status and public URL (if Active)
  url                      	Prints tunnel public URL
  logs                     	Prints tunnel container logs

Examples:
  fin share-v2 start       	Start tunnel and print public URL

@mike-potter
Copy link
Author

mike-potter commented Feb 27, 2023

When I visit the URL from fin share-v2 start I get this error:

Error 1033 Ray ID: 7a02365777202b75 • 2023-02-27 16:14:13 UTC
Argo Tunnel error
What happened?
You've requested a page on a website (sales-complement-photo-presidential.trycloudflare.com) that is on the [Cloudflare](https://www.cloudflare.com/5xx-error-landing/) network. The host (sales-complement-photo-presidential.trycloudflare.com) is configured as an Argo Tunnel, and Cloudflare is currently unable to resolve it.

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