Specify https host as arangodb host in properties

I am creating a CRUD interface for ArangoDB as a Java service.

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

But when I install 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 this?

Update

I realized that I need to connect to the https server. How can I specify it in arangodb.properties file?

I tried to connect to the server endpoint using the unix wget command. It does not connect unless I specify the https protocol. And therefore, my ArangoDB client does not do this if there is a simple ip: port. I just get java.net.ConnectException: Connection refused exception.

+5
source share
1 answer

I do not believe that you can do this, since the service should bind to an IP address. As a rule, when working with dynamic IP addresses, your ISP changes the IP address, but inside you can configure your IP address statically. Bind to your internal static IP address and configure your router to redirect to this internal IP address. Many routers support dynamic DNS through various providers that will map the domain to your changing IP address. Hope this helps.

Update: setting up HTTPS should be fairly easy, just follow the docs here: https://docs.arangodb.com/3.2/Manual/Administration/Configuration/SSL.html

+2
source

Source: https://habr.com/ru/post/1272226/


All Articles