Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to install Solr in HDP 2.5 docker

Unable to install Solr in HDP 2.5 docker

New Contributor

Hi,

hdpsearch failed to install with the below error,

Executing pre-install script ====

ERROR: Your Linux distribution (Linux version 4.4.39-moby (root@1d811a9194c4) (gcc version 5.3.0 (Alpine 5.3.0) ) #1 SMP Fri Dec 16 07:34:12 UTC 2016) is not supported by this script! ====

error: %pre(lucidworks-hdpsearch-0:2.5-100.noarch) scriptlet failed, exit status 1 Error in PREIN scriptlet in rpm package lucidworks-hdpsearch-2.5-100.noarch

error: install: %pre scriptlet failed (2), skipping lucidworks-hdpsearch-0:2.5-100

Verifying : lucidworks-hdpsearch-2.5-100.noarch 1/1

Failed: lucidworks-hdpsearch.noarch 0:2.5-100

5 REPLIES 5

Re: Unable to install Solr in HDP 2.5 docker

Super Collaborator
@Rishabh Bhardwaj

Can you please provide below command output :

#uname -a

#cat /proc/version

As per the install script below is the check done prior to installing. So our uname -a output or /proc/version should have string matching in its output for OS type.

if [[ $proc_version == *"Debian"* ]]; then
  distro=Debian
elif [[ $proc_version == *"Red Hat"* ]]; then
  distro=RedHat
elif [[ $proc_version == *"Ubuntu"* ]]; then
  distro=Ubuntu
elif [[ $proc_version == *"SUSE"* ]]; then
  distro=SUSE

Re: Unable to install Solr in HDP 2.5 docker

New Contributor

[root@sandbox 2.5.0.0-1245]# uname -a Linux sandbox.hortonworks.com 4.4.39-moby #1 SMP Fri Dec 16 07:34:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

[root@sandbox 2.5.0.0-1245]# cat /proc/version Linux version 4.4.39-moby (root@1d811a9194c4) (gcc version 5.3.0 (Alpine 5.3.0) ) #1 SMP Fri Dec 16 07:34:12 UTC 2016

Re: Unable to install Solr in HDP 2.5 docker

New Contributor

Did you go about fixing this? If so can you please let me know how?

Re: Unable to install Solr in HDP 2.5 docker

@Rishabh Bhardwaj

The problem seems to be related to Docker Sandbox which uses Moby Linux. As you discovered, the HDPSearch RPM fails to treat moby as centos/redhat.

I'm not aware of a solution, but I will raise the issue.

Re: Unable to install Solr in HDP 2.5 docker

New Contributor

@Gogreen withTech @Rishabh Bhardwaj @rguruvannagari @Michael Young

I haven't seen anyone address this yet, but I was able to install Solr/HDPSearch (2.5.3) successfully in a docker container. You have to trick the installer. After some experimentation, I found that the the installer's OS precheck script uses "cat /proc/version" to get the OS version string, so I simply replaced cat (in my CentOS 7 container, at /usr/bin) with a custom one I wrote which looks for an argument of /proc/version and if so returns a version string with "Red Hat" in it. Any other argument then cat functions as expected. I do this all within my docker build--then restore the original cat at the end of the process. Hope this is helpful to you.