Giter Site home page Giter Site logo

Comments (10)

alexkeh avatar alexkeh commented on August 30, 2024 1

I filed bug 36736236 to track this issue.

from dotnet-db-samples.

alexkeh avatar alexkeh commented on August 30, 2024

Do you set the OracleConfiguration DbNotificationPort prior to opening your first connection? Typically, this error occurs after the first connection has already been opened and the port number is attempted to be set.

from dotnet-db-samples.

n-yates avatar n-yates commented on August 30, 2024

Yes, I'm pulling the configuration then setting the OracleConfiguration.DbNotificationPort in an IServiceCollection extension method. I then have a BackgroundService which contains the code above that creates the OracleAQQueue instance, opens the connection, and adds the event handler.

public static IServiceCollection AddAqSubscriber(this IServiceCollection serviceCollection, IConfiguration configuration)
{
    ...
    // Configure DB Notifications
    if (!int.TryParse(configuration[$"{QueueOptions.SectionName}:{nameof(QueueOptions.DbNotificationPort)}"], out int dbNotificationPort))
    {
        return serviceCollection;
    }

    OracleConfiguration.DbNotificationPort = dbNotificationPort;

    return serviceCollection;
}

Program.cs

public class Program
{
    protected Program() { }

    public static void Main(string[] args)
    {
        CreateHostBuilder(args).Build().Run();
    }

    public static IHostBuilder CreateHostBuilder(string[] args)
    {
        return Host.CreateDefaultBuilder(args)
            .ConfigureAppConfiguration((hostBuilderContext, builder) =>
            {
                ...
            })
            .ConfigureLogging((hostBuilderContext, loggingBuilder) =>
            {
                ...
            })
            .ConfigureServices((hostBuilderContext, services) =>
            {
                services.AddAqSubscriber(hostBuilderContext.Configuration);
            });
    }
}

from dotnet-db-samples.

alexkeh avatar alexkeh commented on August 30, 2024

Can you generate an ODP.NET trace and share it to see why the listener is started prior to opening the first connection? Here's how to generate an ODP.NET trace file. You can choose your own directory for the trace file location.

OracleConfiguration.TraceFileLocation = @"C:\traces";
OracleConfiguration.TraceLevel = 7;

Was this working before with an earlier ODP.NET Core version or 23.4.0 is the first time you are trying to use ODP.NET AQ in this way?

from dotnet-db-samples.

n-yates avatar n-yates commented on August 30, 2024

This is a new application. I had used an older version for a proof of concept, but that only ran on my local machine. We didn't discover an issue until we deployed it then investigated when the app wasn't receiving notifications. I'll provide a trace shortly. Based on my debugging I think the RegisterForChangeNotification method in OracleNotificationManager should reference OracleDependency.Port instead of OracleDependencyImpl.m_portForListening.

from dotnet-db-samples.

alexkeh avatar alexkeh commented on August 30, 2024

The dev team has a fix for the issue. It's very unlikely the fix will be part of 23.5 as that patch has been frozen. The fix will be scheduled for 23.6 then.

from dotnet-db-samples.

n-yates avatar n-yates commented on August 30, 2024

Excellent. Based on the version history on nuget.org I suspect that is a couple months out. Does that seem reasonable?

from dotnet-db-samples.

alexkeh avatar alexkeh commented on August 30, 2024

23.5 is planned to be released by July. 23.6 would be 3 months after 23.5, around October.

There's a possibility the ODP.NET team will release an interim patch between 23.5 and 23.6 on NuGet. So, the fix may come sooner than October, but no sooner than July.

If you need a fix delivered before October, you can open an Oracle Support service request and request a one-off fix.

This bug has the unfortunate timing of being resolved right after the next quarterly patch finished accepting new fixes.

from dotnet-db-samples.

n-yates avatar n-yates commented on August 30, 2024

Will this fix also allow us to configure the DbNotificationAddress property? I assume so, but want to confirm. Thanks.

from dotnet-db-samples.

alexkeh avatar alexkeh commented on August 30, 2024

I think you mean setting the port via DbNotificationPort. Yes, you will be able to set the port after the fix.

from dotnet-db-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.