Comments (10)
Thanks @cebor @JSkier21
Seems like /etc/profile, /etc/profile.d are both working on Bash, while default Bourne Shell only works with ~/.profile.
I have setup the ENV directly in dockerfile this time, seems working: #944
$ docker exec -it ostest bash -c "cd plugins/opensearch-security/tools && ./securityadmin.sh -cd ../securityconfig/ -icl -nhnv -cacert ../../../config/root-ca.pem -cert ../../../config/kirk.pem -key ../../../config/kirk-key.pem"
Security Admin v7
Will connect to localhost:9300 ... done
Connected as CN=kirk,OU=client,O=client,L=test,C=de
OpenSearch Version: 1.1.0
OpenSearch Security Version: 1.1.0.0
Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ...
Clustername: docker-cluster
Clusterstate: GREEN
Number of nodes: 1
Number of data nodes: 1
.opendistro_security index already exists, so we do not need to create one.
Populate config from /usr/share/opensearch/plugins/opensearch-security/securityconfig
Will update '_doc/config' with ../securityconfig/config.yml
SUCC: Configuration for 'config' created or updated
Will update '_doc/roles' with ../securityconfig/roles.yml
SUCC: Configuration for 'roles' created or updated
Will update '_doc/rolesmapping' with ../securityconfig/roles_mapping.yml
SUCC: Configuration for 'rolesmapping' created or updated
Will update '_doc/internalusers' with ../securityconfig/internal_users.yml
SUCC: Configuration for 'internalusers' created or updated
Will update '_doc/actiongroups' with ../securityconfig/action_groups.yml
SUCC: Configuration for 'actiongroups' created or updated
Will update '_doc/tenants' with ../securityconfig/tenants.yml
SUCC: Configuration for 'tenants' created or updated
Will update '_doc/nodesdn' with ../securityconfig/nodes_dn.yml
SUCC: Configuration for 'nodesdn' created or updated
Will update '_doc/whitelist' with ../securityconfig/whitelist.yml
SUCC: Configuration for 'whitelist' created or updated
Will update '_doc/audit' with ../securityconfig/audit.yml
SUCC: Configuration for 'audit' created or updated
Done with success
$ docker exec -it ostest bash -c "env"
HOSTNAME=ac1f16b539e0
TERM=xterm
LD_LIBRARY_PATH=:/usr/share/opensearch/plugins/opensearch-knn/knnlib
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/share/opensearch/jdk/bin
PWD=/usr/share/opensearch
JAVA_HOME=/usr/share/opensearch/jdk
discovery.type=single-node
SHLVL=1
HOME=/usr/share/opensearch
_=/usr/bin/env
$ docker exec -it ostest sh -c "env"
HOSTNAME=3d9af79ddeff
TERM=xterm
LD_LIBRARY_PATH=:/usr/share/opensearch/plugins/opensearch-knn/knnlib
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/share/opensearch/jdk/bin
PWD=/usr/share/opensearch
JAVA_HOME=/usr/share/opensearch/jdk
discovery.type=single-node
SHLVL=1
HOME=/usr/share/opensearch
_=/usr/bin/env
from opensearch-build.
Steps to reproduce:
# start container
docker run --name ostest --rm -e "discovery.type=single-node" opensearchproject/opensearch:1.1.0
# run securityadmin.sh
docker exec -it ostest bash -c "cd plugins/opensearch-security/tools && ./securityadmin.sh -cd ../securityconfig/ -icl -nhnv -cacert ../../../config/root-ca.pem -cert ../../../config/kirk.pem -key ../../../config/kirk-key.pem"
from opensearch-build.
Should I create a PR for this? 1.0.0 release is coming soon.
from opensearch-build.
Seems like AdoptOpenJDK installation does not add the JAVA_HOME to profile.
Also, we change the dockerfile which directly take the bundled JDK from tarball thus ignored the setup of JAVA_HOME.
We have identified a fix now and will apply it in the next release.
Thanks.
from opensearch-build.
Add fix PR.
from opensearch-build.
This issue is still in version 1.1.0!
from opensearch-build.
This issue is still in version 1.1.0!
Please give detailed description of what is the issues so we can take a look @cebor 😄
from opensearch-build.
This issue is still in version 1.1.0!
Please give detailed description of what is the issues so we can take a look @cebor 😄
JAVA_HOME
env var is not set, and so its not possible to run securityadmin.sh
out of the box.
Issues is also described by the author above. ;-)
from opensearch-build.
This issue is still in version 1.1.0!
Please give detailed description of what is the issues so we can take a look @cebor 😄
JAVA_HOME
env var is not set, and so its not possible to runsecurityadmin.sh
out of the box.Issues is also described by the author above. ;-)
Can you show your full step on how to produce this?
I just checked and java home is set on my side.
Thanks.
from opensearch-build.
Also have this issue. Running in Podman, OS1.1.0 JAVA_HOME is blank, can't run those tools either.
Update:
Looks like the variable is there in a bash shell, but not the sh shell. Confirmed running sh with bash or going into bash shell in console and it works.
from opensearch-build.
Related Issues (20)
- [QUESTION] Why are our Windows distribution tests failing? HOT 4
- [Bug]: Version bump PR for functional test repo failed to update pack-lock.json HOT 2
- [BUG] opensearch-dashboards-plugin remove securityDashboards sometimes does not work HOT 4
- [Retrospective] Release Version 1.3.16 HOT 1
- [Bug]: Test result files are over-escaped in manifests now
- [Cloudfront S3 Logs for production project website into AOS Domain] HOT 2
- [RELEASE] Release version 1.3.17 HOT 6
- [Renew Key] Upcoming expiration of our current sub public key (expire on 20250512)
- Support aarch64 OpenSearch distribution for MacOS architecture HOT 10
- Release template improvement suggestions HOT 1
- CVE-2024-34146 (Medium) detected in git-server-1.11.jar
- [RELEASE] Release version 2.15.0 HOT 6
- CVE-2024-34145 (High) detected in script-security-1229.v4880b_b_e905a_6.jar
- CVE-2024-34144 (High) detected in script-security-1229.v4880b_b_e905a_6.jar HOT 1
- [Meta][Discussion] k-NN lib building process next approaches to continue support AL2 after CentOS7 deprecation HOT 11
- [Bug]: Gradle check job fails to publish metrics when `pr_number` is null. HOT 1
- [BENCHMARK] Automate Way to Fetch Aggregate Nightly Runs Data HOT 2
- [Retrospective] Release Version 2.14.0 HOT 2
- [RELEASE] Release version 2.14.1 HOT 1
- [BENCHMARK] Onboarding OSB to Continuous Builds for Dockerhub Staging and TestPyPi + Automatic Copy-Over HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensearch-build.