Re: unable to access informix database through servlets
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Security, Permissions & Auditing, Platform-Specific Issues, Java & JDBC Development
The problem is not in .netrc file. As I know this file is used
when you are going to connect to a remote server from 4GL or
using a connect (database) statement without user... password..
clause. In this file you specifyes the remote host name and the user/password
to use when connecting to a database server on this host in the way
described above.
Are you sure you CAN connect to your server from dbaccess ?
I mean not just sellecting the database - but through
"Connection" -> "Connect" -> select the server -> specify user name
and password to connect. Try this. If it will not connect
one problem could be the "shadow" passwords database (at least
it was a message in newsgroup relating to problems when using
Informix servers on some linux versions with shadow passwords).
If the problem is the shadow passwords - convert the shadow
passwords database to /etc/passwd.
Hope this helps,
Octav
On Thu, Sep 23, 1999 at 03:31:29PM +0000, metrouche@my-deja.com wrote:
>
>
> My environment is :
>
> -server : apache on linux2-2-5
> java jdk1.1.7B
> servlet jsdk2.1
> jdbc 1.40J
>
> When accessing remote database from a windows98 client (either ie5 and
> netscape4) through a servlet using jdbc api i got the following
> message:
>
> 952:"user password not correct for the database server"
>
> If i put root username and password in the connection url i am ok but
> connection fails each time i replace username and password to another
> account even that user of this account can access normally through
> informix isql on server hosting the database.
>
> After investigation it seems that users should be declared in a file
> named ~/.netrc that i could not locate .
>
> can anybody tell me how to locate this file and guide me solve this
> problem.
>
> thanks in advance.
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
--
Octav Chiriac Phone: (373) 2 22 99 67
NetInfo S.R.L. Fax: (373) 2 21 36 59
Chisinau (373) 2 22 84 88
Moldova, Republic of mailto:com@netinfo-moldova.com
We've had a similar problem with Informix 7.3 on HPUX10.2. It appears that if
the users were added to the OS BEFORE Informix was loaded, then Informix doesn't
recognize them.
I followed suggestions from Octav and others to determine that I couldn't
connect from dbaccess and that we weren't using a shadow password file. Then I
tried adding a new user and connecting using that ID. Lo and behold - it works!
Octav Chiriac wrote:
> The problem is not in .netrc file. As I know this file is used
> when you are going to connect to a remote server from 4GL or
> using a connect (database) statement without user... password..
> clause. In this file you specifyes the remote host name and the user/password
> to use when connecting to a database server on this host in the way
> described above.
>
> Are you sure you CAN connect to your server from dbaccess ?
> I mean not just sellecting the database - but through
> "Connection" -> "Connect" -> select the server -> specify user name
> and password to connect. Try this. If it will not connect
> one problem could be the "shadow" passwords database (at least
> it was a message in newsgroup relating to problems when using
> Informix servers on some linux versions with shadow passwords).
> If the problem is the shadow passwords - convert the shadow
> passwords database to /etc/passwd.
>
> Hope this helps,
> Octav
>
> On Thu, Sep 23, 1999 at 03:31:29PM +0000, metrouche@my-deja.com wrote:
> >
> >
> > My environment is :
> >
> > -server : apache on linux2-2-5
> > java jdk1.1.7B
> > servlet jsdk2.1
> > jdbc 1.40J
> >
> > When accessing remote database from a windows98 client (either ie5 and
> > netscape4) through a servlet using jdbc api i got the following
> > message:
> >
> > 952:"user password not correct for the database server"
> >
> > If i put root username and password in the connection url i am ok but
> > connection fails each time i replace username and password to another
> > account even that user of this account can access normally through
> > informix isql on server hosting the database.
> >
> > After investigation it seems that users should be declared in a file
> > named ~/.netrc that i could not locate .
> >
> > can anybody tell me how to locate this file and guide me solve this
> > problem.
> >
> > thanks in advance.
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
>
> --
> Octav Chiriac Phone: (373) 2 22 99 67
> NetInfo S.R.L. Fax: (373) 2 21 36 59
> Chisinau (373) 2 22 84 88
> Moldova, Republic of mailto:com@netinfo-moldova.com