Description of problem: Timezone cannot be set to europe. Before this could be could be done by setting jvm option in an action hooker or setting time zone in .bash_profile Version-Release number of selected component (if applicable): started with the introduction of caridge version 2 a few days ago How reproducible: Steps to Reproduce: 1. add export JAVA_OPTS="-Duser.timezone=Europe/Zurich -Dfile.encoding=UTF-8" to the hooker pre_start_jbosseap-6.0 2. create a jsp that print out a date (<%@page import="java.util.*"%><%= new Date() %> Actual results: time displayed is the one somewhere in the us Wed Jun 05 00:48:12 EDT 2013 (error was notice since this date) Expected results: time displayed should be the one in europe Wed Jun 05 06:48:12 CEST 2013 Additional info: Zurich timezone is avaliable if you run this code bellow (result see : http://fapp-esmart.rhcloud.com/test.jsp): p>timezones : </p> <% String[] tzs = TimeZone.getAvailableIDs(); for(int i=0; i<tzs.length; i++) { %> <p>iteration : <%= tzs[i] %></p> <% } %>
Raph, Can you grant the OpenShift operations team permission to view the contents of your application's server logs and the source contents under ~/app-root/repo/.openshift? I was able to create a new jbosseap-6.0 application and add a '.openshift/action_hooks/pre_start_jbosseap' (mode +x) with the following contents: #!/bin/bash export JAVA_OPTS="-Duser.timezone=Europe/Zurich -Dfile.encoding=UTF-8" Which upon push yielded the following output from my test.jsp (same as the reported script): Mon Jun 10 19:46:00 CEST 2013 You can see the effect of the hook in /tmp/jbosseap.log in the application gear: Removing existing standalone.xml ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /var/lib/openshift/51b608630a390e0f1f000001/jbosseap JAVA: /usr/lib/jvm/jre-1.7.0/bin/java JAVA_OPTS: -server -XX:+TieredCompilation -Duser.timezone=Europe/Zurich -Dfile.encoding=UTF-8 ========================================================================= Thanks, Dan
Hi! I grant the OpenShift operations team permission to view what you need, the only thing is: do I have to do something? if yes let me know. My action hook was named : pre_start_jbosseap-6.0. Juste to make sure, I've create a copy named pre_start_jbosseap (as yours in your test) and added +x permissions. The content of /tmp/jbosseap.log says: Removing existing standalone.xml ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /var/lib/openshift/513ca5b84382ec2b5a00005f/jbosseap JAVA: /usr/lib/jvm/jre-1.7.0/bin/java JAVA_OPTS: -server -XX:+TieredCompilation -Xmx256m -XX:MaxPermSize=102m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djboss.node.name=fapp-esmart.rhcloud.com -Djgroups.bind_addr=127.5.156.1 -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on ========================================================================= I've changed the test script to be able to see the swiss and default time, on the same page (http://fapp-esmart.rhcloud.com/test.jsp). I've also tried to export java options manually in ssh console and restart the app, but nothing change :
Hi, Raph, With the new version of the cartridges, we no longer use the action hooks with version numbers; i.e., pre_start_jbosseap-6.0 should now be named pre_start_jbosseap. Could you rename your action hooks accordingly, and try again? (I tested the case you described above, and was successful.) Further changes may be necessary. Please review https://www.openshift.com/blogs/version-2-cartridge-update-action-may-be-required Thank you.
Closing as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=972356 *** This bug has been marked as a duplicate of bug 972356 ***