StefanoMartin / ArangoRB

A Gem for ArangoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: add protocol to Arango::Server

orifito opened this issue · comments

Would it be possible to update the Arango::Server class to allow the setting of the desired protocol when connecting to a server?
Right now it's set as http, so it's not possible to connect to a server using secure TLS connections.

I just pushed a new release 2.0.1 on rubygem.
If you use tls = true for Arango::Server during initialisation or after, then you will use "https".

Please reopen the issue if this does not solve your problem.

You rock, thanks!

I've tested new version and sadly I'm not able to connect if setting tls = true (still working with tls disabled):

 === DATABASE ===
Traceback (most recent call last):
	4: from a.rb:21:in `<main>'
	3: from /usr/lib/ruby/gems/2.5.0/gems/arangorb-2.0.1/lib/Database.rb:97:in `create'
	2: from /usr/lib/ruby/gems/2.5.0/gems/arangorb-2.0.1/lib/Server.rb:161:in `request'
	1: from /usr/lib/ruby/gems/2.5.0/gems/arangorb-2.0.1/lib/Request.rb:43:in `request'
/usr/lib/ruby/gems/2.5.0/gems/arangorb-2.0.1/lib/Request.rb:59:in `rescue in request': Impossible to connect with database (Arango::Error)

I've checked with arangosh and I can connect successfully:

$ arangosh --server.endpoint https://arangodb:8529 --server.username root --server.password 'XXX'
Connected to ArangoDB

Let me know if I can help on further debugging this.

Can you use "verbose: true" during the initialization of the server and send me the output that it is print out?

Sure, I just did, but it only prints the same traceback and the request to destroy and create the year database.

Thank you for trying. I will look more deep in this problem as soon as possible.