Support Questions

Find answers, ask questions, and share your expertise

No live SolrServers

avatar
Rising Star

Team,

Getting below error while intgerating Solr and ranger. Solr configured , but when i start ranger getting below error and ranger admin not starting

ERROR::::::::::::::::::::::::::::::::::::::

Traceback (most recent call last):

File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 208, in <module>

RangerAdmin().execute()

File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute

method(env)

File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 100, in start

setup_ranger_audit_solr()

File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 590, in setup_ranger_audit_solr

jaas_file = params.solr_jaas_file)

File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/solr_cloud_util.py", line 116, in create_collection

Execute(create_collection_cmd)

File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__

self.env.run()

File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run

self.run_action(resource, action)

File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action

provider_action()

File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 273, in action_run

tries=self.resource.tries, try_sleep=self.resource.try_sleep)

File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner

result = function(command, **kwargs)

File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call

tries=tries, try_sleep=try_sleep)

File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper

result = _call(command, **kwargs_copy)

File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 293, in _call

raise ExecutionFailed(err_msg, code, out, err)

resource_management.core.exceptions.ExecutionFailed: Execution of 'ambari-sudo.sh JAVA_HOME=/usr/java/default /usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string r********:2181,r*******com:2181,r***:2181/infra-solr --create-collection --collection ranger_audits --config-set ranger_audits --shards 1 --replication 1 --max-shards 1 --retry 5 --interval 10 --no-sharding' returned 1. Using default ZkCredentialsProvider

Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT

Client environment:host.name=r***

Client environment:java.version=1.7.0_60

Client environment:java.vendor=Oracle Corporation

Client environment:java.home=/usr/java/jdk1.7.0_60/jre

Client environment:java.class.path=/usr/lib/ambari-infra-solr-client:/usr/lib/ambari-infra-solr-client/libs/httpmime-4.4.1.jar:/usr/lib/ambari-infra-solr-client/libs/woodstox-core-asl-4.4.1.jar:/usr/lib/ambari-infra-solr-client/libs/noggit-0.6.jar:/usr/lib/ambari-infra-solr-client/libs/hamcrest-core-1.1.jar:/usr/lib/ambari-infra-solr-client/libs/log4j-1.2.17.jar:/usr/lib/ambari-infra-solr-client/libs/objenesis-2.2.jar:/usr/lib/ambari-infra-solr-client/libs/jackson-mapper-asl-1.9.13.jar:/usr/lib/ambari-infra-solr-client/libs/slf4j-log4j12-1.7.2.jar:/usr/lib/ambari-infra-solr-client/libs/jcl-over-slf4j-1.7.7.jar:/usr/lib/ambari-infra-solr-client/libs/commons-lang-2.5.jar:/usr/lib/ambari-infra-solr-client/libs/zookeeper-3.4.6.jar:/usr/lib/ambari-infra-solr-client/libs/jackson-core-asl-1.9.9.jar:/usr/lib/ambari-infra-solr-client/libs/easymock-3.4.jar:/usr/lib/ambari-infra-solr-client/libs/commons-codec-1.8.jar:/usr/lib/ambari-infra-solr-client/libs/httpclient-4.4.1.jar:/usr/lib/ambari-infra-solr-client/libs/slf4j-api-1.7.2.jar:/usr/lib/ambari-infra-solr-client/libs/solr-solrj-5.5.2.jar:/usr/lib/ambari-infra-solr-client/libs/commons-io-2.1.jar:/usr/lib/ambari-infra-solr-client/libs/stax2-api-3.1.4.jar:/usr/lib/ambari-infra-solr-client/libs/httpcore-4.4.1.jar:/usr/lib/ambari-infra-solr-client/libs/junit-4.10.jar:/usr/lib/ambari-infra-solr-client/libs/commons-cli-1.3.1.jar:/usr/lib/ambari-infra-solr-client/libs/ambari-logsearch-solr-client-2.4.2.0.136.jar

Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

Client environment:java.io.tmpdir=/tmp

Client environment:java.compiler=<NA>

Client environment:os.name=Linux

Client environment:os.arch=amd64

Client environment:os.version=2.6.32-642.1.1.el6.x86_64

Client environment:user.name=root

Client environment:user.home=/root

Client environment:user.dir=/var/lib/ambari-agent

Initiating client connection, connectString=r***.com:2181,r***.com:2181,r***:2181/infra-solr sessionTimeout=15000 watcher=org.apache.solr.common.cloud.SolrZkClient$3@7736b039

Opening socket connection to server r***/r***.93:2181. Will not attempt to authenticate using SASL (unknown error)

Waiting for client to connect to ZooKeeper

