nextgenhealthcare/connect docker image deployment failing due to permission issues. #6135
Unanswered
mkotaprolu
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Based on the error What is the permission of the files under |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Team,
we are writing wrapper code around base nextgenhealthcare/connect 4.5.0 docker image, when we run the user as root and change the owner and permission of opt/connect folder to root, we are facing the below issue.
following is the permission of /opt/connect post deployment on kubernetes cluster with above errors
$ ls -ltr
total 84
drwxrwxr-x 1 root root 26 Jan 17 20:31 webapps
drwxrwxr-x 1 root root 4096 Jan 17 20:31 server-lib
drwxrwxr-x 1 root root 6 Jan 17 20:31 server-launcher-lib
drwxrwxr-x 1 root root 77 Jan 17 20:31 public_html
drwxrwxr-x 1 root root 85 Jan 17 20:31 public_api_html
-rwxrwxr-x 1 root root 16803 Jan 17 20:31 mirth-server-launcher.jar
-rwxrwxr-x 1 root root 69 Jan 17 20:31 mcservice.vmoptions
-rwxrwxr-x 1 root root 18320 Jan 17 20:31 mcservice
-rwxrwxr-x 1 root root 14867 Jan 17 20:31 mcserver
drwxrwxr-x 1 root root 4096 Jan 17 20:31 extensions
drwxrwxr-x 1 root root 111 Jan 17 20:31 docs
drwxrwxr-x 1 root root 6 Jan 17 20:31 custom-lib
drwxrwxr-x 1 root root 4096 Jan 17 20:31 client-lib
drwxr-xr-x 2 mirth mirth 6 Jan 31 14:29 appdata
-rwxrwxr-x 1 root root 971 Jan 31 14:29 mcserver_base.vmoptions
drwxr-xr-x 2 root root 6 Mar 19 08:43 custom-extensions
drwxrwxr-x 1 root root 30 Mar 19 08:45 conf
-rwxrwxr-x 1 root root 1023 Mar 19 08:45 mcserver.vmoptions
drwxr-xr-x 3 333 root 19 Mar 19 08:45 '?'
drwxr-xr-x 2 333 root 23 Mar 19 08:45 logs
`- [ main] c.c.externalconfigdecryptor.Application : The following 4 profiles are active: "iac", "envclassSignoff", "gcpmockintOverride", "gcpmockint"
2024-03-19 09:17:04.220 INFO 9 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=dab27606-b944-321e-8a18-6caf1786f205
2024-03-19 09:17:04.612 INFO 9 --- [ main] c.c.externalconfigdecryptor.Application : Started Application in 4.437 seconds (JVM running for 5.411)
*** Successfully persisted secrets [default_mysql_database_host, default_mysql_database_name, default_mysql_database_user, default_mysql_database_password] into /usr/local/external-config-decryptor/secrets.properties ***
ERROR 2024-03-19 09:17:08.505 [main] com.mirth.connect.server.extprops.ExtensionStatuses: Unable to save extension.properties file.
java.io.FileNotFoundException: appdata/extension.properties (Permission denied)
at java.io.FileOutputStream.open0(Native Method) ~[?:?]
at java.io.FileOutputStream.open(Unknown Source) ~[?:?]
at java.io.FileOutputStream.(Unknown Source) ~[?:?]
at com.mirth.connect.server.extprops.ExtensionStatusFile.save(ExtensionStatusFile.java:108) ~[mirth-server-launcher.jar:?]
at com.mirth.connect.server.extprops.ExtensionStatusFile.(ExtensionStatusFile.java:41) ~[mirth-server-launcher.jar:?]
at com.mirth.connect.server.extprops.ExtensionStatuses.(ExtensionStatuses.java:74) ~[mirth-server-launcher.jar:?]
at com.mirth.connect.server.extprops.ExtensionStatuses.getInstance(ExtensionStatuses.java:36) ~[mirth-server-launcher.jar:?]
at com.mirth.connect.server.launcher.MirthLauncher.addExtensionsToClasspath(MirthLauncher.java:239) ~[mirth-server-launcher.jar:?]
at com.mirth.connect.server.launcher.MirthLauncher.main(MirthLauncher.java:112) ~[mirth-server-launcher.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84) ~[i4jruntime.jar:?]
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:69) ~[i4jruntime.jar:?]
at install4j.com.mirth.connect.server.launcher.MirthLauncher_mcserver.main(Unknown Source) ~[launcher7f3d482e.jar:?]
ERROR 2024-03-19 09:17:08.519 [main] com.mirth.connect.server.extprops.ExtensionStatuses: Unable to create new extension.properties file.
ERROR 2024-03-19 09:17:09.805 [main] com.mirth.connect.server.controllers.DefaultConfigurationController: error creating tempdir: /opt/connect/appdata/temp
ERROR 2024-03-19 09:17:09.807 [main] com.mirth.connect.server.controllers.DefaultConfigurationController: Failed to initialize configuration controller
java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method) ~[?:?]
at java.io.File.createNewFile(Unknown Source) ~[?:?]
at com.mirth.connect.client.core.PropertiesConfigurationUtil.createBuilder(PropertiesConfigurationUtil.java:37) ~[?:?]
at com.mirth.connect.server.controllers.DefaultConfigurationController.initialize(DefaultConfigurationController.java:334) ~[?:?]
at com.mirth.connect.server.controllers.DefaultConfigurationController.create(DefaultConfigurationController.java:212) ~[?:?]
at com.mirth.connect.server.controllers.DefaultControllerFactory.createConfigurationController(DefaultControllerFactory.java:30) ~[?:?]
at com.mirth.connect.server.controllers.DonkeyEngineController.getConfigurationController(DonkeyEngineController.java:194) ~[?:?]
at com.mirth.connect.server.controllers.DonkeyEngineController.(DonkeyEngineController.java:173) ~[?:?]
at com.mirth.connect.server.controllers.DonkeyEngineController.getInstance(DonkeyEngineController.java:163) ~[?:?]
at com.mirth.connect.server.controllers.DefaultControllerFactory.createEngineController(DefaultControllerFactory.java:34) ~[?:?]
at com.mirth.connect.server.Mirth.(Mirth.java:82) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:?]
at java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) ~[?:?]
at java.lang.reflect.ReflectAccess.newInstance(Unknown Source) ~[?:?]
at jdk.internal.reflect.ReflectionFactory.newInstance(Unknown Source) ~[?:?]
at java.lang.Class.newInstance(Unknown Source) ~[?:?]
at com.mirth.connect.server.launcher.MirthLauncher.main(MirthLauncher.java:115) ~[mirth-server-launcher.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84) ~[i4jruntime.jar:?]
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:69) ~[i4jruntime.jar:?]
at install4j.com.mirth.connect.server.launcher.MirthLauncher_mcserver.main(Unknown Source) ~[launcher7f3d482e.jar:?]
ERROR 2024-03-19 09:17:12.544 [Main Server Thread] com.mirth.connect.server.controllers.DefaultConfigurationController: Could not initialize security settings.
java.io.FileNotFoundException: appdata/keystore.jks (Permission denied)
at java.io.FileOutputStream.open0(Native Method) ~[?:?]
at java.io.FileOutputStream.open(Unknown Source) ~[?:?]
at java.io.FileOutputStream.(Unknown Source) ~[?:?]
at java.io.FileOutputStream.(Unknown Source) ~[?:?]
at com.mirth.connect.server.controllers.DefaultConfigurationController.initializeSecuritySettings(DefaultConfigurationController.java:1265) ~[mirth-server.jar:?]
at com.mirth.connect.server.Mirth.startup(Mirth.java:220) ~[mirth-server.jar:?]
at com.mirth.connect.server.Mirth.run(Mirth.java:168) ~[mirth-server.jar:?]
WARN 2024-03-19 09:17:14.261 [Main Server Thread] com.mirth.connect.server.Mirth: Could not start web server.
java.io.FileNotFoundException: appdata/keystore.jks (No such file or directory)
at java.io.FileInputStream.open0(Native Method) ~/Users/mkotaprolu/Projects/Ventana/mirth-service/bin/generate-config.sh[?:?]
at java.io.FileInputStream.open(Unknown Source) ~[?:?]
at java.io.FileInputStream.(Unknown Source) ~[?:?]
at com.mirth.connect.server.MirthWebServer.createSS
LConnector(MirthWebServer.java:387) ~[mirth-server.jar:?]
at com.mirth.connect.server.MirthWebServer.(MirthWebServer.java:163) ~[mirth-server.jar:?]
at com.mirth.connect.server.Mirth.startWebServer(Mirth.java:472) ~[mirth-server.jar:?]
at com.mirth.connect.server.Mirth.startup(Mirth.java:351) ~[mirth-server.jar:?]
at com.mirth.connect.server.Mirth.run(Mirth.java:168) ~[mirth-server.jar:?]
INFO 2024-03-19 09:17:15.042 [Main Server Thread] com.mirth.connect.server.Mirth: Mirth Connect 4.5.0 (Built on January 17, 2024) server successfully started.
INFO 2024-03-19 09:17:15.042 [Main Server Thread] com.mirth.connect.server.Mirth: This product was developed by NextGen Healthcare (https://www.nextgen.com) and its contributors (c)2005-2024.
INFO 2024-03-19 09:17:15.043 [Main Server Thread] com.mirth.connect.server.Mirth: Running OpenJDK 64-Bit Server VM 17.0.10 on Linux (5.4.242-1.el7.elrepo.x86_64, amd64), mysql, with charset UTF-8.`
i have attached my files to the issue
install-config-decryptor.txt
sysconfig-common.txt
entrypoint.txt
Dockerfile.txt
generate-config.txt
docker-compose.kubernetes.txt
docker-compose.txt
Beta Was this translation helpful? Give feedback.
All reactions