IMPORTANT ANNOUNCEMENT: On May 6, 2024, Carbon Black User eXchange (UeX) and Case Management will move to a new platform!
The Community will be in read-only mode starting April 19th, 7:00 AM PDT. Check out the blog post!
You will still be able to use the case portal to create and interact with your support cases until the transition, view more information here!

Hostname not set in OS causing solr not to function

Hostname not set in OS causing solr not to function

Version

Centos/RHEL 6.x (Cb Response 5.x)

Issue

Solr queries are returning with a 500 error and solr has an UnkownHostException error.

Symptoms

/var/log/cb/job-runner/job-runner.log:

2016-10-25 13:40:09 [11395] <err> [watchlist_search] HTTP 500 from solr: HTTPError('500 Server Error: Internal Server Error',); response: <Response [500]>

2016-10-25 13:40:09 [11395] <err> [watchlist_search] Searcher query/tag exception in watchlist entry [Redacted] Redacted Hits (21)

Traceback (most recent call last):

File "/usr/lib/python2.6/site-packages/cb/maintenance/jobs/watchlist_searcher.py", line 95, in execute

File "/usr/lib/python2.6/site-packages/cb/maintenance/jobs/watchlist_searcher.py", line 145, in _tag

File "/opt/jenkins/builds/workspace/build-cbent-release-5.1.1-4/code/coreservices/src/cb/api/solr.py", line 842, in set_process_document

File "/opt/jenkins/builds/workspace/build-cbent-release-5.1.1-4/code/coreservices/src/cb/utils/requests/models.py", line 714, in raise_for_status

HTTPError: 500 Server Error: Internal Server Error

/var/log/cb/solr/debug.log:

2016-10-25 13:40:09,875 - [ERROR] - from org.apache.solr.core.SolrCore in http-8080-13

java.net.UnknownHostException: response: response: Name or service not known

Cause

The hostname has not been set in the linux OS causing solr not to be able to return queries to other processes.

Solution

  1. Verify that the environment doesn't know the hostname:
    [root@response ~]# hostname --fqdn
    hostname: Unknown host
  2. Update your hostname to match the FQDN hostname in /etc/sysconfig/network
    HOSTNAME=myserver.domain.com
  3. Also update the record held by hostname
    [root@response ~]# hostname myserver.domain.com
  4. Commit changes
    /etc/init.d/network restart
Labels (1)
Was this article helpful? Yes No
No ratings
Article Information
Author:
Creation Date:
‎11-03-2016
Views:
916
Contributors