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
- Verify that the environment doesn't know the hostname:
[root@response ~]# hostname --fqdn hostname: Unknown host |
- Update your hostname to match the FQDN hostname in /etc/sysconfig/network
HOSTNAME=myserver.domain.com |
- Also update the record held by hostname
[root@response ~]# hostname myserver.domain.com |
- Commit changes
/etc/init.d/network restart |