LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-19-2013, 08:55 AM   #16
ruffrider
LQ Newbie
 
Registered: Sep 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled

The output is :

fs.file-nr = 1664 0 3265265

Sorry, i did not understand the link you are giving me !!
 
Old 09-19-2013, 09:13 AM   #17
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
this may not work ( since you need root, and too many files may be 'open' already )

Code:
ulimit
sudo lsof -u 0 2>/dev/null | wc -l
what isthe output?
 
Old 09-19-2013, 09:21 AM   #18
ruffrider
LQ Newbie
 
Registered: Sep 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
The output of /sbin/sysctl fs.file-nr as root is :

root@server2 [~]# /sbin/sysctl fs.file-nr
fs.file-nr = 1760 0 3265265



root@server2 [~]# sudo lsof -u 0 2>/dev/null | wc -l
1736


thank you for wanting to help me
 
Old 09-19-2013, 09:29 AM   #19
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
that looks reasonable, but I don't know what loads you have.

can users do "sudo -i" ?

I suspect your max openfiles per user is 4096, root currently has 1736
if you have a number of root shells open, you could end up hitting that 4096 limit, thus the shell won't open ( no resources )


if you experience problems 'more often than not' , then look at

/etc/security/limits.conf
/etc/security/limits.d/

along with
man limits.conf

with a view to raising the limits
 
Old 09-19-2013, 09:33 AM   #20
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
oh,

and I would ask myself why these guys all need root shells
 
Old 09-19-2013, 09:45 AM   #21
ruffrider
LQ Newbie
 
Registered: Sep 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
No, the users can't run sudo -i, but if i run this command, the error message changes, in this case the error message is : enable to execute /bin/bash, not /bin/su
 
Old 09-19-2013, 10:15 AM   #22
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
was that recently, or from before?

what is the output of
Code:
ulimits -a
what kind of services are running?
how many users?

Is this new/sudden? yes ... what changed recently? ... new service / network mount / users


you are hitting some resource limit, need to figure out which
 
Old 09-19-2013, 10:26 AM   #23
ruffrider
LQ Newbie
 
Registered: Sep 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
From before



As user is :

core file size (blocks, -c) 200000
data seg size (kbytes, -d) 200000
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 256637
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) 200000
open files (-n) 100
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 35
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited


As root :

core file size (blocks, -c) 1000000
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 256637
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14335
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
 
Old 09-19-2013, 10:32 AM   #24
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
ok, do you know the UID of the user?

nevermind..
as root
Code:
lsod -u $(id -u <user>) | wc -l
 
Old 09-19-2013, 10:39 AM   #25
ruffrider
LQ Newbie
 
Registered: Sep 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
The output is :

root@mserver2 [~]# lsof -u $(id -u adminet) | wc -l
151


the UID is : 32013


sorry I made you tired .
 
Old 09-19-2013, 10:52 AM   #26
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
ok

go back to

Code:
man limits.conf
see if increasing the "nofile" limits helps

or look at the openfiles, and close some ( if you can )
Code:
lsof -u $(id -u adminet)
 
Old 09-19-2013, 11:09 AM   #27
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Your "max user processes" and "open files" look really really low:

Quote:
Originally Posted by ruffrider View Post
Code:
As user is : 

core file size          (blocks, -c) 200000
data seg size           (kbytes, -d) 200000
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 256637
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) 200000
open files                      (-n) 100
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 35
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
Compare yours above to mine below. I am running a standard install of LinuxMint, what you see below are the defaults:
Code:
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 26940
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 26940
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
And sitting here, running no user processes on my computer other than the Xfce desktop, the Firefox browser I am typing in right now, and a single terminal window, I am already running 46 processes. Even that is above your limit of 35:
Code:
$ ps -ef | grep my_login_id | wc -l
46
I believe your extremely low settings for user open files and max processes is what is killing you. Why do you have these parameters set so low? IMHO, these settings are so low as to be almost unuseable.
 
Old 09-19-2013, 11:16 AM   #28
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
I guess it is a multiuser system , many users logging in remotely


someone spent some time setting the limits up


I guess adminet is a special case, as I don't know why everyone should be able to get root

the limits.conf manpage should help with setting appropriate limits for adminet
 
Old 09-19-2013, 11:36 AM   #29
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by Firerat View Post
someone spent some time setting the limits up
I think they should spend a bit more time reviewing the limits they came up with then.

35 processes is extremely low, even for commandline only users with no GUI, unless those users do basically nothing but sit there and stare at their command prompt. I could live with an open file limit of 100 however, assuming these users are not running production processes, servers, etc.

It is good to set user limits on a production system. It is bad to set those limits unrealistically low.

Anyway, the issue here is not good or bad practice by sysadmins. It is the failure to invoke sudo for this specific userid. No doubt that is because of the low user max process limit, as evidenced by "Resource temporarily unavailable".

O.P. - Get the sysadmin to up your user max process limit and I'll bet that error goes away. Alternately, kill some of the processes you are currently running to make room for more. You will need to kill more than one of your excess processes, because "sudo su -" will try to start up a handful of processes, not just one.
 
Old 09-19-2013, 11:46 AM   #30
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
again, I'm guessing ...

my guess is the server is providing ssh accounts, which often have low limits but suitable for irc and the like.

the questions are

is this new behaviour for adminet?
i.e. were they able to "sudo su -" ( or sudo -i ) in the past or is this a new requirement.

depending on the answer..
what changed?
or..
What do we need to change?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to fix "sudo: unable to execute /bin/ls: Permission denied"? nagendrar Linux - Newbie 12 09-14-2012 06:55 AM
[SOLVED] unable to execute /bin/chmod: Argument list too long veeruk101 Linux - Newbie 2 10-14-2011 06:16 AM
Cant execute file in /bin with sudo kuiper Slackware 5 12-28-2010 06:58 AM
Getting error "sudo: unable to execute ./setup: Success" d_girish_d Linux - Software 3 07-20-2009 11:33 PM
Who can tell me why I am unable to execute bin file under RHEL AS 4? memorinex2005 Red Hat 7 03-10-2005 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration