在kettle安装目录下有脚本encr.sh 或者 Encr.bat (Windows),运行命令 ./encr.sh -kettle Password_123

    1. $ ./encr.sh -kettle Password_123
    2. Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
    3. Listening for transport dt_socket at address: 1044
    4. SLF4J: Class path contains multiple SLF4J bindings.
    5. SLF4J: Found binding in [jar:file:/Users/twx/Downloads/data-integration/launcher/../lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    6. SLF4J: Found binding in [jar:file:/Users/twx/Downloads/data-integration/launcher/../lib/phoenix-client-4.7.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    7. SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    8. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
    9. log4j:WARN Continuable parsing error 45 and column 76
    10. log4j:WARN Element type "rollingPolicy" must be declared.
    11. log4j:WARN Continuable parsing error 52 and column 14
    12. log4j:WARN The content of element type "appender" must match "(errorHandler?,param*,layout?,filter*,appender-ref*)".
    13. log4j:WARN Please set a rolling policy for the RollingFileAppender named 'pdi-execution-appender'
    14. 20:26:46,156 INFO [KarafBoot] Checking to see if org.pentaho.clean.karaf.cache is enabled
    15. 20:26:46,250 INFO [KarafInstance]
    16. *******************************************************************************
    17. *** Karaf Instance Number: 1 at /Users/twx/Downloads/data-integration/./sys ***
    18. *** tem/karaf/caches/encr/data-1 ***
    19. *** FastBin Provider Port:52901 ***
    20. *** Karaf Port:8802 ***
    21. *** OSGI Service Port:9051 ***
    22. *******************************************************************************
    23. 九月 27, 2019 8:26:46 下午 org.apache.karaf.main.Main launch
    24. 信息: Installing and starting initial bundles
    25. 九月 27, 2019 8:26:47 下午 org.apache.karaf.main.Main launch
    26. 信息: All initial bundles installed and set to start
    27. 九月 27, 2019 8:26:47 下午 org.apache.karaf.main.Main$KarafLockCallback lockAquired
    28. 信息: Lock acquired. Setting startlevel to 100
    29. Encrypted 2be98afc83ac68197bc16bc74e1c3fd89

    然后就可以将密码粘贴复制到xml文件中了,或者在kettle.properties 里配置

    SY.MYSQL.PASSWORD= Encrypted 2be98afc83ac68197bc16bc74e1c3fd89

    对应的xml中的密码应该是:

    image.png