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