You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is some circumstance[1] where those lines will result in a zero byte keystore file on disk. That's worse than the file being missing. The server will create a new file if it is missing, but it will fail to start if the keystore file is zero bytes (corrupted). And as long as that zero-byte keystore file remains there, the server will continue to fail to start, even if all other issues are addressed.
I think that the simplest fix that will prevent the problem I experienced is to treat a zero-byte file the same way you treat a missing file: make a new one.
if (keyStoreFile.exists() && keyStoreFile.canRead() && keyStoreFile.length() > 0) {
But, please consider reviewing this whole initializeSecuritySettings() method first. Is re-writing that JKS file every server start really what you want to do? (Is this not where you store the self-signed cert? How come my browser doesn't notice if it is regenerated all the time? Is it generated in a deterministic manner? Is that good?) I have not reviewed this method, these are just some questions that come to mind after glancing over it. Ideally each of those concerns turns out to be nothing.
1: Filesystem full (on NTFS, if that matters) while server is starting, possibly including other processes trying to write (claiming any free blocks) at the same time.
The text was updated successfully, but these errors were encountered:
daveloyall
changed the title
Starting server when config filesystem leaves it unstartable
Starting server with no FS space free leaves it unstartable
Oct 2, 2019
Take a look at these lines which are called every time you start the server.
connect/server/src/com/mirth/connect/server/controllers/DefaultConfigurationController.java
Lines 1128 to 1131 in a723295
There is some circumstance[1] where those lines will result in a zero byte keystore file on disk. That's worse than the file being missing. The server will create a new file if it is missing, but it will fail to start if the keystore file is zero bytes (corrupted). And as long as that zero-byte keystore file remains there, the server will continue to fail to start, even if all other issues are addressed.
I think that the simplest fix that will prevent the problem I experienced is to treat a zero-byte file the same way you treat a missing file: make a new one.
You'd make that change here:
connect/server/src/com/mirth/connect/server/controllers/DefaultConfigurationController.java
Line 1101 in a723295
..Just change that line to something like this:
But, please consider reviewing this whole
initializeSecuritySettings()
method first. Is re-writing that JKS file every server start really what you want to do? (Is this not where you store the self-signed cert? How come my browser doesn't notice if it is regenerated all the time? Is it generated in a deterministic manner? Is that good?) I have not reviewed this method, these are just some questions that come to mind after glancing over it. Ideally each of those concerns turns out to be nothing.1: Filesystem full (on NTFS, if that matters) while server is starting, possibly including other processes trying to write (claiming any free blocks) at the same time.
The text was updated successfully, but these errors were encountered: