getting not resolved host error only in linux
Canislupax opened this issue · comments
Bug Report
Versions
- Driver: Postgres
- Database: Postgres & yugabyte
- Java: all testet
- OS: only in Linux
Current Behavior
I am using r2dbc with akka. After akka switched to the 1.0.1.RELEASE
i have the strange behavior that i can connect to my databases with mac os arm64 and amd64 with no errors but on linux system even when building in the nativ environment i always get
reactor.core.Exceptions$ErrorCallbackNotImplemented: io.r2dbc.postgresql.PostgresqlConnectionFactory$PostgresConnectionException: [08003] Cannot connect to myhostname/:5433
the host can reached with curl -v and resolved -> i can reproduce the error in every environment only on linux the hosts are not resolved
I am using scala. Have used all Scala Version to test but its the same result.
Steps to reproduce
val config = PostgresqlConnectionConfiguration
.builder()
.errorResponseLogLevel(io.r2dbc.postgresql.util.LogLevel.DEBUG)
.host("myhost.x")
.port(5433)
.database("mydatabase")
.username("username")
.password("secretpassword")
.build()
val connectionFactory: ConnectionFactory = new PostgresqlConnectionFactory(config)
val connection = connectionFactory.create()
val mono: Mono[Connection] = Flux.from(connection).next()
mono.flatMapMany(connection => {
println("Connection established")
connection.createStatement("INSERT INTO person (id, first_name, last_name) VALUES ($1, $2, $3)")
.bind("$1", 1)
.bind("$2", "Walter")
.bind("$3", "White")
.execute()
}).flatMap(result => {
println("Statement executed")
result.getRowsUpdated
}).subscribe(rowsUpdated => {
println("Inserted " + rowsUpdated + " row(s)")
})
Expected behavior/code
Connection on linux hosts should work.
Possible Solution
I don`t know...
There were some javalibs overwriting my scala libs