Localhost tricks
Posted in 1997
Hi folks,
Now, this one is quite tricky (and a bit long).
I have got a HP E35 machine running HP-UX 10.10 . Also I have got Online 7.20,
which I have just installed and now want to set up sqlhosts to allow local TCP/IP
loopback. But I do not like the idea of setting up hosts.equiv, or, God forbid,
.rhosts, so what I do is
foxie_tcp onsoctcp localhost 3002 #put the socket number for simplicity
Apparently, if I put foxie (the machine name) instead of localhost, I would need
to mess with /etc/hosts.equiv.
Then I initialize the instance and it works quite happily both for local clients
and those who connect from remote boxes.
The good test to make sure the listener is running is to telnet to the socket and
see if it accepts the connection - thats what I do:
telnet localhost 3002 or telnet foxie 3002 prompts and I can see those error
messages in onstat -m saying that generally it cannot interpret what is coming
to the port. Fair enough,that is what I want.
My instance then works happily with both local and remote clients.
Now, I do the same on D350/1 machine with the very same HP-UX 10.10, same patch
bundles, similar thing:
rabbit_tcp onsoctcp localhost 3003 # again just socket number to simplify
The instance works quite happily with local connections, but it would not accept the
the remote ones. I ran my telnets and what I had is
telnet localhost 3003 - prompts;
telnet rabbit 3003 - returnes [ECONNREFUSED]
Moreover, if I setup sqlhosts entry to
rabbit_tcp onsoctcp rabbit 3003
and , oh well, put the machine name into /etc/hosts.equiv, then bring the
instance down/up than
telnet rabbit 3003 - prompts;
telnet localhost 3003 - returnes [ECONNREFUSED]
Telnet to default port (23) works OK in both cases. Also DNS have nothing
to do with this .
I have spent three days trying to establish, what actually causes this behaviour
to be different on two OS wise similar machines, together with our Unix guys, but
still do not have any clues.
Any ideas will be highly appreciated .
Cheers
Ilya