waliwali / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Connection issue #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Whilst im am trying to get my freeBSD production sever up and running im 
running into problems on my linux test box.

I have ibm_db and ibm_db_sa setup correctly and import the libaries within 
python, no problem.

Now I am getting a connection error, note all I have done is install ibm_db and 
ibm_db_sa and setup dsdriver, and set my LDCONFIG and my IBM_DB_DIR and 
IBM_DB_LIB dirs up (all working fine).

THe error I get when I run a query is:

OperationalError: (OperationalError) ibm_db_dbi::OperationalError: [IBM][CLI 
Driver] SQL30081N  A communication error has been detected. Communication 
protocol being used: "TCP/IP".  Communication API being used: "SOCKETS".  
Location where the error was detected: "192.168.155.1".  Communication function 
detecting the error: "recv".  Protocol specific error code(s): "*", "*", "0".  
SQLSTATE=08001 SQLCODE=-30081 None None

My connection configuration:

dbread.url = ibm_db_sa://user:pass@192.168.155.1:4002/dbname

Now after some googling, should I be editing db2cli.ini and db2dsdriver.cfg?

As the readme did not point me in the direction of this.

Im guessing its a configuration issue on the informix database, and I have 
logged a support call with the people who maintain it for where I am currently 
working.

Original issue reported on code.google.com by pumalo...@gmail.com on 19 Mar 2012 at 3:16

GoogleCodeExporter commented 9 years ago
The error which you get may arise due to wrong port number. there is no need to 
edit db2cli.ini or db2dsdriver.cfg this this.

Original comment by rahul.pr...@in.ibm.com on 21 Mar 2012 at 11:27

GoogleCodeExporter commented 9 years ago
Its definitely the right port number, could this be because I am trying to 
connect to an old version of informix?

Original comment by crooks.l...@gmail.com on 22 Mar 2012 at 8:18

GoogleCodeExporter commented 9 years ago
Which version of Informix you are trying to connect?

Original comment by rahul.pr...@in.ibm.com on 22 Mar 2012 at 8:21

GoogleCodeExporter commented 9 years ago
Please let us know if you are still have the connection problem.

Original comment by rahul.pr...@in.ibm.com on 9 Jul 2012 at 8:11

GoogleCodeExporter commented 9 years ago

Original comment by rahul.pr...@in.ibm.com on 13 May 2013 at 6:20

GoogleCodeExporter commented 9 years ago
are there any news on this? 
i'm having the same problem and it's definitely the right port..

I get:

sqlalchemy.exc.OperationalError: (OperationalError) 
ibm_db_dbi::OperationalError: [IBM][CLI Driver] SQL30081N  A communication 
error has been detected. Communication protocol being used: "TCP/IP".  
Communication API being used: "SOCKETS".  Location where the error was 
detected: "172.19.18.15".  Communication function detecting the error: "recv".  
Protocol specific error code(s): "*", "*", "0".  SQLSTATE=08001 SQLCODE=-30081 
None None

-------------------------

I tried:
SA: 'ibm_db_sa://user:pass@172.19.18.15:9088/test:INFORMIXSERVER=ol_aisql'

and also not using SA, but the regular ibm_db and ibm_dbi with db2cli.ini:
import ibm_db
ibm_db_conn = ibm_db.connect('test','user','pass')
import ibm_db_dbi
conn = ibm_db_dbi.Connection(ibm_db_conn)
conn.tables('SYSCAT', '%')

thanks

Original comment by andr...@nuessle.in on 26 May 2014 at 3:01

GoogleCodeExporter commented 9 years ago
i thought that i would bump this issue to see if we can put it to rest once and 
for all. i see the same error as the commentor above:

Traceback (most recent call last):
  File "test.py", line 24, in <module>
    ibm_db_conn = ibm_db.connect('pyinformix','username', 'password')
Exception: [IBM][CLI Driver] SQL30081N  A communication error has been 
detected. Communication protocol being used: "TCP/IP".  Communication API being 
used: "SOCKETS".  Location where the error was detected: "10.2.6.18".  
Communication function detecting the error: "recv".  Protocol specific error 
code(s): "*", "*", "0".  SQLSTATE=08001 SQLCODE=-30081

where 'pyinformix' is an entry in the db2cli.ini file like so:

[pyinformix]
Database=mydb
Protocol=tcpip
Hostname=susevm
Port=18001
Servicename=informix
;Servicename=18001
uid=username
pwd=password

the client is an Ubuntu 14.01 server using python 2.7 using sqlalchemy 0.9.x. 
the database server is Suse 11 sp3 with an informix server that is 11.7.

the same error occurs when i use the ibm_db_sa incantation:

engine = 
create_engine('ibm_db_sa://username:password@susevm:18001/mydb:INFORMIXSERVER=su
sevm')

the above does not throw the error, but occurs when i attempt to execute an SQL 
statement:

objs = engine.execute(sql)

that's when the above error is thrown.

one last thing: this all works with the informixdb interface when using 
sqlalchemy 0.8.x:

engine = 
create_engine('informix+informixdb://username:password@susevm:18001/mydb:INFORMI
XSERVER=susevm')

so communication between client and server is possible.

any help you might be able to provide would be greatly appreciated.

thanks in advance.

Original comment by sk...@carthage.edu on 7 Mar 2015 at 10:26

GoogleCodeExporter commented 9 years ago
informixdb uses ONSOCTCP protocol and ibm_db uses TCPIP, and port number for 
both should be different but you have provided the same port number for the 
both.

Since you are able to connect Informix server with informixdb then it should be 
ONSOCTCP port number,In db2cli.ini file you already have provided the port 
number then "Servicename=informix" is not required, please try with correct 
TCPIP port number and let us know in case of any issues

Original comment by rahul.pr...@in.ibm.com on 9 Mar 2015 at 6:43