Accessing Remote IDS Instances
Posted in 2012
A backup server running Art Kagel's myexport couldn't connect to instances on a new multi-instance IDS server, failing with SQL -951 "User is not known on the database server." Respondents pointed out the client and server sqlhosts must resolve to the same port numbers (service names may differ locally, and each instance needs its own port), and suggested telnetting to the port to confirm the listener. The real cause turned out to be trusted-host authentication: adding the client machine to informix's and root's $HOME/.rhosts (or to /etc/hosts.equiv) fixed it.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Networking & sqlhosts Configuration
Hello All,
I have a unix backup server that connects to all of my Informix database
servers and does backups using Art Kagel's myexport utility. I have recently
set up a new database server, with multiple informix instances, and I am
having a horrible time trying to get the IDS client on the backup server to
communicate with the new database server. Right now, my sqlhosts file on the
new database server looks like this:
instance1 onsoctcp dbserver informixport1
instance2 onsoctcp dbserver informixport2
I used separate ports for each instance thinking this would be a better way to
manage the connection. Am I wrong here?
/etc/services file on database server:
informixport1 1234/tcp
informixport2 5678/tcp
I have the client in the database server's /etc/hosts file:
123.456.789.101 client
the client sqlhosts file looks like this:
instance1 onsoctcp dbserver port1
instance2 onsoctcp dbserver port1
Do the client and server have to communicate via the same port on both? If
instance2 is on port 5678 on the database server, does it need to go through
port 5678 on the client?
/etc/services file on client:
port1 5555/tcp
/etc/hosts file on client:
987.654.321.111 dbserver
Every time I try to run myexport testdb -m -u -o /testdir
I get sql error -951: User username is not known on the database server. Any
ideas as to what I am doing wrong? Your help is greatly appreciated!
Thanks,
Richard Guffey
Original post:
Hello All,
I have a unix backup server that connects to all of my Informix database
servers and does backups using Art Kagel's myexport utility. I have recently
set up a new database server, with multiple informix instances, and I am
having a horrible time trying to get the IDS client on the backup server to
communicate with the new database server. Right now, my sqlhosts file on the
new database server looks like this:
instance1 onsoctcp dbserver informixport1
instance2 onsoctcp dbserver informixport2
I used separate ports for each instance thinking this would be a better way to
manage the connection. Am I wrong here?
/etc/services file on database server:
informixport1 1234/tcp
informixport2 5678/tcp
I have the client in the database server's /etc/hosts file:
123.456.789.101 client
the client sqlhosts file looks like this:
instance1 onsoctcp dbserver port1
instance2 onsoctcp dbserver port1
Do the client and server have to communicate via the same port on both? If
instance2 is on port 5678 on the database server, does it need to go through
port 5678 on the client?
/etc/services file on client:
port1 5555/tcp
/etc/hosts file on client:
987.654.321.111 dbserver
Every time I try to run myexport testdb -m -u -o /testdir
I get sql error -951: User username is not known on the database server. Any
ideas as to what I am doing wrong? Your help is greatly appreciated!
Thanks,
Richard Guffey
Response:
The client sqlhosts file needs to match the server sqlhost file. So the way
you have it now, the client is trying to connect to your database server
machine by going to port (port1) which is 5555, but on the database server,
you have told the listener thread to start up listening on port (informixport1
or informixport2) which for informixport1 is 1234 (or 5678 for informixport2).
So your client is trying to connect to the incorrect port. You need to change
your client sqlhost file so when it goes to resolve the port number you have
in the 4th column, it gets to the port that the server has started listening
on.
So in your example case, on the client change port1 to informixport1 and
informixport2 respectively and then add informixport1 and informixport2 into
your clients /etc/services file and have the portnumber match the number from
the database server machine.
Jacques Renaut
IBM Informix Advanced Support
APD Team
Yes, client and server have to have the same port in order to communicate
and each instance on a machine must have a different port. The server
listens on the configured port for it and so the client has to transmit its
connection request on that port or the server will not hear it. Think of
it like a radio. Some DJ on one station may be running a great contest for
Rolling Stones tickets but if you are listening to the Yankees on another
station you will never know about it.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Wed, Aug 15, 2012 at 11:38 AM, RICHARD GUFFEY <reguffey@gmail.com> wrote:
> Hello All,
>
> I have a unix backup server that connects to all of my Informix database
> servers and does backups using Art Kagel's myexport utility. I have
> recently
> set up a new database server, with multiple informix instances, and I am
> having a horrible time trying to get the IDS client on the backup server to
> communicate with the new database server. Right now, my sqlhosts file on
> the
> new database server looks like this:
>
> instance1 onsoctcp dbserver informixport1
> instance2 onsoctcp dbserver informixport2>
> I used separate ports for each instance thinking this would be a better
> way to
> manage the connection. Am I wrong here?
>
> /etc/services file on database server:
>
> informixport1 1234/tcp
> informixport2 5678/tcp
>
> I have the client in the database server's /etc/hosts file:
>
> 123.456.789.101 client
>
> the client sqlhosts file looks like this:
>
> instance1 onsoctcp dbserver port1
> instance2 onsoctcp dbserver port1>
> Do the client and server have to communicate via the same port on both? If
> instance2 is on port 5678 on the database server, does it need to go
> through
> port 5678 on the client?
>
> /etc/services file on client:
>
> port1 5555/tcp
>
> /etc/hosts file on client:
>
> 987.654.321.111 dbserver
>
> Every time I try to run myexport testdb -m -u -o /testdir
> I get sql error -951: User username is not known on the database server.
> Any
> ideas as to what I am doing wrong? Your help is greatly appreciated!
>
> Thanks,
>
> Richard Guffey
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--14dae9340c3ba1306b04c752337c
Thank you for your replies! So, I made the port numbers the same in both
sqlhosts files:
database server sqlhosts:
instance1 onsoctcp dbserver 5555
instance2 onsoctcp dbserver 5556
client sqlhosts:
instance1 onsoctcp dbserver 5555
instance2 onsoctcp dbserver 5556
database server /etc/services:
informix1 5555/tcp
informix2 5556/tcp
client /etc/services:
port1 5555/tcp
port2 5556/tcp
I used the port number in the service column instead of the name because the
names for those ports are different across all the servers. This hasn't been a
problem with any of our other servers...i.e. on one database server, the
service is "informix 5555/tcp" and on the client services it is "sqlturbo2
5555/tcp" and connection happens without a problem...but I am still getting
the same connection problem...I know to get Informix to reflect changes to its
sqlhosts file you have to restart the instances...I've done that...do you have
to do anything special to get the Informix Client to reflect changes in its
sqlhosts file? I did a little digging and so far haven't found anything in
regards to 'restarting' the Informix client to reflect sqlhosts changes...
Thanks again for your help.
Richie
What happns if you
telnet <server> <portno>
if it is listening you should see error 401 in the online log after pressing
return in the telnet, if you don't it is either not listening or a firewall
is the way
Cheers
Paul
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
RICHARD GUFFEY
Sent: Wednesday, August 15, 2012 2:13 PM
To: ids@iiug.org
Subject: Re: Accessing Remote IDS Instances [28045]
Thank you for your replies! So, I made the port numbers the same in both
sqlhosts files:
database server sqlhosts:
instance1 onsoctcp dbserver 5555
instance2 onsoctcp dbserver 5556
client sqlhosts:
instance1 onsoctcp dbserver 5555
instance2 onsoctcp dbserver 5556
database server /etc/services:
informix1 5555/tcp
informix2 5556/tcp
client /etc/services:
port1 5555/tcp
port2 5556/tcp
I used the port number in the service column instead of the name because the
names for those ports are different across all the servers. This hasn't been
a
problem with any of our other servers...i.e. on one database server, the
service is "informix 5555/tcp" and on the client services it is "sqlturbo2
5555/tcp" and connection happens without a problem...but I am still getting
the same connection problem...I know to get Informix to reflect changes to
its
sqlhosts file you have to restart the instances...I've done that...do you
have
to do anything special to get the Informix Client to reflect changes in its
sqlhosts file? I did a little digging and so far haven't found anything in
regards to 'restarting' the Informix client to reflect sqlhosts changes...
Thanks again for your help.
Richie
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
If the client is a long-running process, like a web server or app server,
then yes you will have to restart it to have it see the changes. If it is
started up as needed, or connects as needed, then that should be sufficient
for it to reread the sqlhosts information.
The client and server can have different local symbolic names for the ports
5555 and 5556 in /etc/services, only the port numbers have to be the same.
Of course using the port numbers directly will/should work as well.
We are all missing something you haven't thought to tell us.
I have a client who had a "connection" problem, but it turned out that the
app he was running was not reporting an error reading a table so it just
looked like a connection problem when the app failed.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Wed, Aug 15, 2012 at 3:12 PM, RICHARD GUFFEY <reguffey@gmail.com> wrote:
> Thank you for your replies! So, I made the port numbers the same in both
> sqlhosts files:
>
> database server sqlhosts:
> instance1 onsoctcp dbserver 5555
> instance2 onsoctcp dbserver 5556>
> client sqlhosts:
> instance1 onsoctcp dbserver 5555
> instance2 onsoctcp dbserver 5556>
> database server /etc/services:
> informix1 5555/tcp
> informix2 5556/tcp
>
> client /etc/services:
> port1 5555/tcp
> port2 5556/tcp
>
> I used the port number in the service column instead of the name because
> the
> names for those ports are different across all the servers. This hasn't
> been a
> problem with any of our other servers...i.e. on one database server, the
> service is "informix 5555/tcp" and on the client services it is "sqlturbo2
> 5555/tcp" and connection happens without a problem...but I am still getting
> the same connection problem...I know to get Informix to reflect changes to
> its
> sqlhosts file you have to restart the instances...I've done that...do you
> have
> to do anything special to get the Informix Client to reflect changes in its
> sqlhosts file? I did a little digging and so far haven't found anything in
> regards to 'restarting' the Informix client to reflect sqlhosts changes...
> Thanks again for your help.
>
> Richie
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--14dae9340af37e0a5e04c752d018
Problem solved. I needed to put the client machine in the $HOME/.rhosts files for users informix and root...or a blanket solution would have been to put the client machine in the /etc/hosts.equiv file...always seems to be something tiny. Anyway, thank you very much for your responses and assistance! Richard Guffey