0

On Openshift, using the Tomcat 7(jbossews) cartridge, I am trying to set JAVA_OPTS_EXT, following the advice given in this thread: Not able to set options in JAVA_OPTS in JBoss openshift My cartridge name is jbossews, and my pre_start script is named pre_start_jbossews. My script does not appear to be running. I've checked this by including an echo command - the echo message does not appear in the log. I have set the execute bit, and I used the standard procedure to deploy the script, using git. (and I have checked that it was installed on the server).

pre_start_jbossews:

echo "executing pre_start"
export JAVA_OPTS_EXT=" -Duser.timezone=Australia/Sydney "

Thanks in advance.

Community
  • 1
  • 1
GregS
  • 147
  • 6
  • checklist: 1. is the pre_start_jbossews in ~/app-root/repo/.openshift/action_hooks folder? 2. does it still have the exec flag on the server? 3. by "the log", do you mean the 'gear deploy' cmd output? – ptrk Dec 20 '14 at 00:20
  • Thanks ptrk. RE 1. and 2. - yes. RE 3. - I am referring to ~/app-root/logs/jbossews.log - should the echo show up in that log? – GregS Dec 20 '14 at 04:32
  • I added a long sleep into the script, and it worked, so the script IS being executed afterall. My apologies - I'm a raw beginner. I'll now have to figure out why the timezone setting isn't having the desired effect. Note also that in the output of the rhc start jbossews command from my client machine, I can see the line "executing pre_start" - I hadn't noticed that before. – GregS Dec 20 '14 at 04:59

1 Answers1

0

Just to close this - I was incorrect - pre_start was in fact executing.

GregS
  • 147
  • 6