Problems with connection

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
hansjoergp
Posts: 39
Joined: Wed 31 May 2017 14:33

Problems with connection

Post by hansjoergp » Tue 18 May 2021 08:57

Hello,

if we open an direct connection with the hostname we get always an ORA-03113 error (Devart.Data.Oracle.OracleException(0x80004005): ORA-0113: end-of-file on communication channel in Devart.Data.Oracle.Communication.Connect....
The connection works both with Direct = false and the OracleManagedDataAccess library.
The connection with Devart in DirectMode only works if I use either the IPv4 or the IPv6 address. But not with the hostname

With tnsping I get the following information (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PRO
TOCOL=TCP)(HOST=fe80::900d:6ed2:637b:851%12)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(
HOST=169.254.205.37)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.123.5)(PORT
=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.5)(PORT=1521)))
OK

Tnsping works with IPV6, IPV4 and Hostname

What can we do to solve the problem?

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Problems with connection

Post by DmitryGm » Tue 25 May 2021 13:44

The ORA-03113 error is caused by some system or network problem. This error is so common that it is unlikely that one will find the exact reason without additional information, so you will need to learn how to debug this particular error by reading log and/or trace files. Usually dotConnect for Oracle in the Direct mode can connect by hostname as well as by IP.

hansjoergp
Posts: 39
Joined: Wed 31 May 2017 14:33

Re: Problems with connection

Post by hansjoergp » Mon 07 Jun 2021 12:07

Why the connection is working with all other Oracle drivers, with direct mode = false...?

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Problems with connection

Post by DmitryGm » Mon 07 Jun 2021 15:53

hansjoergp wrote: Mon 07 Jun 2021 12:07 Why the connection is working with all other Oracle drivers, with direct mode = false...?
With Direct mode = false, dotConnect for Oracle works in the OCI mode, so it uses the connection settings specified in the Oracle Client configuration file - tnsnames.ora. How is your Oracle server alias described in that file? Is the "HOST" parameter specified as an IP or hostname?

hansjoergp
Posts: 39
Joined: Wed 31 May 2017 14:33

Re: Problems with connection

Post by hansjoergp » Tue 22 Jun 2021 11:55

in the tnsnames.ora it works in boot ways. With hostname and IP. The same is with the oracle managed driver

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Problems with connection

Post by DmitryGm » Wed 23 Jun 2021 12:37

Please show us an example of your connection string in Direct mode (mark confidential information with asterisks).

hansjoergp
Posts: 39
Joined: Wed 31 May 2017 14:33

Re: Problems with connection

Post by hansjoergp » Thu 24 Jun 2021 05:18

We make the connection string with the OracleConnectionStringBuilder
This is the log:

Code: Select all

24.06.2021 07:13:25 0,203 Open connection: "User Id=RADIX;Server=SERVER;Connection Timeout=15;Pooling=True;Max Pool Size=30;Validate Connection=True;Direct=True;Statement Cache Size=1000;Sid=SID;Port=1521;Trim Fixed Char=False;Number Mappings=((FLOAT,0,100,System.Double),(NUMBER,1,1,System.Int32),(NUMBER,2,38,System.Decimal));Describe Stored Procedure=False;" Complete

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Problems with connection

Post by DmitryGm » Thu 24 Jun 2021 18:23

So, the "SERVER" is the hostname of your Oracle server, and you specify HOST=SERVER in the tnsnames.ora file, don't you?

Does the command: "ping SERVER" resolve the name to IP like this?

Code: Select all

Pinging SERVER.local [192.168.20.231] with 32 bytes of data:
Reply from 192.168.20.231: bytes=32 time<1ms TTL=127

hansjoergp
Posts: 39
Joined: Wed 31 May 2017 14:33

Re: Problems with connection

Post by hansjoergp » Fri 25 Jun 2021 05:22

yes. Ping resolves the name.

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Problems with connection

Post by DmitryGm » Fri 25 Jun 2021 11:34

hansjoergp wrote: Fri 25 Jun 2021 05:22 yes. Ping resolves the name.
That's good, but we need more information for solving the problem.
  • Is it IP4 or IP6?
  • Is "SERVER" the same name you specify in the tnsnames.ora file?

hansjoergp
Posts: 39
Joined: Wed 31 May 2017 14:33

Re: Problems with connection

Post by hansjoergp » Fri 25 Jun 2021 14:11

The response for the ping is:

Code: Select all

Esecuzione di Ping host.domain.local [fe80::900d:6ed2:637b:851%12] con 32 byte di dati:
Risposta da fe80::900d:6ed2:637b:851%12: durata<1ms
Risposta da fe80::900d:6ed2:637b:851%12: durata<1ms
Risposta da fe80::900d:6ed2:637b:851%12: durata<1ms
Risposta da fe80::900d:6ed2:637b:851%12: durata<1ms

Statistiche Ping per fe80::900d:6ed2:637b:851%12:
    Pacchetti: Trasmessi = 4, Ricevuti = 4,
    Persi = 0 (0% persi),
Tempo approssimativo percorsi andata/ritorno in millisecondi:
    Minimo = 0ms, Massimo =  0ms, Medio =  0ms
The name for server is the same as in the tnsnames file. We have seen these behaviour on a few other environments too.
Thanks

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Problems with connection

Post by DmitryGm » Tue 29 Jun 2021 11:53

We are trying to reproduce the issue in our environment and shall inform you as soon as we have any results.

hansjoergp
Posts: 39
Joined: Wed 31 May 2017 14:33

Re: Problems with connection

Post by hansjoergp » Tue 29 Jun 2021 12:01

If you have some version which logs more, I can make a test with this version and send you the results

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: Problems with connection

Post by DmitryGm » Thu 01 Jul 2021 15:39

Just a suggestion: as we can see, the reverse name of that ipv6 address is not SERVER but host.domain.local

Try specifying "Server=host.domain.local;" in the connection string (Direct mode). Does it work?

hansjoergp
Posts: 39
Joined: Wed 31 May 2017 14:33

Re: Problems with connection

Post by hansjoergp » Fri 02 Jul 2021 05:11

It is the same situation. In direct mode it is not working. Without direct mode or with the oracle clients it is working

Post Reply