Hi, an issue is observed with DataMiner not being able to reach Elastic based upon the following configuration in DB.xml:
<DataBase active="true" search="true" type="Elasticsearch">
<DBServer>localhost</DBServer>
<UID></UID>
<PWD>{AAAAAAAA-1111-2222-BBBB-CCCCCCCCCCCC}</PWD>
</DataBase>
We do not have DBConfiguration.xml set up.
This is observed on DMA running DMA10.1.0.0-11319-CU11 in standalone mode.
Additional context:
DataMiner was able to communicate with Elastic when it was first installed. However upon a DMA restart, the DMA was no longer able to communicate with Elastic.
SLDBConnection.txt reported the following error:
2022/06/21 15:35:32.967|SLDBConnection|ConnectionComposing|INF|0|1|Elasticsearch.Net.ElasticsearchClientException: Failed sniffing cluster state.. Call: unknown resource ---> Elasticsearch.Net.PipelineException: Failed sniffing cluster state. ---> Elasticsearch.Net.PipelineException: An error occurred trying to read the response from the specified node. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.1.65:9200
However the localhost IP address of the server is a different IP address in the range 172.16.x.y.
I did notice that 192.168.1.65 did appear in the Agent page of Cube.
An attempt to fix the issue was done by deleting that entry and restarting the DMA. However the same behavior is observed in SLDBConnection.txt. It is still trying to reach Elastic at 192.168.1.65:9200.
Note that Elastic is responding when we attempt to reach localhost:9200 via a web-browser or via the 172.16.x.y:9022.
Any advise on what can be done to ensure that DMA is correctly resolving 'localhost' to the right IP address and not picking up the other IP address?
Hi Bing,
It seems that the IP address of your DMA was changed. This can happen when you have DHCP configured (not a static IP for the server). If you would want to change the IP of your agent, you need to follow the steps as indicated on our documentation page: Changing the IP of a DMA | DataMiner Docs
Kind regards,
Hi Michiel, it appears that only elasticsearch.yml hardcoded an IP address. Would specifying localhost or 127.0.0.1 make the DMA continue to work across IP address changes?
Hi Bing,
There are also options to use DNS records in your configuration (elastic, Cassandra and DataMiner), this way you are not stuck to a certain IP. In case your IP(s) would change the DNS records need to be updated of course and could be that a DMA restart is required.
Not an expert on Elastic, but I would assume it is possible to configure 127.0.0.1 or localhost. This would mean then that you can only access the DB from the machine itself of course.
I can confirm it’s possible to use localhost or 127.0.0.1 for the Elastic IP.
Hi Michiel, thanks for your observations. So in other words, the fix to this problem is to lock the DMA server down to a static IP address or have DHCP assign the same IP address to the DMA server?
I’m just thinking that just following the instructions in ‘Changing the IP of a DMA’ won’t permanently fix the issue as subsequent restart of the VM would lead to potentially a new IP address resulting in having to repeat the instructions again.