Closed bbozo closed 6 years ago
Can you check if you have firewall enabled, if yes then please allow http://public.dhe.ibm.com.
@arvindgu my development machine can access all public HTTP addresses including that one, and the connection parameters work for sure because the connection works with JDBC (see the gist in the OP), should the DB2 server also have access to the above mentioned IP?
The ibm_db gem auto-downloads the required CLI package and unzip it while ibm_db gem installation.
bbozo@eva:~/dev/ruby-ibmdb/IBM_DB_Driver (master) $ rake /home/bbozo/.rvm/rubies/ruby-2.2.3/bin/ruby extconf.rb
I see you are running above command. When ibm_db gem is already installed, then you should not run ibm_db gem extconf.rb file. Is there any specific reason for running this?
I need db2 traces for hang issue with ibm_db gem. Please refer instructions for collecting db2 traces mentioned in issue #43. Also check whether #43 is applicable in your case.
@arvindgu the core issue is that the connection attempts hangs, the issue with extconf.rb
relates to my attempts to run the tests :)
ibm_db (3.0.1)
which has that issue fixed.Also, in my case the loading of the gem goes fine
2.2.4 :001 > require 'ibm_db'
=> true
Fortunately, we know that the JDBC driver connects fine, so it seems that the DB2 server is up as it should be and that network etc is OK. Could you please check out THIS GIST and see if I do anything wrong with building the DSN or using it in IBM_DB.connect
?
I see you are connecting to IBM AS400 machine. Hence you need to copy DB2Connect license to ibm_db_gem_install_dir/lib/clidriver/license directory. After this the connection should work.
@arvindgu DB2Connect license? :D first news, can you help? where can I find that?
As you mentioned that using JDBC driver under JRuby works. Are you using IBM DB2 JCC driver?
@arvindgu I'm using jt400.jar
for connecting with JDBC, but the connection from SQLDeveloper using db2jcc.jar
& db2jcc_license_cu.jar
doesn't work (connection hangs), do you think it's also a licensing issue?
Do you have any suggestion regarding using the ODBC driver under YARV Ruby and CentOS versus the IBM_DB ruby driver, is ODBC a viable alternative in this case?
Also, should the documentation be updated to say that connecting to AS400 requires an extra paid license or the connection hangs? :)
Our current ruby driver works with ODBC driver, and I hope you would have tried with it, Hence closing.
@bbozo did you ever really resolve this. I'm having the exact same issue. I'm not using java, im using the ibm_db gem and the connection hangs when trying to connect to IBM as400.
@sterankin there's a lot of years now between then and now and I don't know how IBM stands with NDAs regarding communication with their tech support and sales - but I'm assuming they're on the evil side about it together with Oracle.
Long story short: I'm guessing you'll have to talk with IBM - I wish you better luck than mine about it
Thanks - I am reading that I might need a db2 connect license somewhere, so I am following that line of enquiry. Just was checking if this was your solution or not as this issue was closed without real resolution.
From: bbozo notifications@github.com Sent: Monday, November 18, 2019 7:02:03 PM To: ibmdb/ruby-ibmdb ruby-ibmdb@noreply.github.com Cc: sterankin sterankin@hotmail.com; Mention mention@noreply.github.com Subject: Re: [ibmdb/ruby-ibmdb] Connection hangs when connecting to DB2 (#60)
@sterankinhttps://github.com/sterankin there's a lot of years now between then and now and I don't know how IBM stands with NDAs regarding communication with their tech support - but I'm assuming they're on the evil side about it together with Oracle.
Long story short: I'm guessing you'll have to talk with IBM - I wish you better luck than mine about it
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ibmdb/ruby-ibmdb/issues/60?email_source=notifications&email_token=ACXE4NYDUN3SPXAOZB3QJPLQULRCXA5CNFSM4CD2GSB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEELRIMA#issuecomment-555160624, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACXE4N6T5IOAPSGNSI6ZCM3QULRCXANCNFSM4CD2GSBQ.
Thanks - I am reading that I might need a db2 connect license somewhere, so I am following that line of enquiry. Just was checking if this was your solution or not as this issue was closed without real resolution.
Same here
Thanks - I am reading that I might need a db2 connect license somewhere, so I am following that line of enquiry. Just was checking if this was your solution or not as this issue was closed without real resolution.
Same here
So did you actually solve it with help from IBM? I have contacted them for support, anyhelp you can provide would be useful.
So did you actually solve it with help from IBM? I have contacted them for support, anyhelp you can provide would be useful.
I think they asked the client to take the DB2 Connect license, at that point the Cc list changed :-) and I never heard about it again
Dear all,
we are using the sequel gem to connect to a DB2 instance (v10.5 FP5). When we try to connect (either by executing a test select statement in
sequel
or runningIBM_DB.connect
directly) the connection hangs in a way that onlykill -9
resolves.Since
IBM_DB.connect
fails in the exactly same way as theSequel.select
whenibm_db
is in use, I'm assuming that it's the same problem.The connection works with same parameters using the JDBC driver under JRuby, here's the reproducing code: https://gist.github.com/bbozo/df9f5992e777b64984c22f67106e366b
I have tried figuring out if I'm doing something wrong and make sure that the tests pass on ruby-2.2.4, but the adapter tests return:
and the driver tests (what is the difference btw? :)) return:
I'm unsure how to proceed so please advise.
PS we're probably also affected by #31 and #45 as we use Postgres as main database and DB2 as archive database, is there a time plan for those so we know if C ruby is an option given project schedule?