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

Admin Launcher logs show an error about a too-large preferences JSON blob #4242

Closed
rbeckman-nextgen opened this issue May 11, 2020 · 1 comment
Closed
Milestone

Comments

@rbeckman-nextgen
Copy link
Collaborator

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

The MC Launcher logs show a problem saving preferences because the JSON blob is too large. This launcher has 18 MC entries saved in it. This error does not appear to cause any settings to not save.

I have reviewed the full JSON blob and I do not see any problems like a manual edit. Its simply the size.

{PATH=/usr/bin:/bin:/usr/sbin:/sbin, JAVA_MAIN_CLASS_6461=com.install4j.runtime.launcher.MacLauncher, MC_EXTRA_CLASSPATH2=../../ca ...REMOVED LONG CLASSPATH... d.jar, INSTALL4J_JAVA_HOME_OVERRIDE=../../../../Plugins/jre.bundle/Contents/Home/jre, INSTALL4J_ADD_VM_PARAMS=-Xmx2g -Xdock:icon=launcher.ico , APP_ICON_6461=/Applications/Mirth Connect Administrator Launcher.app/Contents/Resources/app.icns, USER=jon.bartels, LANG=en_US.UTF-8, TMPDIR=/var/folders/nr/3v1x04xn1dqgt9xzrg3m4xgm0000gn/T/, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.ZPyOMlnVv3/Listeners, EXE4J_JAVA_HOME=../../../../Plugins/jre.bundle/Contents/Home/jre, XPC_FLAGS=0x0, APP_NAME_6461=Mirth Connect Administrator Launcher, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.KcpKgZODyz/Render, LOGNAME=jon.bartels, XPC_SERVICE_NAME=com.install4j.0730-6030-4034-5735.60.9200, HOME=/Users/jon.bartels} ERROR 2019-01-16 17:19:16,232 [JavaFX Application Thread] com.mirth.connect.client.launcher.MirthClientLauncher: Unable to save connections to preferences. java.lang.IllegalArgumentException: Value too long: [{"id":"bc984f2 ... REMOVED LOTS OF DATA ... seLegacyDHSettings":false}] at java.util.prefs.AbstractPreferences.put(AbstractPreferences.java:245) at com.mirth.connect.client.launcher.MirthClientLauncher.e(SourceFile:1367) at com.mirth.connect.client.launcher.MirthClientLauncher.b(SourceFile:1188) at com.mirth.connect.client.launcher.MirthClientLauncher.a(SourceFile:103)

Imported Issue. Original Details:
Jira Issue Key: MIRTH-4366
Reporter: jbartels
Created: 2019-01-17T14:54:01.000-0800

@rbeckman-nextgen rbeckman-nextgen added this to the AL 1.1.0 milestone May 11, 2020
@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

https://docs.oracle.com/javase/7/docs/api/java/util/prefs/Preferences.html#MAX_VALUE_LENGTH seems to suggest that this value is capped at 8192 characters.

In my case I have a few entries with “sslCipherSuites” set to a long, non default value which is making it long. I have tried setting these back to the default but the errors persist. This error does not appear harmful my connections still save and work as expected.

I think possible solutions might be:

  • reduce the log level for this error
  • dont save the preference (its read from disk anyway innit?)
  • compress the JSON

Imported Comment. Original Details:
Author: jbartels
Created: 2019-01-17T15:04:09.000-0800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant