Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure.sh modifying supplied props file #87

Open
Gillingham opened this issue Feb 9, 2022 · 3 comments
Open

configure.sh modifying supplied props file #87

Gillingham opened this issue Feb 9, 2022 · 3 comments
Milestone

Comments

@Gillingham
Copy link

After our initial configures failed due to #86 I updated the props passed to configure to have the https:// prefix, but the configure still fails, and then it also reverts the props file.

Output below with redactions between < >

[cws@<CWS host> cws]$ grep elasticsearch_host cws-config.props
elasticsearch_host=https://<CWS FQDN>


[cws@<CWS host> cws]$ ./configure.sh cws-config.props Y
ROOT=/opt/cws/cws
Detected re-run of configure.sh, backing up current distribution...
Saving backup of current CWS distribution to /opt/cws/cws/.backups/backup_20220209_232705...done.
Cleaning out CWS distribution files (this may take a while)...done.
[configure.sh] Checking Java requirements...
[configure.sh]   JAVA_HOME set  [OK]
[configure.sh]   JAVA_HOME = /etc/alternatives/java_sdk_1.8.0
[configure.sh]   JAVA_HOME Java version : 1.8.0_322
[configure.sh]   PATH      Java version : 1.8.0_322  /bin/java
[configure.sh]   Java versions match      [OK]
[configure.sh]   Java version == 1.8x     [OK]
[configure.sh]   Java Compiler available  [OK]
[configure.sh] Java requirements met.
[configure.sh] Using installation presets provided from /opt/cws/cws/cws-config.props...
[configure.sh] This is a first time configuration install...
[configure.sh] AUTO_ACCEPT_CONFIG = Y, so automatically stopping CWS...
[stop_cws.sh] Stopping CWS application server...
Using CATALINA_BASE:   /opt/cws/cws/server/apache-tomcat-9.0.33
Using CATALINA_HOME:   /opt/cws/cws/server/apache-tomcat-9.0.33
Using CATALINA_TMPDIR: /opt/cws/cws/server/apache-tomcat-9.0.33/temp
Using JRE_HOME:        /etc/alternatives/java_sdk_1.8.0
Using CLASSPATH:       /opt/cws/cws/server/apache-tomcat-9.0.33/bin/bootstrap.jar:/opt/cws/cws/server/apache-tomcat-9.0.33/bin/tomcat-juli.jar
[stop_cws.sh] ---------------------------------------------------------------------------
[stop_cws.sh] 0 REMAINING TOMCAT PROCS        (/opt/cws/cws/server/apache-tomcat-9.0.33)
[stop_cws.sh] 0 REMAINING LOGSTASH PROCS      (/opt/cws/cws/server/logstash-7.16.2)
[stop_cws.sh] If any processes still remain, they should be manually terminated.
[stop_cws.sh] ---------------------------------------------------------------------------
[stop_cws.sh] Finished
[configure.sh] Staring CWS Installer...
About to load presets from: /opt/cws/cws/configuration.properties
START CwsInstaller

  /█████   ██       ██   /██████
 ██        ██   |   ██   ██
 ██        ██   █   ██   \█████\
 ██        \█\ /█\ /█/        ██
  \█████     \█/ \█/     ██████/

  Common    Workflow     Service   .....   ( v2.2.0-pre.1 )
                                           ( installing on platform: Linux )

Using CAMUNDA (Camunda built-in) authentication scheme...
+----------------------------------------------------------------------------------+
|   CWS INSTALLATION DETAILS                                                       |
+----------------------------------------------------------------------------------+
Install Type                  = Console AND Worker
Install Console?              = true
Install Worker?               = true
  Worker Type                 = run_all
  Worker ID                   = <Worker prefix>_1623650308_1644449238125
  listen for proc start reqs? = Y
  Auto-register PDs on start? = true
....................................................................................
Database Type                 = mariadb
Database URL                  = jdbc:mariadb://127.0.0.1:3306/cws?autoReconnect=true
Database Driver               = org.mariadb.jdbc.Driver
Database User                 = camunda
Database Password             = ****** (hidden)
....................................................................................
Admin User ID                 = camunda
Admin First Name              = Foo
Admin Last Name               = Bar
Admin Email                   = <my email>
CWS web port                  = 38080
CWS SSL port                  = 38443
CWS AJP port                  = 38009
CWS shutdown port             = 38005
CWS JMX port                  = 31099
....................................................................................
CWS AMQ JMX port              = 37099
CWS AMQ host                  = <CWS FQDN>
CWS AMQ port                  = 31616
....................................................................................
CWS Authentication scheme     = CAMUNDA
LDAP URL                      = null
....................................................................................
Send task assignment emails?  = y
Task assignment subject       = [CWS] You have been assigned a task (CWS_TASK_NAME)
Task assignment body          = fn:CWS_USER_FIRSTNAME<br/>ln:CWS_USER_LASTNAME,<br/>tn:(CWS_TASK_NAME), em:CWS_USER_EMAIL
....................................................................................
SMTP host                     = <smtp host>
SMTP port                     = 25
....................................................................................
Elasticsearch URL             = <CWS FQDN>
Elasticsearch Port            = 9200
Elasticsearch User            = cws
Elasticsearch Password        = ****** (hidden)
....................................................................................
Logstash                      = CWS Provided
....................................................................................
CWS Notification Emails       = <my email>
CWS Token Expiration In Hours = 24
History Level                 = full
Days Remove Abandoned Workers = 1
History Days to Live          = 7
....................................................................................
Brand Header                  = Test Console
....................................................................................
Enable Cloud Auto-scaling?    = false
....................................................................................

+----------------------------------------------------------------------------------+
VALIDATING CONFIGURATION...  Please wait, this may take some time...

checking DB host (127.0.0.1:3306) accessibility...
   [OK]  (127.0.0.1:3306) is ACCEPTING tcp connections.

checking database configuration...
   [OK]

checking that database timestamp is consistent with this installation timestamp...
   [OK]

checking availability of tomcat connector port (38080)...
   [OK]

checking availability of tomcat AJP port (38009)...
   [OK]

checking availability of shutdown port (38005)...
   [OK]

checking for a system time synchronization service...
   [OK]

checking that user provided Elasticsearch (<CWS FQDN>:9200) is running...
   [WARNING]
       It was determined that the user provided Elasticsearch is not running or is inaccessible.

checking availability of AMQ port (31616)...
   [OK]


*******************************
*******************************
******** WARNING !!!!! ********
*******************************
*******************************
+--------------------------------------------------------+
|   1 POTENTIAL PROBLEMS IDENTIFIED WITH CONFIGURATION   |
+--------------------------------------------------------+

1 potential problems identified during configuration. Aborting...

[configure.sh] ERROR: Problems detected during CWS Installer, aborting installation.


[cws@<CWS host> cws]$ grep elasticsearch_host cws-config.props
elasticsearch_host=<CWS FQDN>
@voxparcxls
Copy link
Collaborator

Hi @Gillingham , thanks for feedback on this issue.

I believe the problem you're having with the "cws-config.props" reverting is with the cws re-runs.

One of the current functions of the creating backups in /.backups is that it overwrites most of the resource files/folders in the root using the contents in /.backups/clean which was made on first install run using the initial settings in the root; there are specific files that aren't overwritten, like 'configuration.properties' with this specific file name.

If you had a elasticsearch_host set without http:// then it will reset to that again.

Two ways around this for the meantime:

  1. Your props file can be renamed to: configuration.properties
    OR
  2. You can delete the .backups folder before each run. This makes every ./configure.sh run the default. (this is the more tedious workaround)

@voxparcxls
Copy link
Collaborator

@Gillingham
I did a few rounds of reconfig and recreated your case. The right approach to preserving your cws-config.props file while passing it to configure.sh on multiple runs is to save it in a separate directory outside of the cws/root folder.

In this case it's in parent dir of CWS

./configure.sh ../cws-config.props Y

This is the recommended procedure for reconfigured runs in the updated docs: https://wiki.jpl.nasa.gov/display/cws/Configure+CWS#:~:text=Run%20configure.sh%2C%20passing%20it%20the%20configuration%20file%20with%20its%20file%20path%3A

Please let me know if this requires anymore clarification, thanks.

@jamesfwood
Copy link
Collaborator

Will be fixed in v2.3.
JIRA: https://jira.jpl.nasa.gov/browse/CWS-663

@voxparcxls voxparcxls added this to the 2.3 milestone Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants