- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- connection refused on port 1022
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 07:44 AM
08-22-2002 07:44 AM
connection refused on port 1022
Trying...
telnet: Unable to connect to remote host: Connection refused
Where on a working server it opens a connection and disconnects appropriately.
I have a similarly built server in production that is working fine with this utility.
Any suggestions on what else to check would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 07:55 AM
08-22-2002 07:55 AM
Re: connection refused on port 1022
If you have lsof (if not, install it) :
lsof -i:1022
Then you if something is lestening to port 1022.
Regards,
Patrice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 08:00 AM
08-22-2002 08:00 AM
Re: connection refused on port 1022
Don't know if this is your problem, but all ports < 1024 are reserved ports & as such can only be used by root level users. So if the application that listens is not owned by root you'll have problems.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 08:07 AM
08-22-2002 08:07 AM
Re: connection refused on port 1022
lsof can be had form :
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 08:11 AM
08-22-2002 08:11 AM
Re: connection refused on port 1022
This is loaded as root, loaded identically the same as 100's of other servers.
There is nothing in /etc/services defining this port and a ps -ef doesn't find anything on that port, so I am not sure that there is something already using that port either?
Again, lsof -- good idea also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 08:17 AM
08-22-2002 08:17 AM
Re: connection refused on port 1022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 09:13 AM
08-22-2002 09:13 AM
Re: connection refused on port 1022
should show you if anything is listening at all.
netstat -a |grep rexec
or whatever you called it in /etc/services will show it too.
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 09:28 AM
08-22-2002 09:28 AM
Re: connection refused on port 1022
# netstat -a | grep 1022
udp 0 0 *.1022 *.*
and
# grep -i cos /etc/services
COS_shell 1022/tcp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 09:36 AM
08-22-2002 09:36 AM
Re: connection refused on port 1022
It's interesting to note that your netstat -a output shows the system listening on 1022/UDP, whereas your services file defines it to be 1022/TCP.
Which is correct - TCP or UDP?
Also how is this port "enabled". Is it started as a daemon or is it listed in /etc/inetd.conf & started on demand by the inetd daemon on a connection request?
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 09:42 AM
08-22-2002 09:42 AM
Re: connection refused on port 1022
COS_shell stream tcp nowait root /usr/cosmos/COS_3.2/local/bin/COSrshd COSrshd -
l
It should be tcp, I can't answer why netstat comes up and says udp? Maybe that is part of the problem? But my other box in which it is working says that also (not necessarily correct but...) The only difference I know between the two boxes is that the broken box is using NIS (although should not be impactive).
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 10:14 AM
08-22-2002 10:14 AM
Re: connection refused on port 1022
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 10:19 AM
08-22-2002 10:19 AM
Re: connection refused on port 1022
I'd try doing:
services: files nis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 10:30 AM
08-22-2002 10:30 AM
Re: connection refused on port 1022
They both are patched the same for streams
# swlist | grep streams
PHNE_17051 1.0 Cumulative streams patch
Have had some good things to check here but no change. Any other ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 10:40 AM
08-22-2002 10:40 AM
Re: connection refused on port 1022
Something does not make sense. Go back and retry your telnets (use the ip address and not the hostnames and try it from a different box - not one of the ones which is involved.) and verify that one works and the other fails. When the one connects try a
netstat -an |grep 1022
and see if you see ESTABLISHED. (from a separate telnet session or the console).
Then verify that you are really logged on to the correct box when you do your netstat over again. Finally when you do
netstat -a|grep COS_shell
do you see it in both cases?
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 10:43 AM
08-22-2002 10:43 AM
Re: connection refused on port 1022
Can you then connect?
If so it has to related to the way inetd.conf is starting it.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 10:53 AM
08-22-2002 10:53 AM
Re: connection refused on port 1022
I think you may have found something here.
I do still get the same symptoms using ip addresses from an uninvolved server.
However, netstat -an | grep 1022 reveals
working server:
# netstat -an | grep 1022
tcp 0 0 164.121.12.34.1022 204.53.90.100.61970 TIME_WAIT
tcp 0 0 *.1022 LISTEN
udp 0 0 *.1022 *.*
server not working:
# netstat -an | grep 1022
udp 0 0 *.1022 *.*
Hopefully one final question. Maybe I know how but can't think of it - how do I add that tcp line to listen like it should be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 01:01 PM
08-22-2002 01:01 PM
Re: connection refused on port 1022
inetd -c
to get it to reread the conf file.
Also check to see if you have an inetd.sec file. If you do you need to have the service listed in there.
A bit of a stretch but check /etc/protocols to make sure it says:
ip 0 IP # internet protocol, pseudo protocol number
icmp 1 ICMP # internet control message protocol
igmp 2 IGMP # internet group management protocol
ggp 3 GGP # gateway-gateway protocol
tcp 6 TCP # transmission control protocol
egp 8 EGP # exterior gateway protocol
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
hmp 20 HMP # host monitoring protocol
xns-idp 22 XNS-IDP # Xerox NS IDP
rdp 27 RDP # "reliable datagram" protocol
We only really care about tcp and udp but I just copied the file from our server.
TCP is supposed to be used when you tell inetd.conf "stream tcp nowait". udp is usually "dgram udp wait" so I don't understand why the udp is starting at all unless you've done something in inetd.conf or services that you didn't tell us about. You should only have one line in your services for 1022/tcp and none for 1022/udp.
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 01:04 PM
08-22-2002 01:04 PM
Re: connection refused on port 1022
Also I meant to say to be sure that the service name in services and inetd.conf are exactly the same.
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 05:40 PM
08-22-2002 05:40 PM
Re: connection refused on port 1022
also, iirc, /etc/nsswitch.conf is only read once - at the first resolution call made by the process. change it after the process is up (eg inetd) and it will not see the change.
so, on the NIS using system that does not work, if you have entered a list in /etc/nsswitch.conf to resolve services locally before/after trying NIS, you might try bouncing the inetd - inetd -c will not bounce the inetd (iric) only re-read the inetd.conf config file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 04:09 AM
08-23-2002 04:09 AM
Re: connection refused on port 1022
Here is what I have done so far this morning...
I copied over the /etc/inetd.conf and /etc/services file from the working system, with a inetd -c to follow. Here is the syslog that follows that. My problem is around the middle of this, being COS_shell/tcp:Unknown service -- what can I do about that is anything?
Aug 23 07:02:40 sdmance6 inetd[2603]: Rereading configuration
Aug 23 07:02:40 sdmance6 inetd[2603]: protocol = udp
Aug 23 07:02:40 sdmance6 inetd[2603]: ntalk/udp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: ident/tcp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: kshell/tcp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: klogin/tcp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: recserv/tcp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: instl_boots/udp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: vopied/tcp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: bpjava-msvc/tcp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: COS_shell/tcp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: protocol = udp
Aug 23 07:02:40 sdmance6 above message repeats 7 times
Aug 23 07:02:40 sdmance6 inetd[2603]: bgssd/tcp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: registrar/tcp: Unknown service
Aug 23 07:02:40 sdmance6 inetd[2603]: Configuration complete
/etc/protocols are the same on both with identical dates from install. And I haven't made any changes to /etc/nsswitch.conf because the only difference broke server: files nis dns and in the working server: files dns
Next step? COS_shell is in /etc/services I must be missing something?
Thanks again to all involved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 06:40 AM
08-23-2002 06:40 AM
Re: connection refused on port 1022
do
ls -l /etc/services
and
ls -l /etc/inetd*
on both boxes and check permissions and ownership and sizes. Looks like its having problems reading /etc/services.
Maybe you should move the old files somewhere else so there is no chance of them getting read by accident.
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 06:46 AM
08-23-2002 06:46 AM
Re: connection refused on port 1022
# tail /var/adm/syslog/syslog.log
Aug 23 09:49:20 sdmance6 inetd[2603]: recserv/tcp: Unknown service
Aug 23 09:49:20 sdmance6 inetd[2603]: instl_boots/udp: Unknown service
Aug 23 09:49:20 sdmance6 inetd[2603]: vopied/tcp: Unknown service
Aug 23 09:49:20 sdmance6 inetd[2603]: bpjava-msvc/tcp: Unknown service
Aug 23 09:49:20 sdmance6 inetd[2603]: COS_shell/tcp: Unknown service
Aug 23 09:49:20 sdmance6 inetd[2603]: bgssd/tcp: Unknown service
Aug 23 09:49:20 sdmance6 inetd[2603]: protocol = udp
Aug 23 09:49:20 sdmance6 above message repeats 7 times
Aug 23 09:49:20 sdmance6 inetd[2603]: registrar/tcp: Unknown service
Aug 23 09:49:20 sdmance6 inetd[2603]: Configuration complete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2002 07:09 AM
08-23-2002 07:09 AM
Re: connection refused on port 1022
If not then perhaps it only reads the /etc/services file at boot and we need to reboot?
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2002 05:56 AM
08-26-2002 05:56 AM
Re: connection refused on port 1022
inetd -c is supposed to work but there are some cases in which it doesn't apparently.
Thanks again.