Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify https host as arangodb host in properties

Tags:

java

arangodb

I'm building CRUD interface for ArangoDB as Java service.

My ArangoDB service has dynamic IP, but static URL. Thus I want to specify URL instead of IP and port.

But when I set it in arangodb.properties file I get the following exception:

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netcracker.unm.activeinventory.services.ArangoService]: Constructor threw exception; nested exception is com.arangodb.ArangoDBException: Could not load property-value arangodb.hosts=127.0.0.1:8538,127.0.0.1:8529,http://arangodb-nms-infra.sdnoshm05.com:443. Expected format ip:port,ip:port,...

How can I do it?

Update

I have figured out that I have to connect to https server. How can I specify it in my arangodb.properties file?

I have tried to connect to the servers endpoint using unix wget command. It doesn't connect if I dont specify https protocol. And so my ArangoDB client doesn't, if there is plain ip:port. I just get java.net.ConnectException: Connection refused exception.

like image 569
Sergei Podlipaev Avatar asked Oct 29 '22 01:10

Sergei Podlipaev


1 Answers

I don't believe you can do that since the service needs to bind to an IP address. Usually, when dealing with dynamic IP addresses your ISP is changing the IP but internally you can configure your IP address statically. Bind to your internal static IP and configure your router to port forward to that internal IP address. Many routers support dynamic DNS through various providers that will map the domain to your changing IP address. I hope that helps.

Update: Setting up HTTPS should be pretty easily done, just follow the docs here: https://docs.arangodb.com/3.2/Manual/Administration/Configuration/SSL.html

like image 156
darkfrog Avatar answered Nov 15 '22 10:11

darkfrog