1

I created the 3 necessary containers for NuoDB using the NuoDB instructions. My Docker environment runs on a virtual Ubuntu Linux environment (VMware). Afterwards I tried to access the database using a console application (C# .Net Framework 4.8) and the Ado.Net technology. For this I used the Nuget "NuoDb.Data.Client" from Nuget.org.

Unfortunately the connection does not work.

If I choose port 8888, my thread disappears to infinity when I open the connection. For this reason I tried to open the port 48004 to get to the admin container. On this way I get an error message.

"System.IO.IOException: A connection attempt failed because the remote peer did not respond properly after a certain period of time, or the established connection was faulty because the connected host did not respond 172.18.0.4:48006, 172.18.0.4"

Interestingly, if I specify a wrong database name, it throws an error: No suitable transaction engine found for database. This tells me that it connects to the admin container.

Does anyone have any idea what I am doing wrong?

The connection works when I establish a connection with the tool "dbvisualizer". This tool accesses the transaction engine directly. For this reason I have opened the port 48006 in the corresponding container. But even with these settings it does not work with my console application.

Thanks in advance.

Smooon
  • 13
  • 2

1 Answers1

1

Port 8888 is the REST port that you would use from the administration tool such as nuocmd: it allows you to start/stop engines and perform other administrative commands. You would not use this port for SQL clients (as you discovered). The correct port to use for SQL clients is 48004.

Port 48004 allows a SQL client to connect to a "load balancer" facility that will redirect it to one of the running TEs. It's not the case that the SQL traffic is routed through this load balancer: instead, the load balancer replies to the client with the address/port of one of the TEs then the client will disconnect from the load balancer and re-connect directly to the TE at that address/port. For this reason, all the ports that TEs are listening on must also be open to the client, not just 48004.

You did suggest you opened these ports but it's not clear from your post whether you followed all the instructions on the doc page you listed. In particular, were you able to connect to the database using the nuosql command line tool as described here? I strongly recommend that you ensure that simple access like this works correctly, before you attempt to try more sophisticated client access such as using Ado.Net.

MadScientist
  • 92,819
  • 9
  • 109
  • 136
  • The hint that the client disconnects after the load balancer and connects directly via IP to a TE gave me the idea to ping the TE IP (172.18.0.4:48006). The solution was to create a route on the Windows host to access the Docker network on the virtual Linux machine where the Nuo DB containers are located. `route add {Docker Network} MASK {MASK} {Gateway=VirtualLinuxAddress}` – Smooon Jan 18 '22 at 22:44
  • Oh good idea. Glad you got it working! – MadScientist Jan 18 '22 at 23:02