Hello,
I'm trying to connect to an IBM iSeries/AS400 DB2 database from a .net Core Console Application.
I'm getting the error below and I want to solve it:
ERROR [08001] [IBM] 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.65.2". Communication function detecting the error: "recv". Protocol specific error code(s): "*", "*", "0". SQLSTATE=08001
I'm sure that my connection information is correct because I succeeded using DBeaver (https://dbeaver.io/) with the DB2 iSeries/AS 400 connector using the same url and credentials that I'm trying in .net Core (from the same machine). DBeaver uses jdbc and a driver named: net.sf.jt400:jt400:RELEASE.
In the .net core code I'm using the nuget package IBM.EntityFrameworkCore which in turn uses the nuget package IBM.Data.DB2.Core.
These are the things I tried until now:
- Test 2.2.0.100 and 3.1.0.300 versions of the IBM.EntityFrameworkCore package.
- Try different values for the Interrupt parameter in the DB2ConnectionStringBuilder (0,1,2)
- Try connecting by IP.
- Tried with and without the LibraryList parameter.
- Tried almost all combinations for the SetServerInfo Server Type / Version combinations
DB2ConnectionStringBuilder connectionStringBuilder = new DB2ConnectionStringBuilder();
connectionStringBuilder.UserID = "xxx";
connectionStringBuilder.Password = "xxx";
connectionStringBuilder.Server = "xxx:xxx";
connectionStringBuilder.Database = "xxx";
connectionStringBuilder.LibraryList = "xxx(same as database)"; //tried with or without
connectionStringBuilder.Interrupt = 0; //tried 1,2,3
optionsBuilder.UseDb2(connectionStringBuilder.ConnectionString, si =>
{
si.SetServerInfo(IBMDBServerType.AS400, IBMDBServerVersion.AS400_07_02); //tried almost all combinations
});
Any help will be appreciated.
Thanks
#SupportMigration#IBMi#Support