xingwenge / canal-php

Alibaba mysql database binlog incremental subscription & consumer components Canal's php client[阿里巴巴mysql数据库binlog的增量订阅&消费组件 Canal 的 php 客户端 ] https://github.com/alibaba/canal
385 stars 67 forks source link

拉取消息提示packet type=CLIENTAUTHENTICATION is NOT supported! #19

Closed THE-BASIC-LAW closed 4 years ago

THE-BASIC-LAW commented 4 years ago

Exception 'Exception' with message 'get data error. error code:400, error message:packet type=CLIENTAUTHENTICATION is NOT supported!'

in /mnt/c/futu/ns_oss/vendor/xingwenge/canal_php/src/adapter/CanalConnectorBase.php:205

Stack trace:

0 /mnt/c/futu/ns_oss/vendor/xingwenge/canal_php/src/adapter/CanalConnectorBase.php(151): xingwenge\canal_php\adapter\CanalConnectorBase->getWithoutAck()

1 /mnt/c/futu/ns_oss/console/controllers/CanalController.php(107): xingwenge\canal_php\adapter\CanalConnectorBase->get()

THE-BASIC-LAW commented 4 years ago

同样的代码,直接拉取示例代码用cli运行是可以的,放到Yii框架下运行会报这个错,原因是什么呢

xingwenge commented 4 years ago

拉取消息是长连接,web是短连接,建议不使用

THE-BASIC-LAW commented 4 years ago

拉取消息是长连接,web是短连接,建议不使用

不是web,是控制台脚本,只不过是在框架下运行

liasica commented 3 years ago

本,只不过是在框架下运行

你最后如何解决的?