Announcement

Collapse
No announcement yet.

Keystore was tampered with, or password was incorrect error while starting Mirth

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Keystore was tampered with, or password was incorrect error while starting Mirth

    I am facing an exception while start/restarting mirth servers. Below are the setup details with exception seen in logs.

    Setup: Two Mirth Connect(v3.8.1) servers connecting to single MySQL(v5.7) database. Note both these servers are running on separate VMs and are still using default keystore password from mirth.properties file.

    Exception:
    ERROR 2019-11-28 07:06:37,614 [Main Server Thread] com.mirth.connect.server.controllers.DefaultConfig urationController: Could not initialize security settings.
    java.io.IOException: Keystore was tampered with, or password was incorrect
    at com.sun.crypto.provider.JceKeyStore.engineLoad(Jce KeyStore.java:879)
    at java.security.KeyStore.load(KeyStore.java:1445)
    at com.mirth.connect.server.controllers.DefaultConfig urationController.initializeSecuritySettings(Defau ltConfigurationController.java:1102)
    at com.mirth.connect.server.Mirth.startup(Mirth.java: 208)
    at com.mirth.connect.server.Mirth.run(Mirth.java:154)
    Caused by: java.security.UnrecoverableKeyException: Password verification failed
    ... 5 more
    WARN 2019-11-28 07:06:41,150 [Main Server Thread] com.mirth.connect.server.Mirth: Could not start web server.
    java.io.IOException: Keystore was tampered with, or password was incorrect
    at com.sun.crypto.provider.JceKeyStore.engineLoad(Jce KeyStore.java:879)
    at java.security.KeyStore.load(KeyStore.java:1445)
    at com.mirth.connect.server.MirthWebServer.createSSLC onnector(MirthWebServer.java:370)
    at com.mirth.connect.server.MirthWebServer.<init>(Mir thWebServer.java:150)
    at com.mirth.connect.server.Mirth.startWebServer(Mirt h.java:385)
    at com.mirth.connect.server.Mirth.startup(Mirth.java: 265)
    at com.mirth.connect.server.Mirth.run(Mirth.java:154)
    Caused by: java.security.UnrecoverableKeyException: Password verification failed
    ... 7 more

  • #2
    This error occurs when the value of keystore.storepass does not match the password used to create the keystore file in the appdata folder.

    When starting Connect for the first time (meaning the keystore has not been created yet), if keystore.storepass and keystore.keypass are set to the default values, Connect will set them to random values and use those values when creating the keystore. Is it possible that your keystore files were generated with these random values, but you reverted mirth.properties back to the default values afterward?

    In any case, the default password does not seem to be correct for your keystores. In the worst case, you may need to remove your keystore.jks files (I would back them up just in case), and then restart Connect to recreate them. Then you'll need to re-do any additional keystore configuration that you may have done before.

    Comment


    • #3
      We are still using the default password which is generated by Mirth at the time of startup.

      I am sure that the content of mirth.properties doesn't change regularly.

      This exception is intermittent when we try to restart the mirth. As a recovery step, yew we do rename the existing keystore.jks and then restart mirth which again creates a new one.

      I would like to know what exactly the issue is if the mirth.properties or keystore related fields doesn't change.

      Again I would like to highlight that we have two mirth instances connecting to same database. Is this possible cause ?

      Comment

      Working...
      X