LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-29-2012, 12:03 PM   #1
linuxxer
Member
 
Registered: Apr 2011
Location: I have my own planet
Distribution: SlackwareŽ
Posts: 72
Blog Entries: 1

Rep: Reputation: Disabled
xinetd - RPC based server


Hi guys,

Is it possible to start RPC based server by using xinetd?

If yes, then please give me some example of xinetd configuration.

Is it possible to start ANY server, using xinetd?
Any support required within server to work with xinetd?


Thanks

Last edited by linuxxer; 07-29-2012 at 01:27 PM. Reason: Spelling mistake
 
Old 07-29-2012, 07:10 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022
xinetd exists to ctrl nominated servers...
Start reading here and come back if you have specific qns http://www.linuxtopia.org/online_boo...rappers-xinetd

Last edited by chrism01; 07-31-2012 at 09:07 PM.
 
1 members found this post helpful.
Old 07-30-2012, 05:02 AM   #3
linuxxer
Member
 
Registered: Apr 2011
Location: I have my own planet
Distribution: SlackwareŽ
Posts: 72
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Thanks for your reply.

Quote:
Originally Posted by chrism01 View Post
This link is really helpful.


But I have a doubt.

Quote:
Originally Posted by chrism01 View Post
xinetd exists to ctrl nominated servers...
When I read xinetd.conf(5) man page, xinetd support following configuration options :
type = RPC
rpc_version =
rpc_number =
This man page having sample configuration for rpc.rstatd.

This means, It is possible to manage RPC based servers (like NFS) using xinetd.
I tried to configure, but NOTHING work.
 
Old 07-31-2012, 09:08 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022
Quote:
I tried to configure, but NOTHING work.
I'm afraid that's uninformative.
We need to see what you did ie cfgs, cmds, error msgs etc.
Check the logs.
 
Old 08-01-2012, 02:54 PM   #5
linuxxer
Member
 
Registered: Apr 2011
Location: I have my own planet
Distribution: SlackwareŽ
Posts: 72
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Yes, Thats my mistake.

I am using Debian 6.0.5. It uses kernel based NFS server
And My configuration:

Code:
##  /etc/hosts.allow  ##
sshd    : 127.0.0.1 192.168.10.0/255.255.255.0
xinetd  : 127.0.0.1 192.168.10.0/255.255.255.0
portmap : 127.0.0.1 192.168.10.0/255.255.255.0
mountd  : 127.0.0.1 192.168.10.0/255.255.255.0
statd   : 127.0.0.1 192.168.10.0/255.255.255.0

##  /etc/hosts.deny  ##
sshd    : ALL
xinetd  : ALL
portmap : ALL
mountd  : ALL
statd   : ALL
Code:
##  /etc/xinetd.d/sunrpc  ##
service sunrpc
{
    id			= sunrpc-tcp
    disable             = no
    type 		= RPC
    socket_type		= stream
    protocol		= tcp
#    port		= 111
    rpc_version		= 2-4
#    interface		= 192.168.10.10
    server		= /sbin/portmap
    wait		= no
    user		= root
    log_type		= SYSLOG daemon crit
    log_on_success	= HOST USERID PID
    log_on_failure	= HOST USERID ATTEMPT
}

service sunrpc
{
    id			= sunrpc-udp
    disable             = no
    type 		= RPC
    socket_type		= dgram
    protocol		= udp
#    port		= 111
    rpc_version		= 2-4
#    interface		= 192.168.10.10
    server		= /sbin/portmap
    wait		= no
    user		= root
    log_type		= SYSLOG daemon crit
    log_on_success	= HOST USERID PID
    log_on_failure	= HOST USERID ATTEMPT
}
When I start portmap with type = RPC service
rsyslog says:
Code:
Aug  1 20:29:30 debian xinetd[1039]: Reading included configuration file: /etc/xinetd.d/sunrpc [file=/etc/xinetd.d/sunrpc] [line=19]
.....
.....
Aug  1 20:29:30 debian xinetd[1039]: pmap_set failed. service=sunrpc program=100000 version=2
But When I start portmapper as normal TCP/UDP service, by commenting "type = RPC", then
rsyslog says:
Code:
Aug  1 20:57:07 debian xinetd[1039]: Reading included configuration file: /etc/xinetd.d/sunrpc [file=/etc/xinetd.d/sunrpc] [line=19]
.....
.....
Aug  1 20:57:07 debian xinetd[1039]: readjusting service sunrpc
Aug  1 20:57:07 debian xinetd[1039]: Reconfigured: new=0 old=2 dropped=0 (services)
At client side, when I run command
Code:
$ rpcinfo -p debian
At server side, rsyslog entry :
Code:
Aug  1 20:57:40 debian xinetd[1039]: START: sunrpc pid=1533 from=192.168.10.20
Aug  1 20:58:01 debian portmap[1534]: cannot bind tcp: Address already in use
After that I remove /etc/xinetd.d/sunrpc,
and I start portmap in normalway,
i.e. NOT as xinetd manage service.

