-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing remote monetdb #13
Comments
Did some debugging: Seems like both url and options have to be properly initialized in order to get monetdbe_open() to try to connect a remote database:
username and pw must be initialized in options... Added some printouts in monetdbe.c (at line ~695 and onwards):
With url, username and pw in options as above the following error msg was returned form runMAL():
|
So, first of all, a disclaimer: this part of the connection API is still a work in progress, so the syntax for connecting to a remote database may be changed in the future. This is why some of the older tests in the example repository feature old syntax (like the Currently, to connect to a remote database, you need to fill in the Here's an example:
I suspect that you didn't set one of the variables in |
I did it almost exactly as in your example. I used
I also tried your example (in C++):
In both tests the following error msg was returned from runMAL() in monetdbe.c:
This was on a Ubuntu 18.04 LTS, 64 bit VM in Azure. |
First of all, I want to let you know that we appreciate your efforts to test the proxy feature in monetdbe 👍 In the current API (latest default branch), when setting up a remote configuration, you have to be sure that the second parameter That said, this sql.set_protocol is worrying me. I am not sure why that is happening. I'll come back on that later. |
@krimp Which version of monetdb are using for the server side? |
With the NULL as the second argument in monetdb_open(), chkProgram(c->usermodule, mb) in monetdbe.c returns error msg: "MALException:pushStr:Can not allocate string variable" in:
The monetDB-server is Jun-2020-SP1 running on a Ubuntu 18.04 LTS, 64 bit VM in Azure. PS! I realize @bernardom29 has changed his answer, but it does not work in my application. |
As an update I got the same connection error as in the Azure VM in monetdbe.c. with monetdbe running on an RPi4B+ (32bit, 4GB ram) and the remote server on an another RPi4B+ (64Bit, 8GB ram) with monetDB Oct2020-SP3 with Ubuntu 20.04 LTS 64 bit...
|
Whats the version of MonetDB running on the 32bit system? if it's the June2020 version, it won't work since June2020 does not support MonetDBe. Currently remote only works on default, and it's still a work-in-progress. |
The 32bit system is running MonetDB/e... What do you mean by " Currently remote only works on default"? |
with default we mean the default branch of our MonetDB hg repo. (https://dev.monetdb.org/hg) |
I downloaded the "default" branch on both a 64 bit Ubuntu and a 32 bit Buster. It seem to me that monetdb/e is a part of monetdb, and that the libmonetdbe.so is generated when compiling the full monetdb... With the "default" ( MonetDB v11.40.0) I experience the following: RPi4B+ 64bit Ubuntu 20.04 LTS: RPi4B+ 32bit Buster: With cmake flag STRICT = OFF MonetDB v11.40.0 compiles and installs without issues on the 32bit machine, and my application using monetdb/e connects to the remote monetDB server (on the 64 bit Ubuntu machine).
Some more of the test code: '
' |
Just tested on 'buster' 32 bit. When using a 32 bit server and monetdbe, it works fine. Same for both 64 bits. |
it maybe better to start a new issue just on the 32/64 bit issue. |
I ended up with a temporary workaround for accessing the 64bit remote server database from the 32bit application by using the mapi library. No issues going that route. |
I am trying to access a monetdb-server on another machine in order to initiate a local embedded database with some initial values (C/C++).
However, the cache.c example accessing a remote database seems not to be up to date w.r.t the interface.
E.g. in
monetdbe_open(&remote, "monetdb://localhost:5000/sf1?user=monetdb&password=monetdb");
clearly a NULL is missing in the monetdbe_open(..., NULL) for the Option. However, adding the missing NULL does not seems to make the example work w.r.t be able to connect to the remote database.
Digging into the monetdbe.c, it seems to me like in order to force the monetdbe_open() to try to connect to a remote database, the remote-structure in the Option-structure needs to be filled in.
It would be of great help if you please could update the cache.c example and/or clarify how to connect to a remote named database.
If the option + remote struct has to be used: The remote struct seems to only have variable names for host, port, username, pw and language. How do one enter the database name ("sf1" in the cache-example or "demo" in the example below)?
To be specific, in the full monetdb-version we have e.g:
dbh = mapi_connect("192.168.1.21", 50000, "monetdb", "monetdb", "sql", "demo");
How would the equivalent monetdbe look like?
The text was updated successfully, but these errors were encountered: