[ 
https://issues.apache.org/jira/browse/RANGER-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937505#comment-17937505
 ] 

Abhishek Kumar commented on RANGER-5158:
----------------------------------------

[~adoroszlai] 

Thanks for working on this, I verified the following:
 * The docker build for ranger-base completes successfully and much faster (it 
completed in less than 40s).
 * The image size is significantly reduced, I believe this is primarily due to 
using the base image as: eclipse-temurin:8-jdk-jammy
 * I tried building ranger on top of this image, I see the following errors in 
ranger container: 
 ** 
{code:java}
2025-03-21 21:36:13,329   --------- Running Ranger PolicyManager Web 
Application Install Script --------- 
2025-03-21 21:36:13,331  [I] uname=Linux
2025-03-21 21:36:13,334  [I] hostname=ranger.example.com
2025-03-21 21:36:13,339  [I] DB_FLAVOR=POSTGRES
2025-03-21 21:36:13,342  [I] Audit source=solr
2025-03-21 21:36:13,344  [I] Checking distribution name..
./setup.sh: line 224: lsb_release: command not found
declare -x DEBUG_ADMIN="false"
declare -x HOME="/home/ranger"
declare -x HOSTNAME="ranger.example.com"
declare -x JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-arm64"
declare -x JAVA_VERSION="jdk8u442-b06"
declare -x LANG="en_US.UTF-8"
declare -x LANGUAGE="en_US:en"
declare -x LC_ALL="en_US.UTF-8"
declare -x OLDPWD="/"
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
declare -x PWD="/opt/ranger/admin"
declare -x RANGER_DB_TYPE="postgres"
declare -x RANGER_DIST="/home/ranger/dist"
declare -x RANGER_HOME="/opt/ranger"
declare -x RANGER_SCRIPTS="/home/ranger/scripts"
declare -x RANGER_VERSION="3.0.0-SNAPSHOT"
declare -x SHLVL="2"
declare -x TERM="xterm"
2025-03-21 21:36:13,351  [I] Found distribution : 
2025-03-21 21:36:13,352  [I] check if command 
/usr/lib/jvm/java-1.8.0-openjdk-arm64/bin/java exists
./setup.sh: line 217: type: /usr/lib/jvm/java-1.8.0-openjdk-arm64/bin/java: not 
found
2025-03-21 21:36:13,353  [E] '/usr/lib/jvm/java-1.8.0-openjdk-arm64/bin/java' 
command not found
Ranger Admin Setup Script didn't complete proper execution.
find: 
‘/opt/ranger/ranger-3.0.0-SNAPSHOT-admin/ews/webapp/WEB-INF/classes/conf/’: No 
such file or directory
Starting Apache Ranger Admin Service
./ews/ranger-admin-services.sh: line 94: 
/opt/ranger/ranger-3.0.0-SNAPSHOT-admin/ews/logs/catalina.out: No such file or 
directory
Apache Ranger Admin Service failed to start!
An exception occured: HTTPConnectionPool(host='ranger', port=6080): Max retries 
exceeded with url: /service/public/v2/api/service/name/dev_hdfs (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffffbba9e230>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
An exception occured: HTTPConnectionPool(host='ranger', port=6080): Max retries 
exceeded with url: /service/public/v2/api/service/name/dev_yarn (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffffbba9e650>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
An exception occured: HTTPConnectionPool(host='ranger', port=6080): Max retries 
exceeded with url: /service/public/v2/api/service/name/dev_hive (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffffbba9e9e0>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
An exception occured: HTTPConnectionPool(host='ranger', port=6080): Max retries 
exceeded with url: /service/public/v2/api/service/name/dev_hbase (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffffbba9ed70>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
An exception occured: HTTPConnectionPool(host='ranger', port=6080): Max retries 
exceeded with url: /service/public/v2/api/service/name/dev_kafka (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffffbba9f130>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
An exception occured: HTTPConnectionPool(host='ranger', port=6080): Max retries 
exceeded with url: /service/public/v2/api/service/name/dev_knox (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffffbba9f520>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
An exception occured: HTTPConnectionPool(host='ranger', port=6080): Max retries 
exceeded with url: /service/public/v2/api/service/name/dev_kms (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffffbba9f8b0>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
An exception occured: HTTPConnectionPool(host='ranger', port=6080): Max retries 
exceeded with url: /service/public/v2/api/service/name/dev_trino (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffffbba9f370>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
An exception occured: HTTPConnectionPool(host='ranger', port=6080): Max retries 
exceeded with url: /service/public/v2/api/service/name/dev_ozone (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffffbba9f0a0>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
Ranger Admin process probably exited, no process id found!
 {code}

 ** The ranger container quits after running for sometime.
 ** I think some commands are missing in the underlying base image, could you 
please review?

Enabling this from the workflow with support for multi-arch will be very 
helpful, please raise a PR as well.

Thanks!

> Pre-build ranger-base image
> ---------------------------
>
>                 Key: RANGER-5158
>                 URL: https://issues.apache.org/jira/browse/RANGER-5158
>             Project: Ranger
>          Issue Type: Sub-task
>          Components: docker
>            Reporter: Attila Doroszlai
>            Assignee: Attila Doroszlai
>            Priority: Major
>
> {{ranger-base}} image is used as base image for various Ranger components.  
> It can be built and published independently of Ranger, since it only includes 
> runtime dependencies, nothing specific to Ranger's version.
> Proposed changes:
> - create separate repository for the base image definition
> - build and publish the image using GitHub workflow
> - include only one version of Java, but publish image in different flavors 
> for different Java versions as necessary
> - build for multiple platforms (amd64, arm64)
> - publish both to Docker Hub and GitHub Container Registry
> Benefits:
> - reduced image size
> - reduced build time for derived images
> - improved usability for developers and CI



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to