Open Closed

Fresh Solution With Oracle db not wokring, Getting Db connection issue. #6027


User avatar
0
dharamrish created
  • ABP Framework version: latest
  • UI Type: MVC /
  • Database System: EF Core ( Oracle, etc..) /
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/ Tiered
  • Exception message and full stack trace:System.Net.Sockets.SocketException: 'No connection could be made because the target machine actively refused it.'
  • Steps to reproduce the issue:
  • Connection String used - "Default": "Data Source=localhost:1521/ORCLPDB;User Id=testadmin1;Password=********"
  • also Tried - "Default": "Data Source=ORCLPDB;User Id=testadmin1;Password=*******;"
  • error with this is - System.Net.Sockets.SocketException: 'No such host is known.'
  • Also tried - "Default": "User Id=testadmin1;Password=*******;Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = ORCLPDB)))"
  • error fo this is - System.Net.Sockets.SocketException: 'No connection could be made because the target machine actively refused it.'
  • Call Stack for this is
  • em.Net.Sockets.dll!System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(System.Net.Sockets.SocketError error, System.Threading.CancellationToken cancellationToken)	Unknown
    
    System.Net.Sockets.dll!System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(short token) Unknown System.Private.CoreLib.dll!System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask..cctor.AnonymousMethod__4_0(object state) Unknown System.Net.Sockets.dll!System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.InvokeContinuation(System.Action<object> continuation, object state, bool forceAsync, bool requiresExecutionContextFlow) Unknown System.Net.Sockets.dll!System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs _) Unknown System.Net.Sockets.dll!System.Net.Sockets.SocketAsyncEventArgs..cctor.AnonymousMethod__176_0(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped) Unknown System.Private.CoreLib.dll!System.Threading.ThreadPoolTypedWorkItemQueue<System.Threading.PortableThreadPool.IOCompletionPoller.Event, System.Threading.PortableThreadPool.IOCompletionPoller.Callback>.System.Threading.IThreadPoolWorkItem.Execute() Unknown System.Private.CoreLib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Unknown System.Private.CoreLib.dll!System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() Unknown

Pls Suggest. NOTE - I tried last connection stin with other tool in net and its working.


12 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    No such host is known.

    This is like a problem of connecting strings.

    The target machine actively refused it.'

    Can you check the target machine logs?

    You can also test your connection string in the plain EF Core app.


    I can test the connecting string in my docker environment. Can you share more info? liming.ma@volosoft.com

  • User Avatar
    0
    dharamrish created

    I have tested it in another app. and it's working fine. but the same connection string is not working abp created solution.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share your connecting string or the appsettings.json file?

    How can I reproduce it on my local comptuer?

    liming.ma@volosoft.com

  • User Avatar
    0
    dharamrish created
    1. "Default": "Data Source=localhost:1521/ORCLPDB;User Id=testadmin1;Password=********"

    2. "Default": "Data Source=ORCLPDB;User Id=testadmin1;Password=*******;"

    3. "Default": "User Id=testadmin1;Password=*******;Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = ORCLPDB)))"

    3rd one is working fine in my sample app (Without using ABP)

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the my sample app?

  • User Avatar
    0
    dharamrish created

    I cannot share the sample app , it has my database entities. Requesting you to Please share a sample ABP project which is working with oracle

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I think the problem is about the format of connecting strings.

    Are you using the Devart.Data.Oracle.EFCore or Oracle.EntityFrameworkCore

  • User Avatar
    0
    dharamrish created

    I am not using any thing. Just using the project created from ABP Suite with Oracle as DB. So what ever default is created by ABP Suite , i am using the same.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I guess you had selected the Oracle as db.

    The format is User Id=<USER ID>;Password=<PASSWORD>;Data Source=<DATA SOURCE>;

    https://github.com/oracle/dotnet-db-samples/blob/master/samples/ef-core/get-started/create-model-save-query-scaffold-efc6.cs#L17 https://github.com/oracle/dotnet-db-samples/blob/master/samples/ef-core/dependency-injection/appsettings.json#L3

    Can I check it remotely?

    https://us05web.zoom.us/j/87621986964?pwd=v9hRNWdaGIIqJrbNpM0IdC6lz1qPmb.1

  • User Avatar
    0
    dharamrish created

    OK , please give me latest meeting id, as previous is expired/

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    https://us05web.zoom.us/j/81998705800?pwd=CD9X9OtbIiA3xtLpA4yKbPC5VnOabQ.1

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Sloved via remotely.

    The problem is about the format of connecting strings.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11