Power BI error when connecting to Stardog SQL

I have followed the instruction in the video below to set up Stardog SQL Server and Power BI to connect to it.

The difference of my set up to the one in the video is that I'm running Stardog in a Docker container on a Mac and Power BI on a Windows machine. I added the stardog.properties file to the requested location and restarted the server and also installed the MySQL connector on the windows machine.

When trying to connect from Power BI, just like in the video, I got an error (screen shot attached).

From the windows machine I can navigate to my Mac localhost normally and therefore to, for example. I tried and it seems it's there. I did try and check using curl -I http://localhost:5806, but I got the following error: curl: (56) Recv failure: Connection reset by peer.

Power BI can also connect to any native SQL Server databases running on linux docker containers.

In one of the connection attempts, Power BI asked for credentials, and i chose SQL Server (not windows or Azure, etc) and passed user = admin and password = admin. But, that gave me an error, too.

Just note that the IP address you see in the screenshot maps to on the machine where stardog is running.

Any help on how to troubleshoot this issue would be really appreciated.

Thanks very much.

Hi Marcelo,

Are you able to access Stardog from the same host you're running Power BI? Let me check with our Docker experts to see if any special setup is required to allow remote connections.


Hi Jess,
I installed Stardog Studio on the same windows machine where Power BI was running. I could connect from Stardog Studio to a graph database running on the docker container on the Mac machine fine. I used the http://localhost:5820 to connect. In fact, localhost was mapped to a different IP address inside the windows machine - just to let you know. When I tried to connect to port 5806 using Power BI, I got the error. I also tested connecting from Power BI to a SQL Server database in a docker container using Power BI, and again, it worked fine. So, the network seems to be working all fine.
Thanks again, Marcelo.

Can you share the full Docker command you used to run Stardog?

This one:
docker run -it -p 5820:5820 -e STARDOG_EXT=/opt/stardog/ext -e STARDOG_HOME=/var/opt/stardog --name stardog1 stardog/stardog:latest

You will need to expose the BI server port 5806 in addition to the Stardog HTTP port. You can find some additional documentation here. Please add -p 5806:5806 to this command try connecting from the remote host.

Oh dear! It seems so obvious once you see the answer. Thanks very much.

1 Like

Hi, I tested the connection from the Windows machine via powershell "Test-NetConnection -Port 5806" successfully, which means that the port mapping is working fine. However, when connecting from Power BI, i still get the same error. I found suggestions to install an older version of the MySQL dotNet connector. So, I tried that, too, but it didn't work. What user and password should I use to connect to the database through port 5806? Sometimes, when it doesn't through an error straightway, it prompts me for a user and password. Thanks,

It should just be the credentials for the Stardog user. Please also note: Authentication requirements dictate that users created in versions of Stardog prior to 7.0.2 will need to have their password reset before connecting through the BI server.


I tried to connect using user: admin, password:admin, which is the one that comes by default in the docker image.

Can you share the exact error you are receiving?

So, i did the following:

  1. Tested connection to port 5806 (first screenshot).
  2. Upgraded MySQL Connector/NET to the latest version (8.0.21) on the machine where Power BI is installed (second screenshot).
  3. Connected to Northing database from Stardog Studio (installed on the same machine as Power BI), and ran a couple of queries (third screenshot). This shows that the database exists and it's working fine on port 5820.
  4. Tried to connect to port 5806 from Power BI (forth screenshot).
  5. Got a high level error (firth screenshot). However, this one doesn't give me any hints of what is going on :frowning:

Could be something on Power BI side. Looks like many people are having issues connecting to mySQL. https://community.powerbi.com/t5/Desktop/Reading-from-the-stream-has-failed/td-p/151353
I'll try and have a look into those articles as well...

Let us check into this version locally and see if we can reproduce it.

I've created a logging configuration and would ask that you use it with Stardog and send us the trace log for analysis. The primary issue I see here is that you don't mount a persistent filesystem when running the Docker image. It's customary to use something like docker -v ~/my_stardog_home:/var/opt/stardog which will store Stardog data on your local filesystem so it isn't lost when the Docker is shut down. I would suggest using this persistent volume mapping and placing the attach Log4J configuration in that directory and restarting the image. You will then be able to try connecting with Power BI and details will be saved in the log file in that directory. At that point, you can share the log file back here. Thanks.


log4j2.xml (2.3 KB)

Thanks million for looking into this. I followed the instructions above and it worked!!! So, cool! thanks again!

So, once inside Power BI, after importing/loading all the data, by selecting all tables, it seems I can only see an ID column for each table, whereas on Stardog I have multiple properties in the RDFS schema and all instances have values, as per screen shots. I didn't look much further on the Power BI side yet, I think i will only have time to do so in the following week. But, just leaving this here in case it rings any bells. Thanks.

Sounds like you got it working?

The BI server uses mappings to represent RDF data as tables which can be queried with SQL. If you haven't written explicit mappings, a set will be automatically generated. They are generated from the OWL/RDFS schema. Each class will be mapped to a table in the SQL data model. Each property will be mapped to a field in a table corresponding to it's rdfs:domain. Have you specified domain in your OWL/RDFS schema?

It might be worth looking at the example schema here.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.