chucknorris / roundhouse

RoundhousE is a Database Migration Utility for .NET using sql files and versioning based on source control
http://projectroundhouse.org
916 stars 249 forks source link

Postgres Docker Image provider issue with rh #418

Closed ManojLingala closed 3 years ago

ManojLingala commented 3 years ago

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 commented 3 years ago

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

erikbra commented 3 years ago

Does this mean your issue is solved, @ManojLingala ?