easyfrog opened a new issue, #717:
URL: https://github.com/apache/rocketmq-clients/issues/717

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq-clients/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq-clients/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq-clients/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Programming Language of the Client
   
   Node.js
   
   ### Runtime Platform Environment
   
   macOD: 13.6.6 (22G630)
   
   ### RocketMQ Version of the Client/Server
   
   https://github.com/Xuchengen/rocketmq-docker-build
   
   5.1.3
   
   ### Run or Compiler Version
   
   _No response_
   
   ### Describe the Bug
   
   Use rocketmq-client-nodejs, clean nodejs project , emit  Error: 1 CANCELLED: 
Call cancelled
   
   Rocketmq is in docker:  version is 5.1.3
   docker image: https://github.com/Xuchengen/rocketmq-docker-build
   
   start rocketmq docker script:
   ```bash
   #!/bin/bash
   # 参数:console端口
   vport=8180
   # 参数:java程序连接端口
   mainPort=9876
   # 参数:java程序连接IP
   mainIp=192.168.1.8
   
   cId=$(
       docker run -e NAMESRV_XMS=128m -e NAMESRV_XMX=128m -e NAMESRV_XMN=128m \
       -e BROKER_XMS=128m -e BROKER_XMX=128m -e BROKER_XMN=128m -e 
BROKER_MDM=128m \
       -e NAMESRV_ADDR=$mainIp:$mainPort \
       -itd --hostname rocketmq --restart=always \
       -p $vport:8080 -p $mainPort:$mainPort -p 10909:10909 -p 10911:10911 -p 
10912:10912 \
       --name rocketmq xuchengen/rocketmq:latest
   )
   docker exec -it $cId /bin/bash -c "sed -i 
's/localhost:9876/$mainIp:$mainPort \-c \$ROCKETMQ_HOME\/conf\/broker.conf /g' 
.run.sh"
   docker exec -it $cId /bin/bash -c "echo \"namesrvAddr=$mainIp:$mainPort\" >> 
\$ROCKETMQ_HOME/conf/broker.conf"
   docker exec -it $cId /bin/bash -c "echo \"brokerIP1=$mainIp\" >> 
/home/app/rocketmq/conf/broker.conf"
   docker restart $cId
   ```
   
   started success!
   
   here is rokcet-console screenshot:
   
   
![image](https://github.com/apache/rocketmq-clients/assets/10724325/34890790-0b95-4489-954d-e418562ab43f)
   
   now I init a nodejs project and npm install rocketmq-client-ndoejs like this:
   
   <img width="1007" alt="iShot_2024-03-29_13 04 14" 
src="https://github.com/apache/rocketmq-clients/assets/10724325/1664a05a-d332-4eba-bdaa-d837ca918479";>
   
   the code is offical exmaple code in this page : 
https://www.npmjs.com/package/rocketmq-client-nodejs
   I only modify the endpoints part to my cluster url
   
   and then run this index.js file, I got this error: 
   
   ```bash
   > node index                  
   node:internal/process/esm_loader:40
         internalBinding('errors').triggerUncaughtException(
                                   ^
   
   Error: Startup the rocketmq client failed, 
clientId=ztcmbp.local@11079@0@luc6ohqz, error=Error: 1 CANCELLED: Call cancelled
       at SimpleConsumer.startup 
(/Users/easyfrog/work/rocketmq-test/node_modules/rocketmq-client-nodejs/dist/client/BaseClient.js:83:25)
       at process.processTicksAndRejections 
(node:internal/process/task_queues:95:5)
       at async file:///Users/easyfrog/work/rocketmq-test/index.js:9:1 {
     cause: Error: 1 CANCELLED: Call cancelled
         at callErrorFromStatus 
(/Users/easyfrog/work/rocketmq-test/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
         at Object.onReceiveStatus 
(/Users/easyfrog/work/rocketmq-test/node_modules/@grpc/grpc-js/build/src/client.js:192:76)
         at Object.onReceiveStatus 
(/Users/easyfrog/work/rocketmq-test/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
         at Object.onReceiveStatus 
(/Users/easyfrog/work/rocketmq-test/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
         at 
/Users/easyfrog/work/rocketmq-test/node_modules/@grpc/grpc-js/build/src/resolving-call.js:99:78
         at process.processTicksAndRejections 
(node:internal/process/task_queues:77:11)
     for call at
         at ServiceClientImpl.makeUnaryRequest 
(/Users/easyfrog/work/rocketmq-test/node_modules/@grpc/grpc-js/build/src/client.js:160:32)
         at ServiceClientImpl.queryRoute 
(/Users/easyfrog/work/rocketmq-test/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
         at 
/Users/easyfrog/work/rocketmq-test/node_modules/rocketmq-client-nodejs/dist/client/RpcClient.js:54:20
         at new Promise (<anonymous>)
         at RpcClient.queryRoute 
(/Users/easyfrog/work/rocketmq-test/node_modules/rocketmq-client-nodejs/dist/client/RpcClient.js:53:16)
         at RpcClientManager.queryRoute 
(/Users/easyfrog/work/rocketmq-test/node_modules/rocketmq-client-nodejs/dist/client/RpcClientManager.js:66:32)
         at #fetchTopicRoute 
(/Users/easyfrog/work/rocketmq-test/node_modules/rocketmq-client-nodejs/dist/client/BaseClient.js:178:54)
         at SimpleConsumer.updateRoutes 
(/Users/easyfrog/work/rocketmq-test/node_modules/rocketmq-client-nodejs/dist/client/BaseClient.js:163:40)
         at #startup 
(/Users/easyfrog/work/rocketmq-test/node_modules/rocketmq-client-nodejs/dist/client/BaseClient.js:92:20)
         at SimpleConsumer.startup 
(/Users/easyfrog/work/rocketmq-test/node_modules/rocketmq-client-nodejs/dist/client/BaseClient.js:80:32)
 {
       code: 1,
       details: 'Call cancelled',
       metadata: Metadata { internalRepr: Map(0) {}, options: {} }
     }
   }
   
   Node.js v20.8.0
   ```
   
   ** error=Error: 1 CANCELLED: Call cancelled**
   
   so  how to fix it. It is realy a base clean project. and it can not run 
properly. 
   
   
   ### Steps to Reproduce
   
   like above
   
   ### What Did You Expect to See?
   
   run success
   
   ### What Did You See Instead?
   
   an error occurred
   
   ### Additional Context
   
   _No response_


-- 
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: commits-unsubscr...@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to