search cancel

Spectrum Performance View doesn't show any data - "localhost" could not be resolved by DNS

book

Article ID: 214408

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction


When I log into Grafana to access Spectrum Performance View, no data is being displayed. 

Checking the $SPECROOT/insideView/SpectrumInsideView.log file shows the following error unable to resolve localhost.

2021-05-03 12:58:36,275 - INFO - MainThread - Line no:554  : SpectrumInsideView. This will provide the almost real time insights of SpectroServer Performance metrics
2021-05-03 12:58:36,276 - INFO - MainThread - Line no:555  : SpectrumInsideView Starting ....
2021-05-03 12:58:36,276 - INFO - MainThread - Line no:595  : configuration : {'OneClickNodes': ['oneclickServer.acme.net'], 'oneclickServer.acme.net': {'httpMode': 'https', 'OcUsername': 'spectrum', 'OCPassword': 'crackme123', 'OneClickPort': 8443, 'InitialSyncDays': 45, 'PollTimerMins': 5, 'throttleSize': 1000}, 'Serivce': {'DatabaseType': 'influx', 'DatabaseName': 'Spectrum', 'DBServerName': 'localhost', 'DBPORT': 9445, 'DBUsername': 'spectrum', 'DBPassword': 'spectrum', 'DBhttpMode': 'http', 'DBCertPath': None, 'LogLevel': 'INFO', 'LogSizeBytes': 10000000, 'LogFileCount': 5}}

2021-05-03 12:58:36,292 - CRITICAL - MainThread - Line no:500  : unable to get connect InfluxDB status: <Response [404]> response : <html> 
      <b><font face="Arial"><font color="blue"><font size=+3>Host Does Not Resolve in DNS </font></font></font></b>
      <P> Your requested host <B>"localhost"</B> could not be resolved by DNS.  This either happened because the system detected an unresolved host name or you're attempting to access a commonly typoed name.
      <P> URL:  <B>http:&#x2F;&#x2F;localhost:9445&#x2F;query?q=show+databases</B>
      <P> Please verify that the requested host name is correct or try again at a later time.
      <P> The system detected an <B>Unresolved Host Name</B> while attempting to resolve the host specifed in the requested URL.
<P><BR><I><B><font face="Times New Roman"><font size=+1> Some banner information</font></font></I></B>

      <P></font></font>
      <P><font size=-2> (dns_unresolved_hostname)</font>
      </html>
      
'

 

Cause


Not yet found:
   /etc/hosts had a proper entry for localhost

  /etc/nsswitch.conf had hosts: set to 'files' first

Environment

Release : 20.2.x

Component : Spectrum OneClick

Resolution


It is not yet known why InsideView could not resolve localhost, however, updating the SpectrumInsideView.conf to use the FQDN allowed InsideView to connect to the InfluxDB on port 9445. 

We updated the SpectrumInsideeView.conf to use the FQDN.

$SPECROOT/insideView/SpectrumInsideView.conf
Serivce:
    DatabaseType : influx
    DatabaseName : Spectrum
    DBServerName : oneclickServer.acme.net
    DBPORT : 9445
    DBUsername : spectrum
    DBPassword : spectrum
    DBhttpMode : http
    DBCertPath :
    LogLevel : INFO
    LogSizeBytes : 10000000
    LogFileCount : 5


Stopped and Started InsideView from the OneClick Web Page
     OneClick Web Page ~~> Administration ~~> InsideView Configuration
     Start / Stop