ODP.NET + Unexpected traffic on port 6200 (Oracle Notification Services)

Tom*_*day 5 oracle odp.net odp.net-managed

We've got a client using our product, which includes a windows service built using .NET 4+, Entity Framework, and ODP.NET. For some reason in one particular installation, but not any other, the windows service appears to be generating traffic on 6200. Oracle Documentation indicates this is the port Oracle Notification Services uses. This is unexpected because our product does not utilize ONS. I've found other Oracle Documentation that indicates that RAC / Fast Failover also uses ONS, but we've confirmed with the client that they do not use RAC in any environments, and we are not using the RAC options in the connection string. We are also not (to our knowledge) using Database Change Notifications or doing any cache/verification of cached data, which it sounds like also leverages ONS.

Can anyone help explain why we would be generating port 6200 traffic, and more importantly, how to get it to stop? Thanks!

网络统计结果

任务管理器

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings [Redacted] />
  <appSettings [Redacted] />
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
      <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    </providers>
    <contexts>
      <context type="[Redacted]" disableDatabaseInitialization="true" />
    </contexts>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="Oracle.ManagedDataAccess.Client" />
      <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    </DbProviderFactories>
  </system.data>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" />
  </runtime>
</configuration>
Run Code Online (Sandbox Code Playgroud)

Tom*_*day 1

我们已将罪魁祸首缩小到 3 个 Oracle/ODP.NET 特定连接字符串设置中的一个或多个:

ENLISTHA EVENTS、 和/或LOAD BALANCING

Oracle 关于快速应用程序通知的文档向我们提示了这些我们不知道的设置。这引导我们找到 Oracle 关于其所有功能连接字符串属性的文档。

登记- 默认“true” - 服务组件自动登记在分布式事务中。

HA 事件- 默认“false” - 启用 ODP.NET 连接池在 RAC 服务、服务成员或节点出现故障时主动从池中删除连接。

负载平衡- 默认“false” - 启用 ODP.NET 连接池根据负载平衡建议和服务目标平衡 RAC 实例之间的工作请求。

我们将所有 3 个参数明确设置为 false,端口 6200 连接结束。

ENLIST=false; HA EVENTS=false; LOAD BALANCING=false;
Run Code Online (Sandbox Code Playgroud)

如果默认值是可信的,那么 Enlist 就是罪魁祸首,但客户端的可用性不允许进行离散测试来确认。我们还遇到过其他各种文档,将所有这 3 个功能链接到 Oracle 通知服务和端口 6200。