docksal: cannot setup Blackfire with Docksal

Description Based on https://docs.docksal.io/tools/blackfire/ I am trying to setup Blackfire in Docksal

Steps to reproduce the issue:

fin config set --global BLACKFIRE_CLIENT_ID=<blackfire-client-id>
fin config set --global BLACKFIRE_CLIENT_TOKEN=<blackfire-client-token>
fin config set --global BLACKFIRE_SERVER_ID=<blackfire-server-id>
fin config set --global BLACKFIRE_SERVER_TOKEN=<blackfire-server-token>
  1. Add the blackfire service under the services section in .docksal/docksal.yml based on : https://github.com/docksal/docksal/blob/develop/stacks/services.yml
# Blackfire
  blackfire:
    extends:
      file: ${HOME}/.docksal/stacks/services.yml
      service: blackfire
  1. stacks/services.yml content:
version: "2.1"

services:
  # Blackfire
  blackfire:
    image: blackfire/blackfire
    environment:
      - BLACKFIRE_SERVER_ID
      - BLACKFIRE_SERVER_TOKEN

Describe the results you received: error in browser, when I try to profile:

Are You Authorized to Profile this Page? Probe Not Found or Invalid signature.

Results…

Describe the results you expected: to be able to profile

Expected behavior… Profiling my Docksal project

Output of fin config:

fin config output
fin config
 ALERT:  Some Docksal services were not running
         Restarting Docksal system services...
Configuring network settings...
Password:
Sorry, try again.
Password:
Resetting Docksal services...
 ➔ proxy
 ➔ dns
   upstream 10.8.8.8
Enabling automatic *.docksal DNS resolver...
Clearing DNS cache...
 ➔ ssh-agent
Identity added: id_rsa (id_rsa)
---------------------
COMPOSE_PROJECT_NAME_SAFE: benefitsapi
COMPOSE_FILE:
/Users/syedahmed/.docksal/stacks/overrides-osxfs.yml
/Users/syedahmed/.docksal/stacks/volumes-bind.yml
/Users/syedahmed/Downloads/BenefitsAPI/.docksal/docksal.yml
ENV_FILE:
/Users/syedahmed/Downloads/BenefitsAPI/.docksal/docksal.env

PROJECT_ROOT: /Users/syedahmed/Downloads/BenefitsAPI
DOCROOT: web
VIRTUAL_HOST: api.benefits.docksal
VIRTUAL_HOST_ALIASES: *.api.benefits.docksal
IP: 192.168.64.100
MYSQL:

