Re: Testing Linux Client
Posted in 2000
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Networking & sqlhosts Configuration, Platform-Specific Issues
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. 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".
I have tried this against an NT server and a Linux server both with the same
error. 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. 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?
Ian.
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!"
> >
> >
>
> --
> 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!"
Check the hosts.deny which overrides hosts.equiv also you should have a
.rhosts file in the user's home directory on the server, yes all users on
clients need a valid login and home directory on the server but unless you
will be including the USER ... USING ... clause in the CONNECT statement
the users do not need a valid password on the server. However, the .rhosts
file must name the client machine.
Art S. Kagel
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. 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".
> I have tried this against an NT server and a Linux server both with the same
> error. 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. 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?
>
> Ian.
>
> 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!"
> > >
> > >
> >
> > --
> > 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!"