dCache / oncrpc4j

Pure Java implementation of ONCRPC/SUNRPC
Other
30 stars 30 forks source link

Multiple version numbers of rpc program on different Linux machines #78

Closed challenger572 closed 5 years ago

challenger572 commented 5 years ago

Hi kofemann, I have a c++ rpc server .I want to generate different version numbers for that c++ rpc server from java ..can I use rpcsvc class .is it possible from your code? Example : Program number : 10007 But multiple versions(1, 2,3,4 up to 32 versions ) on different machine address( 4 IP address) For the same c++ rpc server programme. 100007 1 tcp 38903 c++rpc 100007 2 tcp 60872 c++rpc

  1. 3 tcp 60987 c++rpc Please give me your suggestion regarding this . svc = new OncRpcSvcBuilder() .withoutAutoPublish() .withTCP() .withMinPort(1) .withMaxport(60000) .withWorkerThreadIoStrategy() .withBindAddress("127.0.0.1") .withSelectorThreadPoolSize(1) .withWorkerThreadPoolSize(1) .withRpcService(new OncRpcProgram(PROGNUM, PROGVER), echo) .withServiceName("c++rpc") .build(); svc.start() Here Program version(1to 32),IP address(1 to 4) I need to pass it differently??. And I want to do the same the process on different address like ip address1, ip address2 ,ip address3, ip address 4.. is it possible . I tried with above code and changed the bind address.what is the use of withbindaddress()? but it is throwing bind exception ..am run it on Windows but I pass the parameters in withbindaddress(Linux machine ip adderess1). I checked etc/hosts in Linux .I gave the localhost address from that file .still it is throwing bind exception. But when I gave the local address of Windows .it is registering the portmapper in Windows .please give me your suggestions regarding this
challenger572 commented 5 years ago

Hi kofemann, Do you have any suggestions .we are developing application from your code.we stuck at this point .

challenger572 commented 5 years ago

Hi , I am getting error : failed to register at portmap: AUTHERROR. If I triggered the request to portmapper which is running on the Linux machine .but am Able to get the port number from portmapper using RBC bind . I can able to call getport , dump methods .but when I want to call the setport , unset port method it is throwing the Auth error .. c++ rpc server I don't have any authentication .do you have any suggestions .

challenger572 commented 5 years ago

I typed below command : echo 'OPTIONS="-w -i"' | sudo tee /etc/default/rpcbind sudo service portmap restart. It is solved my error