Docker Compose configuration
---------------------
services:
  blackfire:
    environment:
      BLACKFIRE_SERVER_ID: eabcf*****f6dca
      BLACKFIRE_SERVER_TOKEN: 68851*****b8746
    image: blackfire/blackfire
  cli:
    command: supervisord
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    entrypoint:
    - bash
    - /entrypoint_docksal
    environment:
      APPLICATION_GID: '20'
      APPLICATION_UID: '501'
      AZURE_CONTAINER_REGISTRY: '"ddphub"'
      AZURE_FILE_SHARE_URI: '"https://bgk8scluster.file.core.windows.net/bg-staging-api"'
      AZURE_KEY_VAULT: '"benefitsgov"'
      AZURE_MYSQL_DATABASE: '"bg-staging--api"'
      AZURE_MYSQL_HOST: '"benefitsgov.mysql.database.azure.com"'
      AZURE_MYSQL_PORT: '"3306"'
      AZURE_STORAGE_ACCOUNT: '"bgk8scluster"'
      BLACKFIRE_CLIENT_ID: '"65c34c4b-b80f-441f-8c44-593035d0f663"'
      BLACKFIRE_CLIENT_TOKEN: '"e6f1e411949be393dc5b3d5c500992bab71d6e1f1fabd0e3675e4700180a5645"'
      BLACKFIRE_SERVER_ID: '"eabcf998-3d7f-4378-af9d-1cc0b30f6dca"'
      BLACKFIRE_SERVER_TOKEN: '"6885150070dfbefece0e27fa2d1e1ef7ca007807a40ebd9bb268514fcc3b8746"'
      CRON_API: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      DOCROOT: web
      HOST_GID: '20'
      HOST_UID: '501'
      K8S_NAMESPACE: local
      MIGRATE_DATABASE: local--benefits
      MYSQL_DATABASE: default
      MYSQL_HOST: db
      MYSQL_PASSWORD: user
      MYSQL_PORT_MAPPING: '''0:3306'''
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: user
      PROJECT_ROOT: /var/www
      REDIS_HOST: redis
      REDIS_KEY: redis
      SALT_API: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      VIRTUAL_HOST: api.benefits.docksal
      XDEBUG_ENABLED: '0'
    hostname: cli
    image: ddphub.azurecr.io/bg/api:latest
    networks:
      default:
        aliases:
        - drupal
    volumes:
    - docksal_ssh_agent:/.ssh-agent:ro
    - /Users/syedahmed/Downloads/BenefitsAPI/.docksal/etc/bin/entrypoint_docksal:/entrypoint_docksal:ro
    - project_root:/var/www:rw,nocopy
    working_dir: /var/www/web
  db:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    environment:
      AZURE_CONTAINER_REGISTRY: '"ddphub"'
      AZURE_FILE_SHARE_URI: '"https://bgk8scluster.file.core.windows.net/bg-staging-api"'
      AZURE_KEY_VAULT: '"benefitsgov"'
      AZURE_MYSQL_DATABASE: '"bg-staging--api"'
      AZURE_MYSQL_HOST: '"benefitsgov.mysql.database.azure.com"'
      AZURE_MYSQL_PORT: '"3306"'
      AZURE_STORAGE_ACCOUNT: '"bgk8scluster"'
      BLACKFIRE_CLIENT_ID: '"65c34c4b-b80f-441f-8c44-593035d0f663"'
      BLACKFIRE_CLIENT_TOKEN: '"e6f1e411949be393dc5b3d5c500992bab71d6e1f1fabd0e3675e4700180a5645"'
      BLACKFIRE_SERVER_ID: '"eabcf998-3d7f-4378-af9d-1cc0b30f6dca"'
      BLACKFIRE_SERVER_TOKEN: '"6885150070dfbefece0e27fa2d1e1ef7ca007807a40ebd9bb268514fcc3b8746"'
      CRON_API: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      DOCROOT: web
      K8S_NAMESPACE: local
      MIGRATE_DATABASE: local--benefits
      MYSQL_DATABASE: default
      MYSQL_HOST: db
      MYSQL_PASSWORD: user
      MYSQL_PORT_MAPPING: '''0:3306'''
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: user
      PROJECT_ROOT: /var/www
      REDIS_HOST: redis
      REDIS_KEY: redis
      SALT_API: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      VIRTUAL_HOST: api.benefits.docksal
      XDEBUG_ENABLED: '0'
    hostname: db
    image: docksal/db:1.1-mysql-5.7
    ports:
    - 0:3306/tcp
  mail:
    environment:
      MH_API_BIND_ADDR: 0.0.0.0:80
      MH_UI_BIND_ADDR: 0.0.0.0:80
    expose:
    - '80'
    hostname: mail
    image: mailhog/mailhog
    labels:
      io.docksal.virtual-host: webmail.api.benefits.docksal
    user: root
  redis:
    command: redis-server --requirepass redis
    image: redis:latest
    volumes:
    - redis_data:/data:rw
  web:
    depends_on:
      cli:
        condition: service_started
    dns:
    - 192.168.64.100
    - 8.8.8.8
    - 192.168.64.100
    - 8.8.8.8
    hostname: web
    image: nginx:latest
    labels:
      io.docksal.project-root: /Users/syedahmed/Downloads/BenefitsAPI
      io.docksal.virtual-host: api.benefits.docksal,*.api.benefits.docksal
    volumes:
    - /Users/syedahmed/Downloads/BenefitsAPI/.docksal/etc/nginx:/etc/nginx/conf.d:ro
