<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hey,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m having an issue where the ulimit for open files isn’t being set properly when I spin up a process for a user during contextualization.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Upon start up of the non-persistent ubuntu 12 image, I am setting limits.conf to what I want and I’m explicitly adding ulimit –n 65536 to the user’s .bashrc. However at the end of my 90_tomcat script when I execute the tomcat process the
ulimit is not being picked up and is set to 1024 instead<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As a test in my 90_tomcat script I’m running ulimit –a >> /tmp/tomcatsu.txt<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">root@host002:/mnt# cat 90_tomcat |grep "su tomcatA"<o:p></o:p></p>
<p class="MsoNormal">su tomcatA -l -c "ulimit -a >> /tmp/tomcatsu.txt"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So this gets run at the end of 90_tomcat:<o:p></o:p></p>
<p class="MsoNormal">su tomcatA -l -c "ulimit -a >> /tmp/tomcatsu.txt"<o:p></o:p></p>
<p class="MsoNormal">su tomcatA -l -c "/var/jakarta-tomcatA/bin/startup.sh"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When I cat the txt file it says 1024:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">root@host002:/etc/pam.d# cat /tmp/tomcatsu.txt |grep open<o:p></o:p></p>
<p class="MsoNormal">open files (-n) 1024<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But when I log in manually as root and run /mnt/90_tomcat by hand I end up getting the proper ulimit:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">root@host002:/etc/pam.d# cat /tmp/tomcatsu.txt |grep open<o:p></o:p></p>
<p class="MsoNormal">open files (-n) 65536<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Not sure what the issue but I’d appreciate any input.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Richard Bettridge<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Systems Engineering Specialist
<br>
BlackBerry </span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
--------------------------------------------------------------------- <br>
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
</body>
</html>