You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "fengnex (via GitHub)" <gi...@apache.org> on 2024/04/16 10:08:14 UTC

[I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

fengnex opened a new issue, #192:
URL: https://github.com/apache/dubbo-rust/issues/192

   如题,示例文档没法用
   example跑步起来。。。。。。。。。。。


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "wfeii1980 (via GitHub)" <gi...@apache.org>.
wfeii1980 commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2547411510

   > 现在示例中最新版是v0.4.0,运行的时候报错:
   > 
   > ```
   > error[E0407]: method `request_resource` is not a member of trait `crate::common::remote::grpc::message::GrpcRequestMessage`
   >  --> C:\Users\17274\.cargo\registry\src\mirrors.aliyun.com-8754fae0eb2f08f1\nacos-sdk-0.3.6\src\common\remote\grpc\message\request\client_detection_request.rs:3:1
   >   |
   > 3 | #[request(identity = "ClientDetectionRequest", module = "internal")]
   >   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `crate::common::remote::grpc::message::GrpcRequestMessage`
   >   |
   >   = note: this error originates in the attribute macro `request` (in Nightly builds, run with -Z macro-backtrace for more info)
   > ```
   > 
   > 我觉得是nacos-sdk 与 nacos-macro两个库不兼容导致的,nacos-sdk库common::remote::grpc::message::GrpcRequestMessage trait 并没有 request_resource 方法,但nacos-macro在实现他
   
   确实 把nacos-sdk升级到0.4.2就可以编译过去,一共两处。


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "fengnex (via GitHub)" <gi...@apache.org>.
fengnex commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2058836571

   直接在github上下载的dubbo-rust-main目录下执行cargo build可以解决上面的问题。但问题是在dubbo-rust-main之外新建的项目,怎么通过才能对proto文件生产源码?这里主要是dubbo-build这个工具看起来没有起作用或无法自动运行----这个才是是上面的问题。


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "onewe (via GitHub)" <gi...@apache.org>.
onewe commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2058973435

   目前活跃的开发者不多, 所以进度比较缓慢. 感谢理解. 


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "bajie-git (via GitHub)" <gi...@apache.org>.
bajie-git commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2478318717

   我是用Zookeeper也有同样的问题,server端可以正常启动,但dubbo admin上只能看到服务看不到方法。client请求的时候提示
   called `Result::unwrap()` on an `Err` value: hyper::Error(Connect, Os { code: 10049, kind: AddrNotAvailable, message: "在其上下 文中,该请求的地址无效。" })   
   ![image](https://github.com/user-attachments/assets/a22fe6e0-99b4-4d40-95b9-c3cde597f5dd)
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "wfeii1980 (via GitHub)" <gi...@apache.org>.
wfeii1980 commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2550446414

   nacos-sdk已经修复了这个问题


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "onewe (via GitHub)" <gi...@apache.org>.
onewe commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2058953865

   目前 还在完善中, 不好意思😬


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "bajie-git (via GitHub)" <gi...@apache.org>.
bajie-git commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2482419440

   现在示例中最新版是v0.4.0,运行的时候报错:
   ```
   error[E0407]: method `request_resource` is not a member of trait `crate::common::remote::grpc::message::GrpcRequestMessage`
    --> C:\Users\17274\.cargo\registry\src\mirrors.aliyun.com-8754fae0eb2f08f1\nacos-sdk-0.3.6\src\common\remote\grpc\message\request\client_detection_request.rs:3:1
     |
   3 | #[request(identity = "ClientDetectionRequest", module = "internal")]
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `crate::common::remote::grpc::message::GrpcRequestMessage`
     |
     = note: this error originates in the attribute macro `request` (in Nightly builds, run with -Z macro-backtrace for more info)
   ```
   
   我觉得是nacos-sdk 与 nacos-macro两个库不兼容导致的,nacos-sdk库common::remote::grpc::message::GrpcRequestMessage  trait 并没有 request_resource 方法,但nacos-macro在实现他


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "yang20150702 (via GitHub)" <gi...@apache.org>.
yang20150702 commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2065670359

   @fengnex 
   example下的 echo 例子是可以正常运行,该example没有使用服务发现。你可以试一下这个例子
   对于nacos的报错,我们需要本地复现一下


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "fengnex (via GitHub)" <gi...@apache.org>.
fengnex commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2058950030

   基于dubbo-rust-main在一台机器上运行greeter示例的服务端和客户端,nacos在本地以standalone模式运行,但是遇到了下面的错误,请教怎么解决:
   `INFO dubbo::triple::transport::connector::http_connector:84: host is ip address: "0.0.0.0"
   thread 'main' panicked at dubbo\src\triple\transport\connection.rs:104:50:
   called `Result::unwrap()` on an `Err` value: hyper::Error(Connect, Os { code: 10049, kind: AddrNotAvailable, message: " 在其上下文中,该请求的地址无效。" })
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace`


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "fengnex (via GitHub)" <gi...@apache.org>.
fengnex commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2058977276

   客气了!
   相信这个项目一定会越来越好!
   因为rust的优点和dubbo3的一些良好特性,这个项目一定会前景广阔的!


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "onewe (via GitHub)" <gi...@apache.org>.
onewe commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2066067469

   我直接在项目中运行 `greeter` 好像没有复现您说的问题, 
   ![image](https://github.com/apache/dubbo-rust/assets/38708836/516a27d2-2e82-4a9e-8fee-2c23b8ce1871)
   给我们一点时间, 我们正在完善, 抱歉.


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "yang20150702 (via GitHub)" <gi...@apache.org>.
yang20150702 commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2065696573

   > 直接在github上下载的dubbo-rust-main目录下执行cargo build可以解决上面的问题。但问题是在dubbo-rust-main之外新建的项目,怎么通过才能对proto文件生产源码?这里主要是dubbo-build这个工具看起来没有起作用或无法自动运行----这个才是是上面的问题。
   
   建议您先熟悉一下 echo 例子。可以直接clone源代码,在本地运行example。
   对于您的问题,我简单介绍一下使用dubbo-rust进行rpc服务开发流程:
   1. `cargo new echo`:创建 cargo package
   2. 新增目录 protos,添加定义好的proto文件
   3. 在包的根目录下,新增 build.rs,用来compile proto文件来生成对应的rust代码。注意:需要预先在本地安装 protoc
   4. 我们在echo和greeter中提供了两种方案来use proto对应的rust代码,具体可以看代码
   5. 先实现Server,然后实现Client
   
   参考:
   https://doc.rust-lang.org/cargo/reference/build-scripts.html : build.rs文件会优先执行
   https://github.com/protocolbuffers/protobuf#protobuf-compiler-installation
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "fengnex (via GitHub)" <gi...@apache.org>.
fengnex commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2066261105

   @onewe 刚才重试了下,greeter示例能编译成功,服务端看起来能正常运行,但是运行客户端时报下面的错误,二者还是不能正常通信:
   INFO dubbo::triple::transport::connector::http_connector:84: host is ip address: "0.0.0.0"
   thread 'main' panicked at dubbo\src\triple\transport\connection.rs:104:50:
   called `Result::unwrap()` on an `Err` value: hyper::Error(Connect, Os { code: 10049, kind: AddrNotAvailable, message: "在其上下文中,该请求的地址 无效。" })
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   这个错误跟上一次的一样,而且二者的编译、运行环境不同,2个环境应该可以证明这个问题了。


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "fengnex (via GitHub)" <gi...@apache.org>.
fengnex commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2066015575

   @yang20150702 现在版本的greeter示例已经能正常编译了,需要用到nacos,greeter服务也能注册到nacos,但是greeter-client不能与greeter-server通信,错误信息是:
   dubbo::triple::transport::connector::http_connector:84: host is ip address: "0.0.0.0"
   thread 'main' panicked at dubbo\src\triple\transport\connection.rs:104:50:
   called `Result::unwrap()` on an `Err` value: hyper::Error(Connect, Os { code: 10049, kind: AddrNotAvailable, message: " 在其上下文中,该请求的地址无效。" })
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   不是你说的那些。


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "fengnex (via GitHub)" <gi...@apache.org>.
fengnex commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2066233042

   echo这个示例写的挺好的,验证通过。但是在Windows10上echo-tls-server.exe和echo-tls-client.exe都能编译出来,把server.crt和ca.crt都添加到系统信任根证书中,echo-tls-server.exe运行正常,但是运行echo-tls-client.exe时报下面的错,请教该怎么解决:
   RoutesFutureInnerState::Future
   ' panicked at dubbo\src\registry\registry.rs:78:63:
   called `Option::unwrap()` on a `None` value
   registry extension load failed.


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] example目录下的示例中的build.rs怎么才能运行生成src/greeter/server.rs等文件? [dubbo-rust]

Posted by "fengnex (via GitHub)" <gi...@apache.org>.
fengnex commented on issue #192:
URL: https://github.com/apache/dubbo-rust/issues/192#issuecomment-2058969805

   理解,期待早日迈向成熟,更新相关文档。
   这个示例现在必须要有nacos才能启动,但启动nacos后还是有问题,很遗憾。
   看来目前nacos还是应以java、go版本为主。


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org