cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Environment Variables

odomok
Champ in-the-making
Champ in-the-making
I have been having problems installing Alfresco 2.9 on Ubuntu Hardy,  I kept getting Java Heap space errors in the log.  I have followed the two guides to installation http://wiki.alfresco.com/wiki/Installing_Alfresco_on_Ubuntu_7.10 to no avail.  Finally I investigated which JAVA_OPTS were being used by adding 
echo "Using JAVA_OPTS: $JAVA_OPTS"
To the catalina.sh file.  This told me that the JAVA_OPTS settings in the alfresco init script (export JAVA_OPTS="-Xms256m -Xmx1024m -server -Djava.io.tmpdir=/var/lib/alfresco/tmp") were not being passed to catalina.sh.

I have been starting alfresco using /etc/init.d/alfresco start, and I am logged in as root for this purpose.

I fixed the problem by putting the JAVA_OPTS settings in startup.sh, from where they correctly get passed to catalina.sh and everything works as it should.  My question is what am I missing here?  Why do my settings not get passed from the alfresco init script?
1 REPLY 1

odomok
Champ in-the-making
Champ in-the-making
I don't know enough about Linux and how to configure the sudo command to solve this 'the right way' so I would be grateful for any pointers to the correct settings.  I found on investigation that the reason my environment variables were not being passed was the default  env_reset option in the /etc/sudoers file.  I am using a clean install of Hardy for this exercise, so I would have imagined that this problem would exist for everyone else following the wiki.  The only difference being my use of root in testing the installation.

I have altered my /etc/sudoers file so that the env_reset option is now !env_reset, and this solves the problem, but probably leaves a bigger security hole than I need.   Any guidance on how to solve this correctly will be much appreciated!