Socket connection established to r***/r***.93:2181, initiating session

Session establishment complete on server r***/r***.93:2181, sessionid = 0x15a6ecede10000e, negotiated timeout = 15000

Watcher org.apache.solr.common.cloud.ConnectionManager@afe676b name:ZooKeeperConnection Watcher:r***.com:2181,r***.com:2181,r***:2181/infra-solr got event WatchedEvent state:SyncConnected type:None path:null path:null type:None

Client is connected to ZooKeeper

Using default ZkACLProvider

Using default ZkCredentialsProvider

Initiating client connection, connectString=r***.com:2181,r***.com:2181,r***:2181/infra-solr sessionTimeout=10000 watcher=org.apache.solr.common.cloud.SolrZkClient$3@2f81dd44

Waiting for client to connect to ZooKeeper

Opening socket connection to server r***.com/r***.95:2181. Will not attempt to authenticate using SASL (unknown error)

Socket connection established to r***.com/r***.95:2181, initiating session

Session establishment complete on server r***.com/r***.95:2181, sessionid = 0x35a6ecedefb0015, negotiated timeout = 10000

Watcher org.apache.solr.common.cloud.ConnectionManager@5ddfb8d0 name:ZooKeeperConnection Watcher:r***.com:2181,r***.com:2181,r***:2181/infra-solr got event WatchedEvent state:SyncConnected type:None path:null path:null type:None

Client is connected to ZooKeeper

Using default ZkACLProvider

Updating cluster state from ZooKeeper...

No live SolrServers available to handle this request:[http://r***.com:8886/solr, r***:8886/solr]

org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request:[http://r***.com:8886/solr, r***:8886/solr]

at org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:352)

at org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(CloudSolrClient.java:1100)

at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:870)

at org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:806)

at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)

at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:166)

at org.apache.ambari.logsearch.solr.commands.AbstractSolrRetryCommand.createAndProcessRequest(AbstractSolrRetryCommand.java:43)

at org.apache.ambari.logsearch.solr.commands.AbstractRetryCommand.retry(AbstractRetryCommand.java:45)

at org.apache.ambari.logsearch.solr.commands.AbstractRetryCommand.run(AbstractRetryCommand.java:40)

at org.apache.ambari.logsearch.solr.AmbariSolrCloudClient.listCollections(AmbariSolrCloudClient.java:107)

at org.apache.ambari.logsearch.solr.AmbariSolrCloudClient.createCollection(AmbariSolrCloudClient.java:114)

at org.apache.ambari.logsearch.solr.AmbariSolrCloudCLI.main(AmbariSolrCloudCLI.java:463)

Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://r***.com:8886/solr: Expected mime type application/octet-stream but got text/html. <html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<title>Error 404 Not Found</title>

</head>

<body><h2>HTTP ERROR 404</h2>

<p>Problem accessing /solr/admin/collections. Reason:

<pre> Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>

</html>

No live SolrServers available to handle this request:[http://r***.com:8886/solr, r***:8886/solr]

org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request:[http://r***.com:8886/solr, r***:8886/solr]

at org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:352)

at org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(CloudSolrClient.java:1100)

at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:870)

at org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:806)

at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)

at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:166)

at org.apache.ambari.logsearch.solr.commands.AbstractSolrRetryCommand.createAndProcessRequest(AbstractSolrRetryCommand.java:43)

at org.apache.ambari.logsearch.solr.commands.AbstractRetryCommand.retry(AbstractRetryCommand.java:45)

at org.apache.ambari.logsearch.solr.commands.AbstractRetryCommand.run(AbstractRetryCommand.java:40)

at org.apache.ambari.logsearch.solr.AmbariSolrCloudClient.listCollections(AmbariSolrCloudClient.java:107)

at org.apache.ambari.logsearch.solr.AmbariSolrCloudClient.createCollection(AmbariSolrCloudClient.java:114)

at org.apache.ambari.logsearch.solr.AmbariSolrCloudCLI.main(AmbariSolrCloudCLI.java:463)

5 REPLIES 5

avatar
Super Guru
@suresh krish

Is this in a Sandbox or another cluster? What version of HDP are you using?

In the middle of your log output you can see that Ranger is attempting to use the SolrCloudCli.sh to create the Ranger audit collection. That process fails as it isn't able to see any live Solr servers. Do you have the Ambari-Infra service running? That service is the Solr that Ranger uses by default.

avatar
Rising Star

Thanks for your reply. its a 6 node cluster. HDP version 2.5.3. Yes i have two ambari-infra solr instance. are up and running fine.

avatar
Rising Star

my solr UI use 8886 port.

avatar
Rising Star

Any help ???

avatar
Super Collaborator