OpenIdentityPlatform / OpenDJ

OpenDJ is an LDAPv3 compliant directory service, which has been developed for the Java platform, providing a high performance, highly available, and secure store for the identities managed by your organization. Its easy installation process, combined with the power of the Java platform makes OpenDJ the simplest, fastest directory to deploy and manage.
https://www.openidentityplatform.org/opendj
Other
368 stars 102 forks source link

Cannot Import LDIF to Cassandra with Setup CLI Mode #367

Closed CoderYellow closed 2 months ago

CoderYellow commented 3 months ago

Description:

While attempting to import LDIF to Cassandra using the setup CLI mode, the following command does not work as expected:

export OPENDJ_JAVA_ARGS="-server -Ddatastax-java-driver.basic.contact-points.0=scylla-cluster-client.security.svc:9042 -Ddatastax-java-driver.basic.load-balancing-policy.local-datacenter=cn-gz-1 -Ddatastax-java-driver.basic.auth-provider.username=cassandra -Ddatastax-java-driver.basic.auth-provider.password=cassandra"

./setup --backendType cas -h localhost -p 1389 --ldapsPort 1636 --adminConnectorPort 4444 --enableStartTLS --generateSelfSignedCertificate --rootUserDN "cn=Directory Manager" --rootUserPassword password --baseDN dc=example,dc=com --sampleData 5000 --cli --acceptLicense --no-prompt

Issue: Above command fails to execute correctly in CLI mode because the import-ldif subprocess cannot inherit the Cassandra VM properties configuration from the main setup process. However, this process works fine in GUI mode due to the Import Runtime Settings option that allows us to add the necessary Cassandra properties.

Request: We need the Import Runtime Settings option or a similar functionality to be available in CLI mode to enable the import-ldif subprocess to access the Cassandra VM properties.

CoderYellow commented 3 months ago

manaully configuraing import-ldif.offline.java-args in java.properties file is an workground

CoderYellow commented 3 months ago

btw seems the dsjavaproperties command to edit the java.properties is gone in the latest version , how can we edit the java.properties now

vharseko commented 2 months ago

use

export OPENDJ_JAVA_ARGS="-server -Ddatastax-java-driver.basic.contact-points.0=scylla-cluster-client.security.svc:9042 -Ddatastax-java-driver.basic.load-balancing-policy.local-datacenter=cn-gz-1 -Ddatastax-java-driver.basic.auth-provider.username=cassandra -Ddatastax-java-driver.basic.auth-provider.password=cassandra"

bin/import-ldif

or add import-ldif.offline.java-args in java.properties