version: '2.1'
volumes:
  cli_home: {}
  db_data: {}
  docksal_ssh_agent:
    external: true
    name: docksal_ssh_agent
  project_root:
    driver: local
    driver_opts:
      device: /Users/syedahmed/Downloads/BenefitsAPI
      o: bind
      type: none
  redis_data: {}

---------------------

Output of fin sysinfo:

fin sysinfo output
 fin sysinfo
███  OS
Darwin Mac OS X 10.13.6
Darwin c02xl05ajgh7.users.bah.com 17.7.0 Darwin Kernel Version 17.7.0: Fri Jul  6 19:54:51 PDT 2018; root:xnu-4570.71.3~2/RELEASE_X86_64 x86_64

███  ENVIRONMENT
MODE : Docker for Mac

███  FIN
fin version: 1.79.4

███  DOCKER COMPOSE
EXPECTED VERSION: 1.22.0
docker-compose version 1.23.2, build 1110ad01
docker-py version: 3.6.0
CPython version: 3.6.6
OpenSSL version: OpenSSL 1.1.0h  27 Mar 2018

███  DOCKER
EXPECTED VERSION: 18.06.1-ce

Client: Docker Engine - Community
Version:           18.09.0
API version:       1.39
Go version:        go1.10.4
Git commit:        4d60db4
Built:             Wed Nov  7 00:47:43 2018
OS/Arch:           darwin/amd64
Experimental:      false

Server: Docker Engine - Community
Engine:
Version:          18.09.0
API version:      1.39 (minimum version 1.12)
Go version:       go1.10.4
Git commit:       4d60db4
Built:            Wed Nov  7 00:55:00 2018
OS/Arch:          linux/amd64
Experimental:     true

███  DOCKSAL: PROJECTS
project             STATUS              virtual host        project root

███  DOCKSAL: VIRTUAL HOSTS
No virtual hosts found

███  DOCKER: RUNNING CONTAINERS
CONTAINER ID        IMAGE                     COMMAND                  CREATED              STATUS                        PORTS                                                    NAMES
ee7999e80d66        docksal/ssh-agent:1.2     "docker-entrypoint.s…"   About a minute ago   Up 59 seconds (healthy)                                                                docksal-ssh-agent
2d4155524213        docksal/dns:1.1           "docker-entrypoint.s…"   About a minute ago   Up About a minute (healthy)   192.168.64.100:53->53/udp                                docksal-dns
758d1f814b2b        docksal/vhost-proxy:1.4   "docker-entrypoint.s…"   About a minute ago   Up About a minute (healthy)   192.168.64.100:80->80/tcp, 192.168.64.100:443->443/tcp   docksal-vhost-proxy

███  DOCKER: NETWORKS
NETWORK ID          NAME                DRIVER              SCOPE
cd46d9988338        _default            bridge              local
8661a2125886        bridge              bridge              local
528a3daf5fb2        host                host                local
79e46af49029        none                null                local

███  HDD Usage
Filesystem      Size   Used  Avail Capacity iused               ifree %iused  Mounted on
/dev/disk1s1   466Gi  170Gi  293Gi    37% 1961266 9223372036852814541    0%   /
devfs          190Ki  190Ki    0Bi   100%     658                   0  100%   /dev
/dev/disk1s4   466Gi  2.0Gi  293Gi     1%       2 9223372036854775805    0%   /private/var/vm
map -hosts       0Bi    0Bi    0Bi   100%       0                   0  100%   /net
map auto_home    0Bi    0Bi    0Bi   100%       0                   0  100%   /home

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (8 by maintainers)

Most upvoted comments

Error sending request to Blackfire API: Get https://blackfire.io/agent-api/v1/public-keys: x509: certificate signed by unknown authority

Looks like you are behind a corporate firewall/proxy, which intercepts and blocks requests to https://blackfire.io/agent-api/v1/public-keys. Try opening https://blackfire.io/agent-api/v1/public-keys in your browser. It opens a username/password request for me, but in your case it will most likely throw a proxy access denied or some kind of request intercept page.

Side note: I fixed the markup of your previous comments. Please use triple-ticks before and after a code block to format it nicely going forward. See here.