Closed dorudumitru-hh closed 2 years ago
@dorudumitru-hh I am checking on this. I have acquired a similar configured mac system to reproduce the issue. Will have an update once tested.
Thanks
@dorudumitru-hh
I was able to reproduce the problem. So this issue is seen in mac new OS Monterey and above with respect to the changes made in the internal library of the mac. The library thats causing the issue is libstdc++.6.dylib.
Since the system library is missing the soft link we are shipping this library as part of the clidriver package and now in case of node because of library loading issue this causes a problem.
While we are yet to find a permanent solution to this, you can try the following work around which will allow you to work with SSL connection strings.
Remove the library libstdc++.6.dylib from the clidriver lib folder.
You may navigate to following path /Users/USERNAME/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/installer/clidriver/lib
.
Use terminal to navigate to the path and folder may not show directory starting with dot(.).
Once you are in this path rename the library libstdc++.6.dylib to something else like libstdc++.6.dylib_bkp
Once you do this we are all set to go. Restart the vscode session and try the SSL connection. Things should fine for you. Please let me know if this works for you now.
@amukherjee28 thanks for looking into this.
I know about this workaround from node ibm_db and I already tried it. It works fine in my node apps but not here.
If a rename the lib libstdc++.6.dylib located in /Users/USERNAME/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/installer/clidriver/lib
and try a SSL connection I get this in vscode status bar
I waited for about 15 minutes before giving up.
@amukherjee28 thanks for looking into this.
I know about this workaround from node ibm_db and I already tried it. It works fine in my node apps but not here. If a rename the lib libstdc++.6.dylib located in
/Users/USERNAME/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/installer/clidriver/lib
and try a SSL connection I get this in vscode status barI waited for about 15 minutes before giving up.
I hit the connect button and forgot about vscode, and now, 3 hours later, it's working fine. Don't know exactly what happened.
Its good to know that you are already aware of the work around for now. Coming to time taken for the driver to establish the connection, it depends on multiple things.
It is very difficult to determine as to what exactly caused the delay in the connection to the server. However you may try multiple times to check if the communication with the server is really that slow.
To cross check you can also try connecting to the same server using the same SSL server certificate via a simple node application. Ideally vscode uses the same logic to establish the connection.
But with the change in the clidriver library we are able to avoid the error previously faced.
I think the issue comes from the database I'm trying to connect. It has hundreds of schemas and if the extension is scanning all of those schemas on the first connection it takes a long time. After the first connection I assume that it does some caching and that's why the waiting period disappears. If this is the issue, maybe it will be useful to add an optional "schema" field in the profile so the connection will go directly to that schema, avoiding scanning everything else.
Thanks a lot for all the help.
Yes that is quite possible, as VSCODE extension not only connects to the server but also runs META DATA query on the databases to fetch the details from the database and populate the same in the tree view. If the connected server is heavily loaded with Schema, functions, Stored Procedures, routines and others we can expect a time in running all the queries and loading them in the tree view.
If this resolved this issue please close the issue.
When trying to connect to a database that requires a SSL connection this happens:
I tried connecting with both Option 1 and Option 3 Ex Option 1: DATABASE=mydb;HOSTNAME=myhost;UID=myuser;PWD=mypass;PORT=51000;PROTOCOL=TCPIP;Security=SSL;SSLServerCertificate=/absolute/path/to/cert
When trying to connect to a database that does not require a SSL connection everything is fine.