FileNotFoundException when using JBoss farm for doing deployments across cluster

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.1.x

Issue

  • While using the farm directory for doing deployment, the following error is reported.
2014-02-26 16:51:06,810 ERROR [org.jboss.system.server.profileservice.repository.ScopedProfileServiceController] (main) Error installing to Create: name=ProfileKey@5d91dd1d[domain=default, server=default, name=farm] state=Configured mode=On Demand requiredState=Installed
java.lang.reflect.InvocationTargetException
...
...
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /apps/webapps/JBoss/conf/MyServerProfileName/farm/MyApplication.ear.20140215 (No such file or directory)

Resolution

The issue is captured in the JIRA [1].

It's caused by a mismatch in farm-repository-contents.xml between the nodes, from addding a deployment to the farm directory and then removing it again while the other cluster member is not running, so the other node doesn't know about it.

To fix it, manually remove the <content> for that removed file from farm-repository-contents.xml.
Or you can just remove farm-repository-contents.xml completely, and it will be recreated when the node joins the cluster.

Along with other reason mentioned in [2], this is another reason of not promoting the usage of deployments using farm.

[1] https://issues.jboss.org/browse/JBPAPP-6505

[2] https://access.redhat.com/site/solutions/25870

Root Cause

CAUSE: When joining the cluster, the node tries to send all farm deployments it knows about to the other nodes, even ones that have been removed.

CONSEQUENCE: Node cannot join the cluster if it has had a farm deployment removed that the other nodes don't know about.

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.

Comments