Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1929817F07 for ; Tue, 17 Mar 2015 20:28:45 +0000 (UTC) Received: (qmail 56058 invoked by uid 500); 17 Mar 2015 20:28:45 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 55989 invoked by uid 500); 17 Mar 2015 20:28:44 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 55698 invoked by uid 99); 17 Mar 2015 20:28:44 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2015 20:28:44 +0000 Date: Tue, 17 Mar 2015 20:28:44 +0000 (UTC) From: "Jayush Luniya (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-9227) ambari-server startup with non-root user causes a ulimit error Operation not permitted. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-9227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14366013#comment-14366013 ] Jayush Luniya commented on AMBARI-9227: --------------------------------------- Moving to 2.1.0 > ambari-server startup with non-root user causes a ulimit error Operation not permitted. > --------------------------------------------------------------------------------------- > > Key: AMBARI-9227 > URL: https://issues.apache.org/jira/browse/AMBARI-9227 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Reporter: jun aoki > Priority: Minor > Fix For: 2.1.0 > > > When you are starting ambari-server with non-root users (you can set so during amari-server setup (1)), it attempts to modify ulimit -n (the max open files to ) 10000 by default, you get a permission error. (2) > Bad thing is the server process is started "successfully" without actually effecting the max number of open file descriptor. (some non user friendly error is shown though) > Our customers tend to run applications with an non-root user so we'd like to clean up here a bit. > The challenge is, ulimit is a bash command like 'cd', and only root can execute. See (3) to find ulimit behavior. > My possible solution is > 1. if root user, do the current behavior > 2. if non-root, then the startup checks ulimit -a and if the current max number meets the requirement, if it does not meet, the server startup halts. End users have to fix through limits.conf. > Let me know if this works. > (1) setup to customize ambari daemon user > {code} > bash-4.1# ambari-server setup > Using python /usr/bin/python2.6 > Setup ambari-server > Checking SELinux... > SELinux status is 'disabled' > Customize user account for ambari-server daemon [y/n] (n)? y > Enter user account for ambari-server daemon (root):pivotal > {code} > (2) permission error > {code} > bash-4.1# ambari-server start > Using python /usr/bin/python2.6 > Starting ambari-server > Ambari Server running with 'root' privileges. > Organizing resource files at /var/lib/ambari-server/resources... > Server PID at: /var/run/ambari-server/ambari-server.pid > Server out at: /var/log/ambari-server/ambari-server.out > Server log at: /var/log/ambari-server/ambari-server.log > Waiting for server start....sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted > ................ > Ambari Server 'start' completed successfully. > {code} > (3) > {code} > [root@node1 init.d]# where ulimit > -bash: where: command not found > [root@node1 init.d]# sudo ulimit > sudo: ulimit: command not found > [root@node1 init.d]# ulimit > unlimited > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)