Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASP.NET Core with Docker support: Connection refused #23200

Open
dapalmi opened this issue Aug 16, 2017 · 3 comments
Open

ASP.NET Core with Docker support: Connection refused #23200

dapalmi opened this issue Aug 16, 2017 · 3 comments
Labels
area-Meta backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity question Answer questions and provide assistance, not an issue with source code or documentation.
Milestone

Comments

@dapalmi
Copy link

dapalmi commented Aug 16, 2017

I have a ASP .NET Core (v2.0) app with Docker support. And I want to start a Oracle Database when starting my app. This is how my docker-compose file looks like:

version: '3'
  services:
   devarttestapp:
     image: devarttestapp
     build:
       context: ./DevartTestApp
       dockerfile: Dockerfile

    oracledb:
     image: sath89/oracle-12c
     ports:
        - "1521:1521"

I use Devart data provider dotConnect for Oracle.

var conn = new Devart.Data.Oracle.OracleConnection(); 
conn.ConnectionString = Environment.GetEnvironmentVariable("ORACLE_CONNECTION_STRING"); 
try 
{
     conn.Open(); 
} 
catch (Exception e) 
{
     Console.WriteLine(e);
     throw;
}

But when I try to connect to the database of the created Oracle DB container I get following exception:

System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (Connection refused 127.0.0.1:1521)

I also tried to include the depends_on as well as the networks option in my docker-compose file with the same results.

What could be the cause of this exception?
And how do I solve this problem?

[EDIT] Add C# syntax highlight by @karelz

@karelz
Copy link
Member

karelz commented Aug 17, 2017

Does it work outside of Docker on regular VMs?

@tarekgh
Copy link
Member

tarekgh commented Aug 17, 2017

would be good to include the exception stack trace too

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@ericstj ericstj removed the untriaged New issue has not been triaged by the area owner label Jun 25, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Meta backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
No open projects
Development

No branches or pull requests

6 participants