And I try to configure other RPC services.
Code:
##  /etc/xinetd.d/mountd  ##
service mountd
{
    id			= mountd-tcp
    type 		= RPC
    socket_type		= stream
    protocol		= tcp
    port		= 2050
    rpc_version		= 3
#    interface		= 192.168.10.10
    server		= /usr/sbin/rpc.mountd 
    server_args         = --manage-gids --port 2050 --nfs-version 3
    wait		= no
    user		= root
    log_type		= SYSLOG daemon crit
    log_on_success	= HOST USERID PID
    log_on_failure	= HOST USERID ATTEMPT
}

service mountd
{
    id			= mountd-udp
    type 		= RPC
    socket_type		= dgram
    protocol		= udp
    port		= 2050
    rpc_version		= 3
#    interface		= 192.168.10.10
    server		= /usr/sbin/rpc.mountd 
    server_args         = --manage-gids --port 2050 --nfs-version 3
    wait		= no
    user		= root
    log_type		= SYSLOG daemon crit
    log_on_success	= HOST USERID PID
    log_on_failure	= HOST USERID ATTEMPT
}


##  /etc/xinetd.d/nfsd  ##
service nfs
{
    id			= nfs-tcp
    type 		= RPC
    socket_type		= stream
    protocol		= tcp
    port		= 2049
    rpc_version		= 3
#    interface		= 192.168.10.10
    server		= /usr/sbin/rpc.nfsd 
    server_args         = 1 --no-nfs-version=2,4
    wait		= no
    user		= root
    log_type		= SYSLOG daemon crit
    log_on_success	= HOST USERID PID
    log_on_failure	= HOST USERID ATTEMPT
}

service nfs
{
    id			= nfs-udp
    type 		= RPC
    socket_type		= dgram
    protocol		= udp
    port		= 2049
    rpc_version		= 3
#    interface		= 192.168.10.10
    server		= /usr/sbin/rpc.nfsd 
    server_args         = 1 --no-nfs-version=2,4
    wait		= no
    user		= root
    log_type		= SYSLOG daemon crit
    log_on_success	= HOST USERID PID
    log_on_failure	= HOST USERID ATTEMPT
}
rsyslog says:
Code:
Aug  1 23:32:20 debian xinetd[4384]: Reading included configuration file: /etc/xinetd.d/mountd [file=/etc/xinetd.d/mountd] [line=26]
Aug  1 23:32:20 debian xinetd[4384]: Reading included configuration file: /etc/xinetd.d/nfsd [file=/etc/xinetd.d/nfsd] [line=35]
......
......
Aug  1 23:27:56 debian xinetd[3822]: readjusting service mountd-tcp
Aug  1 23:27:56 debian xinetd[3822]: readjusting service mountd-udp
Aug  1 23:27:56 debian xinetd[3822]: readjusting service ssh
Aug  1 23:27:56 debian xinetd[3822]: pmap_set failed. service=nfs-tcp program=100003 version=3
Aug  1 23:27:57 debian xinetd[3822]: Service nfs-tcp failed to start and is deactivated.
Aug  1 23:27:57 debian xinetd[3822]: pmap_set failed. service=nfs-udp program=100003 version=3
Aug  1 23:27:58 debian xinetd[3822]: Service nfs-udp failed to start and is deactivated.
I also tried this with:
rpc_version = 2-4
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to launch a C-server using xinetd jacques83 Linux - Networking 1 06-27-2011 01:17 PM
trying normal rcp (/usr/bin/rcp) Permission denied. Martin Peter Clarke Linux - Server 5 12-21-2010 10:42 AM
How 2 change command line based SUSE LINUX enterprise Server to GNOME or KDE based? royxiao Linux - Newbie 1 09-06-2009 08:50 PM
rcp command from one linux to another linux server shipon_97 Linux - Newbie 4 12-13-2007 05:31 AM
What is the function of the canna server in xinetd.d? jdruin Linux - Software 1 11-19-2003 07:14 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration