Re: Testing Linux Client
Posted in 2000
On Wed, 27 Sep 2000, Ian Thurbon wrote:
>Thanks Jonathan, Art and John for you help. I plan to port an existing
>windows informix application to linux and before I start the port, I
>wanted to ensure the client was correctly set-up.
Wise; very wise.
>I took your advice and quickly created an ESQL/C application that
>connects to my server and hey presto! it failed. The errorcode is -956
>- "Client (%s) or user is not trusted by the database server".
Oh dear.
Did you use the simple 'DATABASE statement' programs I showed? You
could consider trying the alternative 'CONNECT statement' instead:
EXEC SQL CONNECT TO 'remotedbs@server' AS 'myconn'
USER 'username' USING 'password';
It gives you more to edit which is why omitted it as an option first
time around.
>I have tried this against an NT server and a Linux server both with the
>same error.
That is, you tried connecting from your new Linux box to an alternative
Linux server with a known-to-be-OK database server running on it, and
also to an NT server with a known-to-be-OK database server running on
it, and both connection attempts failed the same way. Is your Linux
user able to do "rsh altlinux ls", where altlinux is the name of your
alternative Linux server? Is that box running with MD5 passwords or
shadow passwords? Both are known problem areas for early versions of
Informix. Exactly which versions of the servers are you running on
those remote machines? Exactly which version of CSDK are you using on
your new machine?
>These servers are working with my windows clients correctly. I checked
>the Hosts.equiv file on the server and it contains "+ +", which i
>understand means any client, any host.
Assuming you are referring to /etc/hosts.equiv (lower case), you might
want to review that! It may be safe enough to get you up and running,
but in the medium term (let alone the long term and potential deployment
of the system), you should not run a machine with that level of
insecurity, not even within an intranet. Well, I wouldn't...
>I have ensured that the INFORMIXSERVER variable contains the correct
>name and also ensured that two correct entries are added to the
>sqlhosts file on the client, one for each server. I have also added
>the correct protocol and port number to the services file. Is there
>anything I have missed or should check on the server or client that may
>cause this problem?
The hostname for the Linux server should be the FQDN (fully qualified
domain name); whatever it is that "uname -n" says. [...but I just
checked my RedHat 6.2 box which gives horus now, instead of
horus.informix.com, but horus.informix.com seems to be OK in the
sqlhosts file.
>Jonathan Leffler wrote:
>> On Tue, 26 Sep 2000, Ian Thurbon wrote:
>> >I do not have dbaccess as part of my Client SDK.
>>
>> Oh bother, I always forget that egregious piece of mis-packaging.
>> Sorry for misleading you.
>>
>> Art's answer covers the other alternatives.
>>
>> If you need to write ESQL/C and you have a pre-existing database on the
>> remote server, you can use:
>>
>> int main()
>> {
>> EXEC SQL WHENEVER ERROR STOP;
>> EXEC SQL DATABASE 'remotedbs';
>> puts("OK");
>> return(0);
>> }
>>
>> If you don't have a pre-existing database on the remote server (which
>> would be surprising), then you can use:
>>
>> int main()
>> {
>> EXEC SQL WHENEVER ERROR STOP;
>> EXEC SQL CREATE DATABASE 'remotedbs';
>> puts("OK");
>> return(0);
>> }
>>
>> You need to have INFORMIXSERVER set; you probably need INFORMIXDIR set;
>> and you need $INFORMIXDIR/etc/sqlhosts (or $INFORMIXSQLHOSTS) to contain
>> an entry for your INFORMIXSERVER.
>>
>> >I have dbaccess on the my server which I used to verify the server is
>> >running correctly. I need to verify that my Linux client has been set
>> >up correctly. I am unsure of how to do this.
>> >
>> >Regards
>> >Ian Thurbon
>> >
>> >
>> >Jonathan Leffler wrote:
>> >> On Mon, 25 Sep 2000, Ian Thurbon wrote:
>> >> >I have installed informix client SDK on Linux and have configured
>> >> >my environment, sqlhosts, services files etc to point at my
>> >> >server. How do I test to see whether this has been configured
>> >> >correctly? On win32 I use iLogin demo which is sufficient, but
>> >> >there does not seem to be a Linux equivalent. Any ideas would be
>> >> >much appreciated.
>> >>
>> >> Simplest test is to run DB-Access and create a database:
>> >>
>> >> dbaccess - - <<!
>> >> create database whatnot;>> >> !
>> >>
>> >> If it works, you're probably OK. If it doesn't, you aren't.
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"