Bug #3721
closedError on Rudder about lack of RAM memory should be explicit
Description
If Rudder Server is installed on a machine with less than 1Gb, it will never work but there is no indication about it.
The installation of rudder-webapp contains this:
[...] Restarting Rudder webapp and inventory-endpoint Stopping Jetty: No process in pidfile '/var/rudder/run/jetty.pid' found running; none killed. OK Setting umask to 0027 Starting Jetty: FAILED
Manually restarting jetty:
# /etc/init.d/jetty restart Stopping Jetty: start-stop-daemon: warning: failed to kill 15682: No such process 1 pids were not killed No process in pidfile '/var/rudder/run/jetty.pid' found running; none killed. OK
But I search for the java command to launch the application:
# /etc/init.d/jetty check Checking arguments to Jetty: [...] RUN_CMD = /usr/lib/jvm/java-6-sun/bin/java -server -Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Drudder.configFile=/opt/rudder/etc/rudder-web.properties -Drudder.authFile=/opt/rudder/etc/rudder-users.xml -Dinventoryweb.configFile=/opt/rudder/etc/inventory-web.properties -Dlogback.configurationFile=/opt/rudder/etc/logback.xml -Drun.mode=production -Djetty.logs=/var/log/rudder/webapp/ -Djetty.home=/opt/rudder/jetty7 -Djava.io.tmpdir=/tmp -jar /opt/rudder/jetty7/start.jar OPTIONS=Server --pre=etc/jetty-logging.xml
And then launch it:
# /usr/lib/jvm/java-6-sun/bin/java -server -Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Drudder.configFile=/opt/rudder/etc/rudder-web.properties -Drudder.authFile=/opt/rudder/etc/rudder-users.xml -Dinventoryweb.configFile=/opt/rudder/etc/inventory-web.properties -Dlogback.configurationFile=/opt/rudder/etc/logback.xml -Drun.mode=production -Djetty.logs=/var/log/rudder/webapp/ -Djetty.home=/opt/rudder/jetty7 -Djava.io.tmpdir=/tmp -jar /opt/rudder/jetty7/start.jar OPTIONS=Server --pre=etc/jetty-logging.xml Error occurred during initialization of VM Could not reserve enough space for object heap
Here, it is obvious that the error came from a lack of RAM but not before. We should explicit it.
How to do that ? Use a check of RAM in rudder-webapp postinst and in the /etc/init.d/rudder-server-root file before any re/start of jetty ?
Updated by Matthieu CERDA over 11 years ago
- NOT failing the installation because of that (Just outputting a warning with echo would be sufficient)
- Not trying to run Rudder if we know the RAM is too low
Updated by Jonathan CLARKE over 11 years ago
This is a great ticket! I love it already :)
I agree we should warn a lot more explicitely about this. However, I'm not keen on the idea of checking on a fixed value (ie, "is there > 1 GB of RAM ?"), when the real test is done by Java itself when running.
Could we get back the return code of the java executable when this happens, and print out the error message? Maybe by patching the jetty init script?
Updated by Nicolas PERRON over 11 years ago
Jonathan CLARKE wrote:
This is a great ticket! I love it already :)
I agree we should warn a lot more explicitely about this. However, I'm not keen on the idea of checking on a fixed value (ie, "is there > 1 GB of RAM ?"), when the real test is done by Java itself when running.
Could we get back the return code of the java executable when this happens, and print out the error message? Maybe by patching the jetty init script?
I prefer this solution
Updated by Matthieu CERDA over 11 years ago
- Assignee set to Matthieu CERDA
- Priority changed from N/A to 3
- Target version set to 2.4.8
It seems it is quite important due to the number of people beeing impacted. Grabbin' this.
Updated by Matthieu CERDA over 11 years ago
- Status changed from Discussion to In progress
Updated by Matthieu CERDA over 11 years ago
- Status changed from In progress to Pending technical review
- % Done changed from 0 to 100
- Pull Request set to https://github.com/Normation/rudder-packages/pull/96
PR available.
Updated by Jonathan CLARKE about 11 years ago
- Status changed from Pending technical review to Discussion
Matthieu CERDA wrote:
PR available.
Matthieu, I put some feedback in the PR, please address it.
Updated by Matthieu CERDA about 11 years ago
- Status changed from Discussion to Pending technical review
- Assignee changed from Matthieu CERDA to Jonathan CLARKE
Done !
Updated by Matthieu CERDA about 11 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset commit:0dd37f164634dd507c1290d625ffa32aff54f1da.
Updated by Matthieu CERDA about 11 years ago
Applied in changeset commit:48b430a060b136079187e9ca9fa6d5b28ac5e5a6.
Updated by Matthieu CERDA about 11 years ago
Applied in changeset commit:b549d4c7969da83f28ba44290e0ba366604403c8.
Updated by Jonathan CLARKE about 11 years ago
Applied in changeset commit:d06999ee5fa64bfcbf6676de417973c18ff56054.
Updated by Nicolas PERRON about 11 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.4.8, which was released today.
Check out:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2013-September/000044.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog24
- Download information: http://www.rudder-project.org/foswiki/Download/
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging