Unable to connect with docker on MacOS
Closed this issue · 10 comments
The server works with the dBeaver JDBCDriver
But, I'm getting a :killed
signal following the example from the readme:
This is my docker-compose file
version: "3.8"
services:
firebird:
image: jacobalberty/firebird:v3.0
restart: unless-stopped
environment:
ISC_PASSWORD: masterkey
ports:
- 3050:3050
volumes:
- ./data:/firebird/data
opts = [
hostname: "localhost:3050",
username: "SYSDBA",
password: "masterkey",
database: "/firebird/data/MY.fdb"
]
{:ok, pid} = Firebirdex.start_link(opts)
I'm geting this error:
I think the following opts will work
opts = [
hostname: "localhost",
username: "SYSDBA",
password: "masterkey",
database: "/firebird/data/MY.fdb"
]
or
opts = [
hostname: "localhost",
username: "SYSDBA",
password: "masterkey",
database: "/firebird/data/MY.fdb",
port: 3050
]
I've tried this way, but still not working.
I've also tried with GO, and works. But with firebirdex I've no success.
package main
import (
"fmt"
"database/sql"
_ "github.com/nakagami/firebirdsql"
)
func main() {
var n int
conn, _ := sql.Open("firebirdsql", "SYSDBA:masterkey@localhost/firebird/data/MY.fdb")
defer conn.Close()
conn.QueryRow("SELECT Count(*) FROM rdb$relations").Scan(&n)
fmt.Println("Relations count=", n)
}
Umm, tests with Firebird 3.0 have now passed bellow
https://github.com/nakagami/firebirdex/blob/master/.github/workflows/test_fb3.yml
What is different from your Docker setup?
I can't test it at hand, but I believe it works on macOS as well.
I wonder if there is any difference between IPv4 and IPv6.
For example, IPv6 cannot be used to connect.
I believe GO drivers can connect either way.
Do you still get an error when running mix test
on your macOS?
I don't know why, but the same thing seems to be happening.
I found a problem in efirebirdsql, which handles the protocol.
I have fixed it and also changed the firebirdex deps
Try using version 0.3.11, please
Now is working. Thank you so much @nakagami 😄