jacobalberty / firebird-docker

Firebird Dockerfile
130 stars 96 forks source link

Unable to connect to docker container via JDBC #80

Closed LeonardSchwenk closed 3 years ago

LeonardSchwenk commented 3 years ago

I'm trying to setup the docker container via docker compose then connect to the database via dbbeaver aka JDBC

The error im getting:

I/O error during "open" operation for file "/firebird/data/firebird.fdb"; Error while trying to open file; No such file or directory [SQLState:08001, ISC error code:335544344] I/O error during "open" operation for file "/firebird/data/firebird.fdb" I/O error during "open" operation for file "/firebird/data/firebird.fdb" Error while trying to open file; No such file or directory

Within the docker container under /data there is a file firebird(which is the db file in this case). I assumed that the database gets created by the FIREBIRD_DATABASE env var in the docker compose file.

docker-compose.yml

version: '3'

services:
  db:
    platform: linux/x86_64
    image: jacobalberty/firebird
    environment:
      ISC_PASSWORD: firebird
      FIREBIRD_DATABASE: firebird
      FIREBIRD_USER: firebird
      FIREBIRD_PASSWORD: firebird
    ports:
        - 3050:3050

My JDBC URL looks like this: jdbc:firebirdsql://localhost:3050//firebird/data/firebird.fdb

mrotteveel commented 3 years ago

When you use FIREBIRD_DATABASE: firebird, the created database file is /firebird/data/firebird, not /firebird/data/firebird.fdb.

mrotteveel commented 3 years ago

In other words, either specify FIREBIRD_DATABASE: firebird.fdb, or use JDBC URL jdbc:firebirdsql://localhost:3050//firebird/data/firebird