zhangwangfly opened a new issue, #12409:
URL: https://github.com/apache/skywalking/issues/12409

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache SkyWalking Component
   
   PHP (apache/skywalking-php)
   
   ### What happened
   
   When configuring your PHP project to use the skywalking_agent with php.ini 
to send data to Kafka, and especially when setting up SASL authentication, 
you've encountered an issue related to the SASL mechanism. Here's a breakdown 
of your situation in English:
   
   1.SASL Mechanism Set to PLAIN:
   When the sasl.mechanism is set to PLAIN, the overall process works without 
any issues.
   
   2.SASL Mechanism Set to SCRAM-SHA-256:
   When changing the sasl.mechanism to SCRAM-SHA-256, an error is reported: 
ERROR skywalking_agent::worker: worker exit unexpectedly err=Client creation 
error: No provider for SASL mechanism SCRAM-SHA-256: recompile librdkafka with 
libsasl2 or openssl support. Current build options: PLAIN
   
   Despite recompiling librdkafka and confirming the presence of sasl_scram 
support through the example tool, the skywalking_agent in your PHP project 
continues to throw an error indicating that there's no provider for the 
SCRAM-SHA-256 SASL mechanism.
   
   Reference address: 
https://skywalking.apache.org/docs/skywalking-php/next/en/reporter/kafka-reporter/
   
   ### What you expected to happen
   
   Whether the existing php skywalking_agent plugin supports the SCRAM-SHA-256 
authentication method is a questio
   
   ### How to reproduce
   
   1.dockerfile fix php skywalking_agent
   
   FROM 192.168.183.222:8001/library/nginx-php-supervisor:v3
   ADD c7-devtoolset-7-x86_64.repo /etc/yum.repos.d
   ADD hosts /tmp
   RUN rm -rf /opt/remi/php74/root/usr/include/php/Zend/zend_operators.h
   ADD zend_operators.h /opt/remi/php74/root/usr/include/php/Zend
   RUN yum install gcc make cargo clang protobuf-compiler -y \
   && yum install llvm-toolset-7 -y
   ENV PATH=/opt/rh/llvm-toolset-7/root/usr/bin:$PATH
   ENV LD_LIBRARY_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64:$LD_LIBRARY_PATH
   COPY librdkafka-1.8.2.zip /root
   RUN unzip /root/librdkafka-1.8.2.zip -d /root
   WORKDIR /root/librdkafka-1.8.2
   RUN ./configure --enable-sasl --enable-ssl \
   && make && make install \
   && echo "/usr/local/lib" >> /etc/ld.so.conf \
   && ldconfig
   ADD protobuf-all-3.6.1.tar.gz /root
   WORKDIR /root/protobuf-3.6.1
   RUN source /etc/profile \
   && ./autogen.sh \
   && ./configure --prefix=/usr/local/protobuf \
   && make && make install \
   && mv /usr/bin/protoc /usr/bin/protoc.bk \
   && cp /usr/local/protobuf/bin/protoc /usr/bin \
   && cat /tmp/hosts >> /etc/hosts \
   && yes | /opt/remi/php74/root/usr/bin/pecl install skywalking_agent
   
   2.php.ini
   
   [skywalking]
   extension=skywalking_agent.so
   skywalking_agent.enable=On
   skywalking_agent.log_file=/tmp/skywalking_agent.log
   skywalking_agent.log_level=DEBUG
   skywalking_agent.reporter_type=kafka
   skywalking_agent.kafka_bootstrap_servers=192.168.183.141:9091
   skywalking_agent.kafka_producer_config='{"client.id": 
"skywalking-dmt-admin","security.protocol":"SASL_PLAINTEXT","sasl.mechanism":"SCRAM-SHA-256","sasl.username":"admin","sasl.password":"admin"}'
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [X] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to