wso2 / product-ei

An open source, a high-performance hybrid integration platform that allows developers quick integration with any application, data, or system.
https://wso2.com/integration/
Apache License 2.0
374 stars 280 forks source link

Failed to execute the forget-me script when the CARBON_HOME env is predefined for another carbon server #1925

Closed sashikamw closed 6 years ago

sashikamw commented 6 years ago

Description: If the CARBON_HOME environment is pre-defined for another carbon server, execution of the forget-me script failed as the system cannot find the path defined in the forget-me.sh in the path defined for the CARBON_HOME

Affected Product Version: EI 6.1.1 update 23

OS, DB, other environment details and versions:
Windows 2012 R2 JDK 1.8 DB - h2

Steps to reproduce:

  1. A product (APIM) is configured as windows service (where CARBON_HOME is defined as an environmental variable)
  2. Start EI server instance with port offset
  3. Configure the simple proxy that logs customer username
  4. Execute the forget-me tool to remove the user information

Observations Unable to execute the forget-met script as the path defined in the script [1] cannot be found in the CARBON_HOME, as the carbon home environmental variable is set to a different product. Hence the following error message will be logged.

The system can not find the path specified

[1]

call %CARBON_HOME%\wso2\tools\identity-anonymization-tool\bin\forget-me.bat

Expected Results The script should be configured to pick the correct carbon_home when carbon_home variable is already defined in the env variables

nandika commented 6 years ago

We have to provide CARBON_HOME environment variable correctly with respect to the product in order to execute the product. This can be done by either setting the variable on the command line or correcting the previously defined environment variable