Open kklouzal opened 7 years ago
Hey @kklouzal. Are other client libraries like Python or JavaScript also unable to connect?
As the developer of the library, I'd like to include the fact that I can connect both on my windows 10 machine, as well as my linux server, with no difficulties.
I apologize but I do not have an environment to test anything else. I can go ahead and set one up if anyone has a guide to follow.
It would probably suffice to see if connecting as done in the Python guide works.
It appears I may have had a corrupted installation or something? Because I did a fresh install, and I came across the same problem as @kklouzal.. So I'll be seeing if I can fix that. Sorry for bothering.
Update. The node driver fails to connect with the same issue as my driver. It appears the windows zip installation is broken.
Can confirm, tried using the JavaScript driver with default user and password as follows:
const r = require('rethinkdb');
r.connect({host: 'localhost', port: 28015}), function(err, conn) {
if (err) throw err;
console.log('connected')
}
Failed with Unhandled rejection ReqlAuthError: Wrong password
Rethinkdb Version 2.3.6-windows
The python driver appears to work. Yet node and mine do not.
FWIW, bchavez/C# driver works fine on Windows 10...
C:\temp\rethinkdb-2.3.6>dotnet new console
The template "Console Application" was created successfully.
C:\temp\rethinkdb-2.3.6>dotnet add package RethinkDb.Driver
info : Adding PackageReference for package 'RethinkDb.Driver' into project
info : Package 'RethinkDb.Driver' is compatible with all the specified frameworks in project
C:\temp\rethinkdb-2.3.6>notepad Program.cs
using System;
namespace rethinkdb_2._3._6
{
class Program
{
static void Main(string[] args)
{
var R = RethinkDb.Driver.RethinkDB.R;
var conn= R.Connection()
.Hostname("localhost")
.Connect();
var time = R.Now().Run<DateTimeOffset>(conn);
Console.WriteLine(time);
}
}
}
C:\temp\rethinkdb-2.3.6>dotnet run
10/30/2017 9:38:19 AM +00:00
:dizzy: :boom: Chaos Chaos - Do You Feel It?
Strange..
Can a developer shed light on if something in the handshake process has changed in recent releases? And old version of Rethink worked but the latest one does not. I would again like to reiterate that the rethink.zip was downloaded and rethink.exe was ran with no launch options or configuration changes.
The node driver should work (but it doesn't on Windows, apparently), so I'm going to look into this tonight.
If it is a problem with my driver, I'll get working on a fix for that. Dunno why one installation of rethink with the same version works with my driver, but the newest does not. shrug
@DannehSC What was the old version of the Windows release that did work?
Not sure what this will tell you, but here's the Running lines.
Running rethinkdb 2.3.6-windows (MSC 190024215)...
Running on 6.2.9200 (Windows 8, Server 2012)
This.. This makes no sense.. I compared the version it works on, and the version it doesn't work on, the versions, the running lines, everything is the same.
Sorry for the bump if you're busy, but.. Bump. @srh
Yeah, I got busy, but I'm working on it tonight. Actually the first thing I'm doing is seeing about making Windows building work for people with VS 2017 installed.
Okay. Sorry to bother. Just wanted to make sure it wasn't forgotten.
@DannehSC are you getting the same Wrong password
error as @JohnnyMorganz ?
@kklouzal , have you tried using https://github.com/grandquista/Lua-ReQL? Do you get the same error?
I tried the NodeJS driver and seems to work fine on node (v8.8.1 & v7.6.0):
const r = require('rethinkdb');
r.connect({ host: 'localhost', port: 28015}, function(err, conn) {
r.now().run(conn, function(err2, result){
console.log(result);
});
});
C:\temp\rethinkdb-2.3.6>node test.js
2017-11-05T23:59:34.269Z
Maybe try deleting your rethinkdb_data
folder before running the rethinkdb.exe
? rethinkdb_data
is your data folder so be sure to back it up if it contains any data worth saving.
Might also be useful to check the server log for the loding path:
...
Loading data from directory C:\temp\rethinkdb-2.3.6\rethinkdb_data
...
Are any of you experiencing this problem running the latest Windows 10 Fall Creators Update? Version 1709 (OS Build 16299.19)
? IIRC, the new "fall update" contains a new "exploit protection" feature that is turned on by default. I've seen the new update causing problems in some unrelated tools.
Also, when you extract rethinkdb.exe
from the .zip file, right click, properties and make sure it's "unblocked" as a sanity check. https://blogs.msdn.microsoft.com/delay/p/unblockingdownloadedfile/
Also might be helpful if someone could post a working Lua example of some code that has the problem.
The lua reql driver does not work with the luvit library (still lua). And luarocks is basically linux only. So it's hard to test it. And kklouzal is running the FCU (fall creators update) but I am not. And here's an example.
local reql=require("luvit-reql")
reql.connect(options)
Things work for me with: the npm package I get from the npm repo:
>npm install rethinkdb
rethinkdb@2.3.3 node_modules\rethinkdb
└── bluebird@2.11.0
And the Rethinkdb 2.3.6 Windows binary:
Running rethinkdb 2.3.6-windows (MSC 190024215)...
Running on 6.1.7601 (Windows 7, Server 2008 R2)
Edit: This is while connecting with a username and password.
@DannehSC It would be really helpful if you could put together a .zip file of a Lua sample project that we could just unzip and run.
If you can, the sample should 1) connect, and 2) attempt to execute a simple r.now()
query and 3) print the result to the console.
I don't have any experience with Lua, so I'm stumbling just to get something functional to test.
Thanks,
Alright. I'll get to that tomorrow.
FWIW, tested https://github.com/grandquista/Lua-ReQL and it works. From Linux Lua Client to Windows 10 RethinkDB Server:
test.lua
local r = require'rethinkdb'
local conn, err = r.connect'192.168.0.171'
local result = r.reql(1).add(1).run(conn)
for i, row in result.each() do
print(row)
end
root@dev1:~/test# lua test.lua
2
No worries @DannehSC , after a small fight with Lua, was able to get some communications going from your luvit-reql
driver. I'm able to reproduce the issue with your driver from a Windows 7
Lua client to a Window 10
RethinkDB server.
I have a small inkling that this is not a problem with Windows 10 or RethinkDB server but perhaps more of an issue with your authentication handshake. Here's a wire-dump of the communication between your Lua driver fail.txt
compared to grandquista success-grand.txt
:
The failure step looks like it starts around here:
and compared to grandquista:
Suggestions:
pbkdf2
implementation matches your pbkdf
implementation. Write some tests to compare outputs to see if they differ.hmac
and digest
outputs and see if they match up with the same outputs from grandquista's crypto library.It only takes one bit flipped somewhere to throw everything off. :crying_cat_face:
Hope that helps.
Alright! Thank you so much! <3
I'm attempting to use the following Lua based driver on Windows 10 and am unable to authenticate using the default admin account or any secondary accounts with RethinkDB returning a constant error code 12.
Lua Driver: https://github.com/DannehSC/luvit-reql
The following error is returned no matter what we attempt:
2017-10-25 14:31:18 | [INFO] | Connecting to 127.0.0.1:28015 { error = 'Wrong password', error_code = 12, success = false } 2017-10-25 14:31:18 | [FAIL] | ReqlError/ReqlDriverError/ReqlAuthError || Error: Wrong password
To connect is very simple:
local luvitReQL=require('luvit-reql') luvitReQL.connect({['username']='testuser',['password']='testpass'})
orlocal luvitReQL=require('luvit-reql') luvitReQL.connect()
Which attempts to authenticate with the default user/pass admin/(blank) Even manually passing the blank password failslocal luvitReQL=require('luvit-reql') luvitReQL.connect({['username']='admin',['password']=''})
What's going on here? Bug with the windows version of RethinkDB during the authentication handshake?
I have deleted RethinkDB and redownloaded the zip file. This ensures a 100% vanilla 'install' but to no avail.
Thank you all for your time!