xFlow Analyst users are not able to search anything in xFlow. When you click on the Suggested Experts or Solutions, you get an error like "Server Unavailable - Please contact administrator"
xFlow 's Search MicroService is not able to reach the Service Management Search Server URL.
Check C:\Program Files\CA\xFlow\APPS\logs\SearchMS.log, notice errors like:
INFO - [es.SearchHelper] - Error while connecting with ES URL : [http://SearchServerHostName:9012/sdm_index/cr/_search], so will try with another url...
ERROR - [es.SearchHelper] - Exception while getting next URL...
com.ca.casm.exception.CasmBaseException: None of the provided Elastic Search Servers are reachable!
at es.SearchHelper.getNextSuccessful(SearchHelper.java:640)
at es.SearchHelper.lambda$executeESQueryAsync$18(SearchHelper.java:583)
at java.util.concurrent.CompletableFuture.uniHandle(Unknown Source)
at java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source)
at java.util.concurrent.CompletableFuture$Completion.run(Unknown Source)
ERROR - [controllers.Search] - Error while getting results from ElasticSearch Server
java.util.concurrent.CompletionException: java.lang.NullPointerException: scheme
at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.util.concurrent.CompletableFuture.uniHandle(Unknown Source)
at java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source)
at java.util.concurrent.CompletableFuture$Completion.run(Unknown Source)
Caused by: java.lang.NullPointerException: scheme
at org.asynchttpclient.util.Assertions.assertNotNull(Assertions.java:23)
at org.asynchttpclient.uri.Uri.<init>(Uri.java:63)
at org.asynchttpclient.uri.Uri.create(Uri.java:38)
at org.asynchttpclient.uri.Uri.create(Uri.java:31)
at org.asynchttpclient.RequestBuilderBase.setUrl(RequestBuilderBase.java:150)
Verify if the Service Management Search Server service is running on the Search Server host. One way to ensure if the default Search Server ports are available is to look for ports 9300 and 9012.
On Windows, you could run the following commands: netstat -ano|findstr /i 9012 or netstat -ano|findstr /i 9300
In the above scenario, 9012 showed nothing, but 9300 was in listen mode. 9300 is Search's internal port, while 9012 is the HTTP port to which xFlow connects to:
Checking C:\Program Files\CA\SC\SearchServer\elasticsearch-2.1.1\logs\ca_es_cluster.log and it had:
[INFO ][node ] [localhost] starting ...
[INFO ][transport ] [localhost] publish_address {localhost/127.0.0.1:9300}, bound_addresses {[::]:9300}
[INFO ][discovery ] [localhost] ca_es_cluster/Bh4ptMFFQYmTjgHpTvKgyA
[INFO ][cluster.service ] [localhost] new_master {localhost}{Bh4ptMFFQYmTjgHpTvKgyA}{127.0.0.1}{localhost/127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[INFO ][http ] [localhost] publish_address {localhost/127.0.0.1:7200}, bound_addresses {[::]:7200}
[INFO ][node ] [localhost] started
The HTTP port above listed is 7200 as indicated in the above lines. That's different compared to what SDM was trying which was 9012 in the previous SearchMS.log (Error while connecting with ES URL : [http://SearchServerHostName:9012/sdm_index/cr/_search], so will try with another url... )
We have two options to resolve the issue. Either change the Service Desk's reference to use 7200 port for Search Server OR change the Search Server port from 7200 to what SDM was looking for (9012)
Option #1
1. Login to Service Desk Manager UI
2. Administration tab -> xFlow Analyst Interface -> Search Servers
3. Identify the server record in question, edit and change the port number to 7200 (because Service Management Search Server was listening on 7200 in this case)
4. Restart CA xFlow Analyst Interface Service
Option #2:
1. Stop Search Server via Control Panel -> CA Service Management Search Server service
2. Backup C:\Program Files\CA\SC\CASearchServer\elasticsearch-folder\config\elasticsearch.yml file
3. Edit the file and look for http.port
4. Change the existing value there (in this case it was 7200) to 9012
5. Save the file and start Search Server service
Retest searching for data within xFlow.