Re: Whats the correct way to restart inetd (6928 Views)
Reply
Frequent Advisor
amreek bansal
Posts: 62
Registered: ‎04-28-2009
Message 1 of 12 (6,928 Views)

Whats the correct way to restart inetd


Hi,

Can anyone help.. I am getting a error when telneting to my HP-UX server, (I'm trying to telnet to port 3872 on HP-UX server from aremote server, I get connection refusted. I'ce checked firewall, The rules are in palce and the port 3872 is enabled, it doesnt look like its firewall. I've checked /etc/inetd.conf and found the line with telnet commented out. So I have un commented and would like to know the correct way to restart inetd. And hoping that will fix it.

Thanks.
Please use plain text.
Honored Contributor
Ganesan R
Posts: 1,891
Registered: ‎05-23-2006
Message 2 of 12 (6,928 Views)

Re: Whats the correct way to restart inetd

Hi,

Just run #inetd -c to reread the configuration file. that's enough. No need to restart inetd daemon.
Best wishes,

Ganesh.
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,208
Registered: ‎10-02-2001
Message 3 of 12 (6,928 Views)

Re: Whats the correct way to restart inetd

"port 3872 is enabled"

What process should answer port 3872 requests?

This is normally used by oracle.

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
Frequent Advisor
amreek bansal
Posts: 62
Registered: ‎04-28-2009
Message 4 of 12 (6,928 Views)

Re: Whats the correct way to restart inetd


Yes I have tried inetd -c, it probably has re read the file, but hasnt fixed th etelent connection refused issue.
Please use plain text.
Frequent Advisor
amreek bansal
Posts: 62
Registered: ‎04-28-2009
Message 5 of 12 (6,928 Views)

Re: Whats the correct way to restart inetd


yes should be oracle using port 3872
Please use plain text.
Honored Contributor
Ganesan R
Posts: 1,891
Registered: ‎05-23-2006
Message 6 of 12 (6,928 Views)

Re: Whats the correct way to restart inetd

Hi Amreek,

By default telnet will listen on port no 23. If you want to configure to listen on some other port comment out the existing line on /etc/inetd.conf and /etc/services and put the new entries like this...

#vi /etc/inetd.conf

newtelnet stream tcp nowait root /usr/lbin/telnetd telnetd

#vi /etc/services

newtelnet 3872/tcp # new telnet with port no 3872

then reread the inetd daemon by #inetd -c

Make sure that port 3872 is not used by any other service or application.
Best wishes,

Ganesh.
Please use plain text.
Honored Contributor
Fabio Ettore
Posts: 1,738
Registered: ‎11-19-2003
Message 7 of 12 (6,928 Views)

Re: Whats the correct way to restart inetd

Hi,

in my opinion port 3872 is not in listen currently, you can check that by

netstat -an|grep 3872

You're getting connection refused not for telnet issues, the reason is that port is not on listen. Just for a try, issue

netstat -an

and

telnet

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,208
Registered: ‎10-02-2001
Message 8 of 12 (6,928 Views)

Re: Whats the correct way to restart inetd

I'm not a oracle expert at all, but I guess this certain application is not using inetd.

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
Regular Advisor
Anoop P_2
Posts: 91
Registered: ‎01-21-2004
Message 9 of 12 (6,928 Views)

Re: Whats the correct way to restart inetd

There are some cases where you have to restart inetd. A bug that caused a memory leak causing ssh to fail as inetd approaches its maximum allowable memory allocation for example.

The correct way to restart would be:

/sbhin/init.d/inetd stop; /sbin/init.d/inetd start

in single line, yes, to minimize the time when it remains down. And then ensure it started.

It is critical to start inetd immediately upon stopping it because many services are dependent on it. Particularly when you have clustered nodes, a failure of inetd beyond time out periods can spell disaster.

Regards,
Anoop
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,208
Registered: ‎10-02-2001
Message 10 of 12 (6,928 Views)

Re: Whats the correct way to restart inetd

I don't know anything about this, but based on what I have found there is an apache daemon "behind" this port; likely not started by inetd but running "static".

So you may test with telnet, but modify the inetd.conf will create other problems and isn't a solution.

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
Regular Advisor
Anoop P_2
Posts: 91
Registered: ‎01-21-2004
Message 11 of 12 (6,924 Views)

Re: Whats the correct way to restart inetd

To check whether port is being listened to:

telnet 3872 (Fabio's method)

and also

lsof -i tcp:3872

Regards,
Anoop


Please use plain text.
Honored Contributor
Mridul Shrivastava
Posts: 980
Registered: ‎01-30-2006
Message 12 of 12 (6,924 Views)

Re: Whats the correct way to restart inetd

Check the telent first, is it working or not. Login locally on the machine and try "telnet 0". If it returns the login prompt then telnet is ok else you need to fix this first.
Time has a wonderful way of weeding out the trivial
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation