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

Postgres Docker Image provider issue with rh #418

Closed
ManojLingala opened this issue Aug 27, 2020 · 2 comments
Closed

Postgres Docker Image provider issue with rh #418

ManojLingala opened this issue Aug 27, 2020 · 2 comments

Comments

@ManojLingala
Copy link

I have multiple postgres docker images running for different purposes , image pointing out to default port is working fine

    {
        var csb = new NpgsqlConnectionStringBuilder();
        
        csb.Host = host;
        csb.Database = database;
        csb.Username = username;
        csb.Password = password;
        csb.Port = 5432;

        return csb.ToString();
    }

However , when I override the port as below
rh --dt="pg" --files=App_data\db --cs="Host=localhost;User Id=postgres;Password=xxxxxx;Database=image2;Port=5435"

I'm getting timeout issue roundhouse.databases.postgresql.PostgreSQLDatabase` with provider Npgsql does not provide a facility for creating a database at this time.
System.TimeoutException: The operation has timed out.
at Npgsql.NpgsqlConnector.Connect(NpgsqlTimeout timeout)
at Npgsql.NpgsqlConnector.RawOpen(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.ConnectorPool.AllocateLong(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<g__OpenLong|0>d.MoveNext()

The same docker image is pretty accessible and working via docker compose for my integration testing . Not sure why it is timing out with rh .

@ManojLingala
Copy link
Author

Fixed it by providing image gateway I.p as a host instead of localhost ...

@erikbra
Copy link
Member

erikbra commented Oct 4, 2020

Does this mean your issue is solved, @ManojLingala ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants