ibmdb / vscode-extension

vscode extenstion for db2 as db2connect
7 stars 2 forks source link

Cannot connect to DB2 LUW. #31

Closed PaulCaballero closed 3 years ago

PaulCaballero commented 3 years ago

Hi Team, I'm trying to connect to our DB2 on cloud (which is DB2 LUW), but I'm having this error;

SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "recv". Protocol specific error code(s): "10054", "*", "0". SQLSTATE=08001

akhilravuri1 commented 3 years ago

Hi @PaulCaballero

Can you share the connection string which you are using?

Thanks, Akhil

PaulCaballero commented 3 years ago

Hi @akhilravuri1

Here is my sample connection, in one of my tool that I currently using.

jdbc:db2://<<'hostname'>>/bludb:user=<<'id'>>;password=<<'password'>>;sslConnection=true;

Thanks, Paul C

akhilravuri1 commented 3 years ago

Hi @PaulCaballero

you cannot pass the java connection string as our extension uses the cli driver. So please pass the connection string in cli driver format. HOSTNAME=*****;DATABASE=sample;PORT=50000;UID=***;PWD=***

Thanks, Akhil

PaulCaballero commented 3 years ago

Hi @akhilravuri1 ,

Yes, sorry forgot to remove the java part, but I already followed the format you provided:

I created first a connection profile: db2_conn1

akhilravuri1 commented 3 years ago

Hi @PaulCaballero

So that means you are not passing sslConnection=true in the connection string as profile does not allow you to save this option?

Thanks, Akhil

PaulCaballero commented 3 years ago

Hi @akhilravuri1

Good Day! Yes that is correct. Can I include it on the DATABASE like "BLUDB:sslConnection=true;"?

Thanks, Paul C

akhilravuri1 commented 3 years ago

Hi @PaulCaballero

Sorry for the late reply.

You cannot save like that in the profile.

Reformat your connection string to the below format:

DATABASE=BLUDB;HOSTNAME=hostname;PORT=sslport;PROTOCOL=TCPIP;UID=xxxxx;PWD=xxxxx;security=ssl

And paste the connection string in option1(Connect) where you can pass connection string.

Thanks, Akhil

PaulCaballero commented 3 years ago

Hi @akhilravuri1 ,

Good Day! Now for some reason, I'm getting this error, upon creating a connection.

Thanks, Paul C db2 error

akhilravuri1 commented 3 years ago

Hi @PaulCaballero

what is your vscode version?

Thanks, Akhil

akhilravuri1 commented 3 years ago

Sorry for the trouble. A new version of vscode(1.56) with a major electron version is released.

We have released a new version. Please uninstall the existing one, reload the vscode and install the latest one.

Please let me know if you have any trouble.

Thanks, Akhil

PaulCaballero commented 3 years ago

Hi @akhilravuri1 ,

sorry for the late reply. I tried it but no luck, I got the same error.

Thanks, Paul C.

akhilravuri1 commented 3 years ago

What is your vscode version and platform?

PaulCaballero commented 3 years ago

version: 1.56.2 platform: windows machine.

akhilravuri1 commented 3 years ago

Hi @PaulCaballero

I just installed the extension on windows. It is working fine for me.

Can you please send us the log output?

How to take the log? please see https://github.com/ibmdb/vscode-extension/issues/20#issuecomment-694261954

Thanks, Akhil

PaulCaballero commented 3 years ago

Hi @akhilravuri1,

See below screenshot, something about permission:

Thanks, Paul C

db2 error log

akhilravuri1 commented 3 years ago

Hi @PaulCaballero

Sorry for the trouble. Uninstall the extension. close the vscode. And cd to c:\Users\PAULCABALLERO.vscode\extensions and delete ibm.db2connect-2.1.4 folder and open the vscode and install the extension again.

Sometimes after uninstalling the extension...vs codes does not clean the folder.

Please feel free to comment if this doesn't work

Thanks, Akhil

PaulCaballero commented 3 years ago

Hi @akhilravuri1 ,

Now I'm connected. Thanks for all your help. Much appreciate..

Paul C

successful connection

PaulCaballero commented 3 years ago

Closing Issue now, thanks for all the help @akhilravuri1.