JBoss Migration Tool fails to migrate server configuration with FileNotFoundException ...properties (Permission denied)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7
Issue
JBoss Migration Tool fails to migrate server configuration with WFLYEMB0021: Cannot start embedded process , the migration.log shows:
ERROR [fail] MSC000001: Failed to start service org.wildfly.core.management.security.realm.ApplicationRealm.properties_authorization: org.jboss.msc.service.StartException in service org.wildfly.core.management.security.realm.ApplicationRealm.properties_authorization: WFLYDM0017: Unable to load properties
at org.jboss.as.domain.management.security.PropertiesFileLoader.start(PropertiesFileLoader.java:159) [wildfly-domain-management-15.0.2.Final-redhat-00001.jar:15.0.2.Final-redhat-00001]
at org.jboss.as.domain.management.security.PropertiesSubjectSupplemental.start(PropertiesSubjectSupplemental.java:79) [wildfly-domain-management-15.0.2.Final-redhat-00001.jar:15.0.2.Final-redhat-00001]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739) [jboss-msc-1.4.12.Final-redhat-00001.jar:1.4.12.Final-redhat-00001]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701) [jboss-msc-1.4.12.Final-redhat-00001.jar:1.4.12.Final-redhat-00001]
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559) [jboss-msc-1.4.12.Final-redhat-00001.jar:1.4.12.Final-redhat-00001]
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_222]
Caused by: java.io.FileNotFoundException: /path/to/jboss-eap-7.4/domain/configuration/application-roles.properties (Permission denied)
at java.io.FileInputStream.open0(Native Method) [rt.jar:1.8.0_222]
at java.io.FileInputStream.open(FileInputStream.java:195) [rt.jar:1.8.0_222]
at java.io.FileInputStream.<init>(FileInputStream.java:138) [rt.jar:1.8.0_222]
at org.jboss.as.domain.management.security.PropertiesFileLoader.load(PropertiesFileLoader.java:202) [wildfly-domain-management-15.0.2.Final-redhat-00001.jar:15.0.2.Final-redhat-00001]
at org.jboss.as.domain.management.security.PropertiesFileLoader.loadAsRequired(PropertiesFileLoader.java:190) [wildfly-domain-management-15.0.2.Final-redhat-00001.jar:15.0.2.Final-redhat-00001]
at org.jboss.as.domain.management.security.PropertiesFileLoader.getProperties(PropertiesFileLoader.java:170) [wildfly-domain-management-15.0.2.Final-redhat-00001.jar:15.0.2.Final-redhat-00001]
at org.jboss.as.domain.management.security.PropertiesFileLoader.start(PropertiesFileLoader.java:157) [wildfly-domain-management-15.0.2.Final-redhat-00001.jar:15.0.2.Final-redhat-00001]
... 9 more
Resolution
The user running the jboss-server-migration.sh needs to have access to the files under $JBOSS_HOME, so change the permissions on the configuration files mentioned and re-run the jboss-server-migration.sh.
Root Cause
Most likely, the permissions were changed and/or EAP was run as a different user than is used when the jboss-server-migration.sh is run, resulting in the user running jboss-server-migration.sh not having permission to the files in the source $JBOSS_HOME.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.