Re: 908: Attempt to connect to database server (hd
Posted in 2014
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Networking & sqlhosts Configuration, Licensing & Editions, Platform-Specific Issues, Java & JDBC Development, Versions, Editions & End-of-Life
Try replacing the on the client the 15038 with hdbafdba_net1 in the
sqlhosts file.
It is a bit confusing how you posted the below files. If the above
does not work just post sqlhosts, hosts and services from the client and
the server.
thanks
esteban.-
On 15/12/14 14:41, GILLES TCHAPPI wrote:
> Hi,
>
> When trying dbaccess connexion from a Informix CSDK 410FC4DE
> running on RED HAT 2.6.32-358.6.2.el6.x86_64 to IBM Informix Dynamic
> Server Version 11.50.FC9 running on AIX 5.3.0.0, I have the following
> message :
>
> informix@PBDDLX03: # dbaccess sysmaster << EOF
> (suite)> select name from sysdatabases;
> (suite)> EOF
>
> 908: Attempt to connect to database server (hdbafdba_tcp) failed.>
> ISAM error: record is locked.>
> The client env parameters are :
>
> informix@PBDDLX03: # env | grep informix
> ADMIN=/bases/informix/hdbafdba/admin
> BASE=/bases/informix/hdbafdba
> HOME=/produits/informix
> INFORMIXDIR=/produits/informix/client/sdk/410FC4DE
> INFORMIXSQLHOSTS=/produits/informix/client/sdk/410FC4DE/etc/sqlhosts.> hdbafdba
> LD_LIBRARY_PATH=/produits/informix/client/sdk/410FC4DE/lib:> /produits/informix/client/sdk/410FC4DE/lib/cli:
> /produits/informix/client/sdk/410FC4DE/lib/esql
> LOGNAME=informix
> MAIL=/var/spool/mail/informix
> PATH=/usr/local/bin:/bin:/usr/bin:/opt/VRTS/bin:> /produits/informix/client/sdk/410FC4DE/bin:/usr/java5/bin:
> /produits/informix/client/sdk/410FC4DE/bin:/usr/java5/bin
> PWD=/produits/informix
> USER=informix
> onc=/produits/informix/client/sdk/410FC4DE/etc/onconfig.hdbafdba
> informix@PBDDLX03: #
> informix@PBDDLX03: #
> informix@PBDDLX03: # echo $INFORMIXSERVER
> hdbafdba_tcp
>
> The client sqlhosts contains :
>
> #***********************************************************************
> ***
> #
> # Licensed Material - Property Of IBM
> #
> # "Restricted Materials of IBM"
> #
> # IBM Informix Dynamic Server
> # (c) Copyright IBM Corporation 1996, 2004 All rights reserved.
> #
> # Title: sqlhosts.demo
> # Description:
> # Default sqlhosts file for running demos.
> #
> #***********************************************************************
> ***
> hdbafdba onipcshm hmba04 hdbafdba_net1
> #hdbafdba_tcp onsoctcp hmba04 hdbafdba_net1
> hdbafdba_tcp onsoctcp hmba04 15038
> hdbafdbasrv_tcp onsoctcp hmba04 hdbaisrv_net1>
> where hmba04 is the AIX server box ans 15038 is the pport declared in
> AIX box as you can see below :
>
> informix@hmba04:hdbafdba_tcp:/produits/informix/115FC9/etc> cat
> /etc/services | grep hdbafdba_net1
> hdbafdba_net1 15038/tcp
>
> In the dataserver size the sqlhosts file contains :
>
> #***********************************************************************
> ***
> #
> # Licensed Material - Property Of IBM
> #
> # "Restricted Materials of IBM"
> #
> # IBM Informix Dynamic Server
> # (c) Copyright IBM Corporation 1996, 2004 All rights reserved.
> #
> # Title: sqlhosts.demo
> # Description:
> # Default sqlhosts file for running demos.
> #
> #***********************************************************************
> ***
> hdbafdba onipcshm hmba04 hdbafdba_net1
> hdbafdba_tcp onsoctcp hmba04 hdbafdba_net1
> hdbafdbasrv_tcp onsoctcp hmba04 hdbaisrv_net1>
> and the user 'informix' on hmba04 (the uix server) has access to the
> databse hdbafda via dbaccess (see below)
>
> informix@hmba04:hdbafdba_tcp:/produits/informix/115FC9/etc> dbaccess
> sysmaster << EOF
>> select count(*) from sysdatabases;>> EOF
> Database selected.
>
> (count(*))
>
> 9
>
> 1 row(s) retrieved.
>
> Database closed.
>
> Knowing hmba04(server box) is network reachable by client host (see
> below) :
>
> informix@PBDDLX03: # ping hmba04
> PING hmba04.dns24-1.socgen (192.85.62.2) 56(84) bytes of data.
> 64 bytes from hmba04.dns24.socgen (192.85.62.2): icmp_seq=1 ttl=250
> time=8.86 ms
> .....
>
> Can someone tells me why I have this :
> 908: Attempt to connect to database server (hdbafdba_tcp) failed.>
> ISAM error: record is locked>
> Regards
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Thanks for your answer :
As I'm root permissions on client box, I can't modify /etc/services on client
box, that's why I used port number (15038) instead of hdbafdba_net1 in the
client sqlhosts file
Here are the informations you asked for :
ON CLIENT BOX
/etc/hosts :
127.0.0.1 localhost.localdomain localhost
192.82.196.190 PBDDLX03
111.64.216.4 pbddlc01
but hmba04 (server box) is reachable via DNS (see below) :
informix@PBDDLX03: # nslookup hmba04
Server: 192.64.229.111
Address: 192.64.229.111#53
hmba04.dns24.socgen canonical name = hmba04.dns24-1.socgen.
Name: hmba04.dns24-1.socgen
Address: 192.85.62.2
sqlhosts file :
#**************************************************************************
#
# Licensed Material - Property Of IBM
#
# "Restricted Materials of IBM"
#
# IBM Informix Dynamic Server
# (c) Copyright IBM Corporation 1996, 2004 All rights reserved.
#
# Title: sqlhosts.demo
# Description:
# Default sqlhosts file for running demos.
#
#**************************************************************************
hdbafdba onipcshm hmba04 hdbafdba_net1
#hdbafdba_tcp onsoctcp hmba04 hdbafdba_net1
hdbafdba_tcp onsoctcp hmba04 15038
hdbafdbasrv_tcp onsoctcp hmba04 hdbaisrv_net1
/etc/services :
informix@PBDDLX03: # cat /etc/services | grep hdba
informix@PBDDLX03: #
ON SERVER BOX
/etc/hosts :
oracle@hmba04::/produits/oracle/112040/products > cat /etc/hosts | grep -y
PBDDLX03
192.82.196.190 PBDDLX03
sqlhosts file :
#**************************************************************************
#
# Licensed Material - Property Of IBM
#
# "Restricted Materials of IBM"
#
# IBM Informix Dynamic Server
# (c) Copyright IBM Corporation 1996, 2004 All rights reserved.
#
# Title: sqlhosts.demo
# Description:
# Default sqlhosts file for running demos.
#
#**************************************************************************
hdbafdba onipcshm hmba04 hdbafdba_net1
hdbafdba_tcp onsoctcp hmba04 hdbafdba_net1
hdbafdbasrv_tcp onsoctcp hmba04 hdbaisrv_net1
/etc/services :
informix@hmba04:hdbafdba_tcp:/usr/tivoli/tsm/client> cat /etc/services | grep
hdba
hdbafdba_net1 15038/tcp
hdbaisrv_net1 46038/tcp
Regards
Hi,
On client host, I did a ping instead of nslookup :
x087823@PBDDLX03: # ping hmba04
PING hmba04.dns24-1.socgen (192.85.62.2) 56(84) bytes of data.
64 bytes from hmba04.dns24.socgen (192.85.62.2): icmp_seq=1 ttl=250 time=9.01
ms
^C
--- hmba04.dns24-1.socgen ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 970ms
rtt min/avg/max/mdev = 9.010/9.010/9.010/0.000 ms
On server host, the dbaccess output I sent previously was done using network
port (onsoctcp protocol) not shared memory (please see below) :
informix@hmba04:hdbafdba_tcp:/bases/informix/hdbafdba/var/onbar/logs> echo
$INFORMIXSERVER
hdbafdba_tcp
informix@hmba04:hdbafdba_tcp:/bases/informix/hdbafdba/var/onbar/logs> grep
hdbafdba_tcp $INFORMIXSQLHOSTS
hdbafdba_tcp onsoctcp hmba04 hdbafdba_net1
informix@hmba04:hdbafdba_tcp:/bases/informix/hdbafdba/var/onbar/logs> cat
/etc/services | grep hdbafdba_net1
hdbafdba_net1 15038/tcp #
informix@hmba04:hdbafdba_tcp:/bases/informix/hdbafdba/var/onbar/logs> dbaccess
sysmaster << EOF
> select count(*) from sysdatabases;> EOF
Database selected.
(count(*))
9
1 row(s) retrieved.
Database closed.
Regards