Xdebug 3 docker mac PhpStorm broken pipe

Viewed 817

I see There was a problem sending 179 bytes on socket 11: Broken pipe. in the xdebug.log and cannot see why. Have gone around in circles for days trying all sorts of stuff. What am I doing wrong?

  • Xdebug 3.0.3,
  • PhpStorm 2020.3.3,
  • Mac OS X latest,
  • Safari browser
[17] Log opened at 2021-03-24 02:49:43.184877
[17] [Step Debug] INFO: Checking remote connect back address.
[17] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[17] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[17] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 172.18.0.1:9003.
[17] [Step Debug] INFO: Connected to debugging client: 172.18.0.1:9003 (from REMOTE_ADDR HTTP header). :-)
[17] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/manawatech/public/index.php" language="PHP" xdebug:language_version="8.0.3" protocol_version="1.0" appid="17" idekey="19213"><engine version="3.0.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2021 by Derick Rethans]]></copyright></init>

[17] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

[17] [Step Debug] WARN: 2021-03-24 02:49:43.851075: There was a problem sending 179 bytes on socket 11: Broken pipe.
[17] Log closed at 2021-03-24 02:49:43.851495

docker-compose.yml

version: "3.8"
services:
  web:
    container_name: web
    build:
      context: .
      dockerfile: docker/php/Dockerfile
    ports:
      - "80:80"
      - "443:443"
      - "9003:9003"
    volumes:
      - .:/var/www/manawatech
    extra_hosts: # <-- this is required for ray
      - "host.docker.internal:host-gateway" # <-- this is required for ray
  db:
    container_name: db
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - ./var/mysql:/var/lib/mysql
    ports:
      - "3306:3306"
    environment:
      MYSQL_RANDOM_ROOT_PASSWORD: "yes"
      MYSQL_DATABASE: "${MYSQL_DATABASE}"
      MYSQL_USER: "${MYSQL_USER}"
      MYSQL_PASSWORD: "${MYSQL_PASSWORD}"

docker/php/Dockerfile

FROM php:8-apache-buster
RUN apt update \
    && apt install -y geoip-bin geoip-database libgeoip-dev libpng-dev libzip-dev
RUN pecl channel-update pecl.php.net \
    && pecl install redis apcu xdebug \
    && docker-php-ext-install pdo pdo_mysql gd zip \
    && docker-php-ext-enable redis apcu xdebug pdo pdo_mysql gd zip
# from https://github.com/nezhar/php-docker-ssl/blob/master/Dockerfile
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem -subj "/C=AT/ST=Vienna/L=Vienna/O=Security/OU=Development/CN=manawatech.local"
RUN a2dissite 000-default.conf \
    && a2enmod rewrite ssl expires headers
COPY docker/php/apache.conf /etc/apache2/sites-enabled/
COPY docker/php/98-production.ini /usr/local/etc/php/conf.d/
COPY docker/php/99-development.ini /usr/local/etc/php/conf.d/
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
EXPOSE 80
EXPOSE 443
EXPOSE 9003

/usr/local/etc/php/conf.d/99-development.ini

[xdebug]
xdebug.mode=debug
xdebug.discover_client_host=true
xdebug.client_host=host.docker.internal
xdebug.start_with_request=trigger
xdebug.force_display_errors=1
xdebug.log=/tmp/xdebug.log
0 Answers
Related