java.io.IOException: No space left on device error message when applying an JBoss EAP patch
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.2+
- 7.x
Issue
When we try to apply patch 6.2 CP 4 we run into the following error:
[disconnected /] patch apply /path/to/jboss-eap-6.2.4-patch.zip
java.io.IOException: No space left on device
The issue was resolved after increasing /tmp directory, but we cannot change /tmp is the production environment.
Resolution
Patching uses the system property java.io.tmpdir which is designed to tell the JVM where it can store temporary files. Users can override this with:
export JAVA_OPTS="-Djava.io.tmpdir=/my/tmp/path"
jboss-cli.sh
[disconnected /] patch apply ...
If the drive where $JBOSS_HOME is located does not have enough space to apply it, set the java.io.tmpdir system property for the JBoss EAP instance as well in the standalone.conf / standalone.conf.bat or domain configuration.
JAVA_OPTS="$JAVA_OPTS -Djava.io.tmpdir=/my/tmp/path"
Users could also set it in the JBoss profile xml <system-properties> as show in How to add/remove/update system properties in EAP 6.x/7.x
The patching classes inside EAP are not checking the system property each time, so they would already have the value that was used when JBoss was started, therefore if using system properties in the JBoss profile then a restart would be needed before they are picked up.
After applying a cumulative patch and verifying there are no issues, users can run the /core-service=patching:ageout-history command as described in the article JBoss EAP footprint too large after applying an update
When using domain mode, the recommendation is to apply the patch to the domain controller first. The domain controller should not be running when doing this. After applying the patch, bring up the domain controller and apply it to the patch to the other host controllers using the patch command with the option --host=<host>.
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.