[Building Sakai] Sakai CLE build java.lang.OutOfMemoryError: PermGen space

Simon McLeish simon.mcleish at gmail.com
Mon Jul 23 04:23:28 PDT 2012


Because I've had file permission errors in tomcat in the (admittedly fairly
distant) past when I've allowed non-root users write access to the webapps
directory.

Like I said, I did actually run "sudo echo $MAVEN_OPTS" and got back the
right answer, even though the appearance is that the actual values then
failed to be picked up. But it's clear that sudo is not an appropriate tool
for this, whether or not compiling as root is.

Cheers,
Simon

On Mon, Jul 23, 2012 at 11:40 AM, Steve Swinsburg <steve.swinsburg at gmail.com
> wrote:

> Why are you building as root? You should build as a normal user that has
> access to write into the Tomcat directory.
>
> Before you build, run 'printenv' (or just 'env') and if you don't see your
> MAVEN_OPTS then you need to fix your environment.
>
> cheers,
> Steve
>
>
> On 23/07/2012, at 8:29 PM, Simon McLeish wrote:
>
> Thanks for that - but fixing the syntax of the values makes no difference
> (I think the missing ms were a typo in my last attempt to change things). I
> updated /etc/bash.bashrc because using export from the command line doesn't
> work for sudo (as sudo deletes most of the environment variables, even if
> you do "sudo export a=b; command").
>
> But I did some further testing, and it looks as though it's just not
> possible to get sudo to pick up the values correctly even when they're part
> of the system-wide bash startup. What I appear to need to do is to copy the
> source directory to ~root, and compile as root. It runs at between 80 and
> 95% memory capacity (so up to about 975 Mb used) and seemed to be running
> fine at that level, but then the virtual server went down during the final
> tests - so I'll need to try again later.
>
> Thanks,
> Simon
>
> On Mon, Jul 23, 2012 at 10:54 AM, Matthew Buckett <
> matthew.buckett at oucs.ox.ac.uk> wrote:
>
>> On 23 July 2012 09:45, Simon McLeish <simon.mcleish at gmail.com> wrote:
>> > Hi all,
>> >
>> > I'm currently trying to get my first source code build of Sakai
>> working, and
>> > am getting memory errors despite setting MAVEN_OPTS to "-Xms1024
>> -Xmx1024
>> > -XX:PermSize=1024m -XX:MaxPermSize=1024m" - larger values than suggested
>>
>> Your -Xms value is wrong (missing the unit value, "m") and normally
>> maven will blowup if you try to run it with incorrect Java opts:
>>
>> Error occurred during initialization of VM
>> Incompatible minimum and maximum heap sizes specified
>>
>> So I don't think you are setting your MAVEN_OPTS correctly, you need
>> to export them with:
>>
>> export MAVEN_OPTS='-Xms128m -Xmx796m -XX:PermSize=64m
>> -XX:MaxPermSize=172m'
>>
>> I normally put this in my shell startup script.
>>
>> Looking at the wiki page:
>>
>>
>> https://confluence.sakaiproject.org/display/BOOT/Development+Environment+Setup+Walkthrough
>>
>> it seems this page is missing the export. Can someone fix this please
>> (I can't edit the page).
>>
>> --
>>   Matthew Buckett
>>   VLE Developer, LTG, Oxford University Computing Services
>>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120723/d9c3ff33/attachment.html 


More information about the sakai-dev mailing list