PRC Programming FAQs

Source: Internet
Author: User

PRC Programming FAQs



RPC programming often comes across a variety of problems, especially for developers who have just contacted and used RPC, and some simple problems are difficult to navigate by conventional means such as GDB. Therefore, this blog post summarizes some common problems and solutions in the RPC development process for future reference. Of course, with more contact with RPC, will encounter more problems, will be in the back of the consolidation together.


1.rpc:port Mapper Failure error


The phenomenon is as follows:

[Email protected]bin]#./test_rpc

Probe_nvm_ops:fail to detect (simulated) NVM by Cmds Lsmod | grep "Arxcis"!

Probe_nvm_ops:fail to detect (simulated) NVM by Cmds Lsmod | grep "Gigaram"!

Probe_nvm_ops:success to detect (simulated) NVM by Cmds Cat/proc/cmdline | grep "MEM"!

Nvmstatus on 127.0.0.1:ok

Nvmstatus on 10.0.0.110:ok

10.0.0.111:rpc:port Mapper failure-rpc:unable to receive


Workaround Solution:

Systemctlstart Rpcbind.service


2. Program not registered Error

The phenomenon is as follows:

[Email protected]bin]#./test_rpc

Probe_nvm_ops:fail to detect (simulated) NVM by Cmds Lsmod | grep "Arxcis"!

Probe_nvm_ops:fail to detect (simulated) NVM by Cmds Lsmod | grep "Gigaram"!

Probe_nvm_ops:success to detect (simulated) NVM by Cmds Cat/proc/cmdline | grep "MEM"!

Nvmstatus on 127.0.0.1:ok

Nvmstatus on 10.0.0.110:ok

10.0.0.111:rpc:program not registered


Workaround Solution:start A thread or daemon to rigeister RPC in remote node


3. XDR threads are not generated for complex data structures


This time you need to use rpcgen-c *.c to generate XDR threads, or. x file format errors, version conflicts.




Of course, the actual development process encountered problems may be strange,RPC development process encountered problems need to combine error information, RPC based on the underlying mechanism, and sometimes need to refer to the automatic generation of reference code, in order to effectively locate and solve the problem.


This article is from the "Store Chef" blog, so be sure to keep this source http://xiamachao.blog.51cto.com/10580956/1829448

PRC Programming FAQs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.