I have downloaded and installed the virtual image of MusicBrainz server on VirtualBox without much problem, but now I’m trying to connect Tableau to this database to visualize this data, and that’s not working.
You probably have a firewall enabled in the vmware image blocking postgresql. ufw allow 5432/tcp ufw disable
Also check your networking settings in virtualbox,
You either need to use bridge networking or nat and enable port forwarding to allow you to connect to the machine.
The Postgres port is likely not accessible from the host OS. You’ll need to tell VirtualBox to forward port 5432 from the host OS to port 5432 on the guest OS in the network settings.
After trying a couple of things, I think the problem is with Tableau. I can connect from the host to the db in the vm through pgadmin with no problem, but with Tableau PostgreSQL connector I still get an error:
Download and install the drivers, and then connect.
Detailed Error Message:
[iODBC][Driver Manager]dlopen({}, 6): image not found
[iODBC][Driver Manager]Specified driver could not be loaded
Unable to connect to the server "localhost". Check that the server is running and that you have access privileges to the requested database.
It finally worked… and it was related to the drivers… had to download the driver from here: https://www.tableau.com/support/drivers#mac-postgres
And it worked! Weird that I didn’t have them right? they’re suppose to come by default with Tableau (??)
To get to the database you need to get through a few layers.
The database is running inside a docker container and is configured to allow the server to talk with it but does not expose the database to the host.
To expose this I believe you need to run: bin/turn-port db on
At this point you have port 5432 exposed from docker to the vm but you also need to expose the vm to your host.
If your vm is configured to use nat (I believe this is the default) you need to get virtualbox to map port 5432 from the vm to port 5432 (or a port you choose) to the machine you are running the vm.
I don’t use the virtual box vm so i’m not not sure about the username and password but I assume it is the following:
User: musicbrainz
Password: musicbrainz
port: 5432
host: localhost
jdbc connection string: jdbc:postgresql://localhost/musicbrainz?user=musicbrainz &password=musicbrainz
Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database.
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host “localhost” (127.0.0.1) and accepting TCP/IP connections on port 5432?
Unable to connect to the PostgreSQL server “localhost”. Check that the server is running and that you have access privileges to the requested database.
Can you try running the following to restart the database docker container. docker-compose -f ~/musicbrainz/musicbrainz-docker/docker-compose.yml up -d db