Blackfire 无法使用 WAMP 在 Windows 上创建网络流
Blackfire unabled to create a network stream on Windows with WAMP
我正在尝试使用 Blackfire 分析 HTTP 请求。我已经安装了这些元素:
- blackfire-agent 及其配置文件(带有我的服务器 ID)
- blackfire 客户端,我用(我的客户端 ID)配置了它(我启动了
C:\Users\a.t>blackfire config
)
- blackfire php 探测(dll,php.ini 是用我的服务器 id 编辑的)
但我仍然遇到错误:
C:\Users\a.t>blackfire curl --resolve 'simdate.dev:80:127.0.0.1' http://simdate.dev/
Are you authorized to profile this page? No probe response, missing PHP extension or invalid signature for relaying agent.
- Xdebug 和其他调试扩展在 php.ini 文件中被禁用
- 客户端 ID 和客户端密钥不同于服务器 ID 和服务器密钥。
- Blackfire Agent也是运行(如果我停止它也有同样的错误)
这是我在 php 中声明的日志文件中的日志文件:
Sat Mar 11 12:31:44 2017 (11080): [Info] Can't find pgsql module, Blackfire SQL analyzer will be disabled for pgsql SQL queries
Sat Mar 11 12:31:44 2017 (11080): [Info] Can't find oci module, Blackfire SQL analyzer will be disabled for oci SQL queries
Sat Mar 11 12:31:58 2017 (11080): [Debug] Found signature : RWQUOK8z****************iNQE=
Sat Mar 11 12:31:58 2017 (11080): [Info] No key found in memory or key expired, continuing without validation
Sat Mar 11 12:31:58 2017 (11080): [Debug] Found valid agent id
Sat Mar 11 12:31:58 2017 (11080): [Debug] Found file based probe stream (utcp://127.0.0.1:8307)
Sat Mar 11 12:31:58 2017 (11080): [Warning] Unable to create a network stream
这是我从 blackfire-agent 输出的日志。如您所见,他似乎从未连接:
[2017-03-11T12:43:03+01:00] DEBUG: blackfire-agent 1.9.2 windows amd64 gc 2016-12-14T10:46:38+0000
[2017-03-11T12:43:03+01:00] DEBUG: Retrieving public keys from API
[2017-03-11T12:43:03+01:00] DEBUG: Fetching public keys from API
[2017-03-11T12:43:03+01:00] DEBUG: Sending request GET https://blackfire.io/agent-api/v1/public-keys
[2017-03-11T12:43:03+01:00] DEBUG: API answered with status code: 200
[2017-03-11T12:43:03+01:00] DEBUG: Unmarshalled json result: &{[{RWQUOK8z--------------------------Ac= 20170426}]}
[2017-03-11T12:43:03+01:00] DEBUG: Started verification of '1' public keys
[2017-03-11T12:43:03+01:00] DEBUG: Retrieving specs from the API
[2017-03-11T12:43:03+01:00] DEBUG: Fetching specs from API
[2017-03-11T12:43:03+01:00] DEBUG: Sending request GET https://blackfire.io/agent-api/v1/specs
[2017-03-11T12:43:03+01:00] DEBUG: API answered with status code: 200
[2017-03-11T12:43:03+01:00] DEBUG: Merging spec from the API and local spec
[2017-03-11T12:43:03+01:00] DEBUG: New value of DefaultSpec.LastMaxAge: 24h0m0s
[2017-03-11T12:43:03+01:00] DEBUG: Listening for connections on 'tcp://127.0.0.1:8307'
[2017-03-11T12:43:03+01:00] DEBUG: Waiting for new connection
这里有两张截图
第一个显示禁用的Xdebug
第二个显示我的 blackfire php 配置(xxxx 和 yyyy 是屏幕截图的实际值)
Windows防火墙已被禁用。
您的 php.ini 配置中有错字,您应该使用 tcp://127.0.0.1:8307
而不是 utcp://127.0.0.1:8307
(注意 utcp
/ tcp
错字) blackfire.agent_socket
值
我正在尝试使用 Blackfire 分析 HTTP 请求。我已经安装了这些元素:
- blackfire-agent 及其配置文件(带有我的服务器 ID)
- blackfire 客户端,我用(我的客户端 ID)配置了它(我启动了
C:\Users\a.t>blackfire config
) - blackfire php 探测(dll,php.ini 是用我的服务器 id 编辑的)
但我仍然遇到错误:
C:\Users\a.t>blackfire curl --resolve 'simdate.dev:80:127.0.0.1' http://simdate.dev/
Are you authorized to profile this page? No probe response, missing PHP extension or invalid signature for relaying agent.
- Xdebug 和其他调试扩展在 php.ini 文件中被禁用
- 客户端 ID 和客户端密钥不同于服务器 ID 和服务器密钥。
- Blackfire Agent也是运行(如果我停止它也有同样的错误)
这是我在 php 中声明的日志文件中的日志文件:
Sat Mar 11 12:31:44 2017 (11080): [Info] Can't find pgsql module, Blackfire SQL analyzer will be disabled for pgsql SQL queries
Sat Mar 11 12:31:44 2017 (11080): [Info] Can't find oci module, Blackfire SQL analyzer will be disabled for oci SQL queries
Sat Mar 11 12:31:58 2017 (11080): [Debug] Found signature : RWQUOK8z****************iNQE=
Sat Mar 11 12:31:58 2017 (11080): [Info] No key found in memory or key expired, continuing without validation
Sat Mar 11 12:31:58 2017 (11080): [Debug] Found valid agent id
Sat Mar 11 12:31:58 2017 (11080): [Debug] Found file based probe stream (utcp://127.0.0.1:8307)
Sat Mar 11 12:31:58 2017 (11080): [Warning] Unable to create a network stream
这是我从 blackfire-agent 输出的日志。如您所见,他似乎从未连接:
[2017-03-11T12:43:03+01:00] DEBUG: blackfire-agent 1.9.2 windows amd64 gc 2016-12-14T10:46:38+0000
[2017-03-11T12:43:03+01:00] DEBUG: Retrieving public keys from API
[2017-03-11T12:43:03+01:00] DEBUG: Fetching public keys from API
[2017-03-11T12:43:03+01:00] DEBUG: Sending request GET https://blackfire.io/agent-api/v1/public-keys
[2017-03-11T12:43:03+01:00] DEBUG: API answered with status code: 200
[2017-03-11T12:43:03+01:00] DEBUG: Unmarshalled json result: &{[{RWQUOK8z--------------------------Ac= 20170426}]}
[2017-03-11T12:43:03+01:00] DEBUG: Started verification of '1' public keys
[2017-03-11T12:43:03+01:00] DEBUG: Retrieving specs from the API
[2017-03-11T12:43:03+01:00] DEBUG: Fetching specs from API
[2017-03-11T12:43:03+01:00] DEBUG: Sending request GET https://blackfire.io/agent-api/v1/specs
[2017-03-11T12:43:03+01:00] DEBUG: API answered with status code: 200
[2017-03-11T12:43:03+01:00] DEBUG: Merging spec from the API and local spec
[2017-03-11T12:43:03+01:00] DEBUG: New value of DefaultSpec.LastMaxAge: 24h0m0s
[2017-03-11T12:43:03+01:00] DEBUG: Listening for connections on 'tcp://127.0.0.1:8307'
[2017-03-11T12:43:03+01:00] DEBUG: Waiting for new connection
这里有两张截图
第一个显示禁用的Xdebug
Windows防火墙已被禁用。
您的 php.ini 配置中有错字,您应该使用 tcp://127.0.0.1:8307
而不是 utcp://127.0.0.1:8307
(注意 utcp
/ tcp
错字) blackfire.agent_socket
值