Problem connecting DBeaver to Apache Ignite Database server, handshake failed - ignite

I am new to apache-ignite DB and Dbeaver. I was trying to connect to existing apache-ignite DB from newly downloaded DBeaver IDE.
First you have to choose the type of DB connection (you are given option to choose, like PostGre, Apache-ignite, etc) in my case I choose apache-ignite.
On next step, you have to fill the address of your DB (it is written localhost by default, in my case DB is on remote server, so I filled in IP address of the server) and also 10800 port (as it's standart).
also I filled in the username and password for DB.
After these I pressed Test connection and got this kind of error :
Handshake failed [driverProtocolVer=ClientListenerProtocolVersion [major=2, minor=9, maintenance=0], remoteNodeProtocolVer=ClientListenerProtocolVersion [major=2, minor=8, maintenance=2], err=Unsupported version.]

This error means that apache-ignite driver on your computer and on database claster are different. In my case, my local version 2.9.0 was higher than claster's version 2.8.2.
I had to downgrade my version locally to be able to connect to DB.
Drivers can be downloaded from official website of apache-ignite.
After you download and install drivers, go to your connection in DBeaver and follow steps:
Edit Connection
Edit Driver settings
Add new files of downloaded correct driver version manually, with Add File
Test connection

Related

How to specify the CLI (driver properties) in a PHP PDO connection?

Here is a tough one. So I managed to connect to our IBM DB2 database using Windows ODBC DNS method and via the catalogued name. I have the php_pdo_ibm.dll module loaded and it works when connecting doing:
$connection = new PDO('ibm:SomeDB2CataloguedDBName');
The catalogued name (ie: alias) does have the following specified:
db2 update dbm cfg using SSL_CLNT_STASH "C:\somefile.kdb"
db2 update dbm cfg using SSL_CLNT_KEYDB "C:\somefile.kdb"
In the ODBC screen, those parameters are also specified in the Advanced Settings screen:
I know that I can connect using the ODBC connection even if the DB2 DB alias has not been set up as the 3 required SSL parameters are specified there in the db2cli.ini file.
My question is, how can I use the new PDO(.....) in PHP without referencing the DB2 alias nor the ODBC DNS? I expect I would need some sort of special connection string? Thanks.
You can refer to the documentation, which shows an example of connecting via either a DSN alias , or via a connection string with explicit properties.
Both methods should let you make the connection with SSL successfully, assuming your environment is correctly configured.
For connecting with explicitly URL connection string, You need to know the correct Db2 driver name (which may differ from the one shown in the documentation) - your question does not mention which Db2 driver type you are using.
From that documentation page here is a connection URL example:
$db = new PDO(
"ibm:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=testdb;" .
"HOSTNAME=11.22.33.444;PORT=56789;PROTOCOL=TCPIP;UID=testuser;PWD=testpass",
"",
"");
Depending on the Db2 driver name and version, you can add connection properties in the db2dsdriver.cfg XML file (for use with the DSN connection method), or you can place these properties in the connection URL along with any other required properties to make the connection work.
If you are using a Db2 driver that is recent (newer than year 2016) then you can get an SSL connection from CLI applications (like PHP) without needing to use a statically created keystore and without needing to separately deploy the IBM GSK8. This is possible if you have the Db2-instance (or server) certificate in ARM file format and you supply its fully qualified name with the connection attribute SSLServerCertificate="c:/path/to/certificate file"; along with Security=SSL, assuming your target Db2-server environment is already suitably configured. For details, refer to the Db2 Knowledge center for you Db2 server version.

IIB - DLL Initialization Error in Connecting to DB2 ODBC DSN via mqsicvp

Getting the following error while using mqsicvp to test connectivity to a ODBC data source from IBM Integration Console.
C:\Program Files\IBM\IIB\10.0.0.9>mqsicvp DEFAULTBRK -n MSAPP -v
BIP8299I: User 'db2admin' from security resource name 'odbc::MSAPP' will be used for the connection to datasource 'MSAPP'.
BIP2393E: Database error: ODBC return code '-1' from data source ''MSAPP'' using ODBC driver manager ''odbc32.dll''.
The integration node received an error when processing a database operation. The ODBC return code was '-1'. See the following messages for information obtained from the database about this error.
Use the following messages to determine the cause of the error. Typical problems are an incorrect data source, or table names. Correct either the database or the integration node configuration. Use the mqsicvp command to test connectivity to this database.
BIP2322E: Database error: SQL State ''IM003''; Native Error Code '160'; Error Text ''Specified driver could not be loaded due to system error 1114: A dynamic link library (DLL) initialization routine failed. (IBM DB2 ODBC DRIVER - DB2COPY1, C:\PROGRA~1\IBM\SQLLIB\BIN\DB2CLIO.DLL).''.
The error has the following diagnostic information: SQL State ''IM003'' SQL Native Error Code '160' SQL Error Text ''Specified driver could not be loaded due to system error 1114: A dynamic link library (DLL) initialization routine failed. (IBM DB2 ODBC DRIVER - DB2COPY1, C:\PROGRA~1\IBM\SQLLIB\BIN\DB2CLIO.DLL).''
This message may be accompanied by other messages describing the effect on the integration node itself. Use the reason identified in this message with the accompanying messages to determine the cause of the error. Use the mqsicvp command to test connectivity to this database.
BIP8040E: Unable to connect to the database.
The database cannot be accessed with the specified user Id and password pair.
- Check that the database is running.
- Check that the database has an adequate number of database connections available for use.
- On Windows, check that an ODBC connection has been created.
- On systems that use $ODBCINI, check that the file pointed to by $ODBCINI has been correctly updated.
- On z/OS check the BIPDSNAO member of the component's dataset, and check the DB2 64bit ODBC driver (DSNAO64C) is in the STEPLIB.
- Use mqsisetdbparms to set the password to the correct value and try again.
Software: Windows 10 / IIB 10 / DB2 Server
Steps to reproduce:
Set up ODBC (64-bit) connectivity to a new DB2 database in the form of a System DSN (using the IBM DB2 ODBC Driver version 11.01.2020.1393)
Test that connectivity works from ODBC data source administrator app
Use mqsisetdbparms from IBM Integration Console to set the user and
password
mqsisetdbparms DEFAULTBRK -n odbc::MSAPP -u uid -p pwd
Stop and start the broker
Use mqsicvp to test connectivity
mqsicvp DEFAULTBRK -n MSAPP
The DLL mentioned in the error is at C:\PROGRA~1\IBM\SQLLIB\BIN and this is included within PATH variable already.
I'm not sure why the driver manager odbc32.dll is being used - I presume this is a 32-bit version. However if I try creating a DSN in the 32-bit ODBC data source administrator app, mqsicvp fails with an error saying the architectures do not match.
Suggest you download the fix from IBM for bug IT23069. It is available (indirectly) from this page which eventually redirects to IBM fix central. Worked for me.
The newest developer edition toolkit, 10.0.0.12, seems to have fixed this.

Why is WLST not recognizing the user/password in the key and config file in connect() call?

I'm trying to connect to an admin server in WLST using config and key files. There are no error messages but I am prompted for a username and password. These files were created (by another developer who is long gone[1]) with the storeUserConfig() command. My call to connect looks something like this: connect(userConfigFile=configFile, userKeyFile=keyFile, url='t3://somehost:7031')).
Is there some restriction in using these files, such as it can only be used on the host where created, or it needs access to the domain's boot.properties file?
Note: I'm trying to connect to an admin server on a different host and non-standard port (e.g. not 7001). The server I am running WLST on and the remote host are the same version of Weblogic.
Some of the things I have tried:
verified that these files appear correct, the key file being binary data and the config file having a line for "weblogic.management.username={AES}..." and "weblogic.management.password={AES}...".
verified that there is a server on the specified port by entering a known login and password that is successful
specified the admin server in the connect parameter
turn on debug(true); the only output is <wlst-debug> connect : Will check if userConfig and userKeyFile should be used to connect to the server and another line giving the path to the userConfig file
turn on Python logging in jython with -Dpython.verbose=debug; nothing relevant to decryption operation
Munging the key or the config files generates no error messages and behaviour as above
[1]: These files are still used today by other existing WLST scripts. However, these scripts are so convoluted and deliberately obfuscated that they are very difficult to reverse-engineer how connect() is being called.
You do not need to access to the domain's boot.properties file. You just need to make sure the configFile and keyFile pointing to the right files. FYI, here is one of the commands we are using:connect(userConfigFile='./user.secure',userKeyFile='./key.secure',url='t3://somehost:7001')
Have you check the network connectity that might be having a firewall in between that troubling you, check the traceroute from the script machine to the Remote machine. Recently I have faced simalar issue. once the routing table updated with allow the WL admin server port everything got set.
Hope this could helps you!
I had this problem too. In a script, I exported the Linux variables userConfigFile and userKeyFile. Then I connected by running:
url='t3://localhost:7002'
userConfigFile='$userConfigFile'
userKeyFile='$userKeyFile'
connect(userConfigFile=$userConfigFile, userKeyFile=#userKeyFile, url=url)
That all worked in a script, but would not work interactively. I changed to doing the following:
url='t3://localhost:7002'
userConfigFile='/users/me/weblogic-2014/weblogic-admin-WebLogicConfig.properties'
userKeyFile='/users/me/weblogic-2014/weblogic-admin-WebLogicKey.properties'
connect(userConfigFile=userConfigFile, userKeyFile=userKeyFile, url=url)
And that worked interactively.

Proper DSN to connect to Sybase using PDO

I'm trying to connect to a Sybase (SQL Anywhere 12) database using PHP's PDO. I spent hours trying to find the correct driver and DSN to use, with NO success AT ALL. Everytime I try to edit a single parameter I always get errors. I tried tens of different combinations of DSN parameters, nothing happens. I'll report here only a few just to give you example of what I'm trying to obtain.
I successfully installed PDO drivers - from php.ini:
PDO drivers dblib, mysql, odbc, pgsql
PDO Driver for FreeTDS/Sybase DB-lib enabled
Flavour freetds
DB params:
The IP for the DB is 192.168.100.234 and both the db instance and db name are GAMMA01. I can't tell you username and password, but let's say: user dba and pwd allright.
I can ping the server from the server where I try to start the connection.
I'm under Linux Debian Squeeze and PHP 5.3.3.
DBLIB:
I'm not able to find the correct DSN to use in order to connect to my Database server.
DSN version 1:
'dblib:host=192.168.100.234;DBN=GAMMA01'
DSN version 2:
'dblib:host=192.168.100.234;DBN=GAMMA01;UID=dba;PWD=allright;Server=GAMMA01;ASTART=No'
DSN version 3:
new PDO('dblib:host=192.168.100.234;dbname=GAMMA01', 'dba', 'allright');
Error I get
SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)
FreeTDS error log (trying with both versions 5.0 and 7.0, no difference):
log.c:190:Starting log file for FreeTDS 0.82
on 2014-04-08 13:40:40 with debug flags 0x4fff.
iconv.c:363:iconv to convert client-side data to the "ANSI_X3.4-1968" character set
iconv.c:516:tds_iconv_info_init: converting "US-ASCII"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:210:Connecting to 192.168.100.234 port 5200 (TDS version 7.0)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:299:getsockopt(2) reported: Connection refused
util.c:334:tdserror(0xb9a46eb0, 0xb9b60688, 20009, 115)
dblib.c:7782:dbperror(0xb9b5ff88, 20009, 115)
dblib.c:7835:20009: "Unable to connect: Adaptive Server is unavailable or does not exist"
dblib.c:5627:dbgetuserdata(0xb9b5ff88)
dblib.c:7856:"Unable to connect: Adaptive Server is unavailable or does not exist", client returns 2 (INT_CANCEL)
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
net.c:310:tds_open_socket() failed
dblib.c:1372:dbclose(0xb9b5ff88)
dblib.c:256:dblib_del_connection(0xb5ceea00, 0xb9b60688)
mem.c:563:tds_free_all_results()
dblib.c:303:dblib_release_tds_ctx(1)
dblib.c:5727:dbfreebuf(0xb9b5ff88)
dblib.c:718:dbloginfree(0xb9b46588)
Using sybase: DSN:
'sybase:host=192.168.100.234;dbname=GAMMA01, dba, allright'
Error:
could not find driver
ODBC:
I'm not able to connect with ODBC drivers. I read the guide here: http://www.sybase.com/files/White_Papers/PHP_SQL_Anywhere.pdf and downloaded the proper .so package here: http://scn.sap.com/docs/DOC-40537 but I can't make PHP recognize the package, load it and use it.
DSN:
'odbc:Driver={Sybase SQL Anywhere 12};NA=192.168.100.234,5200;Uid=dba;Pwd=allright;'
'odbc:Driver={SQL Anywhere 12};NA=192.168.100.234,5200;Uid=dba;Pwd=allright;'
'odbc:DRIVER={Sybase SQL Anywhere 12};SRVR=192.168.100.234;DB=gamma01;UID=dba;PWD=allright;'
'odbc:DRIVER={Sybase SQL Anywhere 12};HOSTNAME=192.168.100.234;DATABASE=gamma01;UID=dba;PWD=allright;PROTOCOL:TCPIP'
Error I get:
SQLSTATE[IM002] SQLDriverConnect: 0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
Which driver should I use to connect to Sybase db? Which is the correct DSN?
The "Data source name not found and no default driver specified." error means that the DSN or Driver you are specifying cannot be found in the odbc.ini file for your ODBC environment.
You need to make sure that your ODBC environment is setup properly. Typically, this includes a specification for the location and file name of the odbc.ini file.
Upon attempting to connect, the odbc.ini file will be searched to find a matching Data Source Name (DSN)
In your case, you are specifying a "Driver". This is a similar configuration usually found in the odbcinst.ini file; also specified by your ODBC environment.
Another thing to check for is to make sure that the ODBC environment is being found by the running process or owning user for your PHP app.
The key is to figure out what part of the connection sequence is failing. In your case, a successful connection would follow this path:
Application is started
ODBC Connection is attempted
ODBC Environment is searched to find the configuration file (usually odbcinst.ini for "Driver" configurations)
Finds a match for the value specified for "Driver=" in connection string
Connection is attempted using the values configured in the found Driver section along with other options provided in connection string.
The two main things that cause the error you are getting are these:
ODBC Environment is not configured
The DSN or Driver value is not spelled correctly.
I hope this helps.
Tony Hall

Error Opening CrystalReport viewer

I have this problem which I am trying to debug for a lot of time.
The setup is like this:
i. The application is a Windows application developed using VS2005, .net 2.0.
ii. I use the Cyrstal reports component Crystal Report Viewer and dynamically display various reports in the same form.
iii. The db is SQLSERVER Express 2005 and situated on a different machine.
When I run the application on the db server, I am able to view the report. However, when I run the application on a different machine which is connected to the above dbServer, I get an error. ( I dont get this error on my dev setup)
Source: CrystakReprotViewer.CS:SendDBLogonForReport() Details:Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
SQL State: 08001
Native Error:
Error in File C:\DOCUME~1\admin\LOCALS~1\Temp\ActionPoints {52820D22-199C-4D46-A76B-70A55D9F54D5}.rpt:
Unable to connect: incorrect log on parameters. at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable)
at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)
at Trivalve.UI.Client.Reports.CrystalViewer.CrystalReportViewer.SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument) in D:\Ramjee\Work\Projects\Trivalve\Trivalve\src\tfssetup\2008\Trivalve_2008\Trivalve\Reports\CrystalViewer\CrystalReportViewer.cs:line 127 rptcontrollers.dll SetTableLocation
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Thanks,
Ramjee
Use datasource=servername or ip address\instance name if available,port number
Default port number is 1433 or 1434
My problem was solved with this. Posting for the use of others.
If this is a standard installation of SQL Server Express, bear in mind that the only connection method installed by default is shared memory, and is only available on the server -- you would need to enable another connection protocol such as Named pipes or TCP/IP. To turn networking on, Use SQL Server Configuration Manager to enable relevant protocols and start SQL Browser.
It's telling you exactly what's wrong.
Details:Logon failed.
Great, we can't logon.
(Invalid Instance()).]Invalid
connection.
Okay. I bet we have "localhost" as part of the instance name in my connection string. Since I'm no longer on the "localhost", this obviously won't work. Let's try there first. Then perhaps it's the credentials that I'm using to query my database. Usually what I do is create a RO user that can only do selects on my db and use that for CR. If none of these are getting me close, let's try making sure that remote connections are enabled for SQLEXPRESS
Unable to connect: incorrect log on
parameters.
Ok it's definitely a connection issue.