LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Configure new rpc service - xinetd (https://www.linuxquestions.org/questions/linux-newbie-8/configure-new-rpc-service-xinetd-859742/)

rajhn 01-31-2011 05:46 AM

Configure new rpc service - xinetd
 
Hi,

I am using RHEL 5.5;
i.e, Red Hat Enterprise Linux Server release 5.5 (Tikanga)

How to create rpc service, with which xinetd should spawn new process for each request.

service details under /etc/rpc

dbprocprog 500126 dbprocprog
Dails of service 'dbprocprog' under /etc/xinetd.d

[root@vmrhpe02 xinetd.d]# cat /etc/xinetd.d/dbprocprog
# Sample RPC service
service dbprocprog
{
disable = no
type = RPC
socket_type = stream
wait = no
user = mduser
server = /tmp/BL2456_ora11g_Linux_QA/bin/v_rpcangelproc
rpc_version = 3
}
NOTE: works fine when i set wait 'yes' (single thread)

Restarted xinetd service using
#service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]

console output of rpcinfo as below;

[root@vmrhpe02 xinetd.d]# rpcinfo -p
program vers proto port
500126 3 tcp 51738 dbprocprog


When i check for service status;
#rpcinfo -n 51738 -t vmrhpe02 500126 3
rpcinfo: RPC: Unable to receive; errno = Connection reset by peer
program 500126 version 3 is not available


Looking forward for expert's view to resolve the issue in order to enable the RPC service start and xinetd should spawn new rpc process for each request.

rajhn 02-01-2011 01:17 AM

copied content from /var/log/messages
 
content from /var/log/messages while starting the service;

Feb 1 12:29:22 vmrhpe02 xinetd[25589]: START: dbprocprog pid=25593 from=10.132.4.20
Feb 1 12:29:22 vmrhpe02 dbrpc[25593]: cannot create tcp service.
Feb 1 12:29:22 vmrhpe02 xinetd[25589]: EXIT: dbprocprog status=1 pid=25593 duration=0(sec)

Hope this input helps to reply for the mentioned issue.

prodev05 02-01-2011 02:46 AM

Option 'Wait'

Determines whether or not the service can accept multiple connections. If "yes", xinetd won't accept new connections for this service until the active one exits.

rajhn 02-02-2011 12:15 AM

Thanks for your concern and quick response.

I think you are conveying the purpose of Wait parameter used while configuring a service under xinetd.

Actually issue seems to be with the limitation in linux in generating Multi-thread safe code by RPCGEN. Hence with RPC service which i have configured works fine only for single thread i.e., when i set wait as 'yes'. Otherwise fails to create multiple connections for the RPC service when wait is set as 'no'.

Kindly refer below link for more details;
http://www.spinics.net/lists/rh-devel/msg01803.html

prodev05 02-02-2011 12:59 AM

I also getting the same :D

[root@vmrhpe02 xinetd.d]# rpcinfo –p
program vers proto port
100005 2 tcp 803 mountd
100005 3 udp 800 mountd
100005 3 tcp 803 mountd
300019 1 tcp 624 amd
300019 1 udp 625 amd
500126 3 tcp 45375 dbprocprog

[root@vmrhpe02 xinetd.d]# rpcinfo -n 45375 -t vmrhpe02 500126 3
rpcinfo: RPC: Unable to receive; errno = Connection reset by peer
program 500126 version 3 is not available


How come this happen ? :confused:


All times are GMT -5. The time now is 06:20 AM.