LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 01-04-2011, 01:24 PM   #1
CNBarnes
Member
 
Registered: Apr 2004
Location: Texas
Distribution: Debian
Posts: 41

Rep: Reputation: 15
Question "sudo: Can't mkdir /var/run/sudo/%user%: File exists"


For some reason, my mysql server (debian lenny) has begun having semi-frequent flakiness. I don't think it's MySql itself that is causing the problems - but rather something "system related".

I have looked at all the typical suspects (/var being full, etc), and nothing in any of the log files jumps out at me. But there is 1 thing that might be an indicator: The error message in the subject line.

What is really wierd is that the sudo command DOES work.

Rebooting the machine resolves the problem ... for a while. Which is to say, I do not get the error message every time I use the sudo command.


Last indicator is in /var/log/auth.log - logons (and sudo's) during the period of time of system flakiness show no entries in the auth.log file. Despite the fact that I can indeed logon, su to root, and reboot the computer.
 
Old 01-05-2011, 09:10 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,744
Blog Entries: 54

Rep: Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973
Quote:
Originally Posted by CNBarnes View Post
For some reason, my mysql server (debian lenny) has begun having semi-frequent flakiness.
Since when?
What happened at that time?


Quote:
Originally Posted by CNBarnes View Post
Last indicator is in /var/log/auth.log - logons (and sudo's) during the period of time of system flakiness show no entries in the auth.log file.
If nothing gets logged or written to in /var during that time then what does 'touch /var/tmp/testfile' result in (as unprivileged user, as root)? And running strace on your sudo command?
 
Old 01-05-2011, 10:27 AM   #3
CNBarnes
Member
 
Registered: Apr 2004
Location: Texas
Distribution: Debian
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
Since when?
What happened at that time?
It started roughly 2 weeks ago.. It has been up and runnning for a couple of years now (6 months since last upgrade).


Quote:
If nothing gets logged or written to in /var during that time then what does 'touch /var/tmp/testfile' result in (as unprivileged user, as root)? And running strace on your sudo command?
I'll give that a try next time it happens.
 
Old 01-05-2011, 12:07 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,744
Blog Entries: 54

Rep: Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973
Quote:
Originally Posted by CNBarnes View Post
It started roughly 2 weeks ago..
What happened at that time? Retracing your steps update/installation/re-configuration-wise could help.
 
Old 01-05-2011, 12:32 PM   #5
CNBarnes
Member
 
Registered: Apr 2004
Location: Texas
Distribution: Debian
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
What happened at that time? Retracing your steps update/installation/re-configuration-wise could help.
Nothing. Nobody had even logged into the machine in months (it's a mysql server that sits there and collects data from various websites).
 
Old 01-06-2011, 10:24 AM   #6
CNBarnes
Member
 
Registered: Apr 2004
Location: Texas
Distribution: Debian
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
If nothing gets logged or written to in /var during that time then what does 'touch /var/tmp/testfile' result in (as unprivileged user, as root)? And running strace on your sudo command?

touch: cannot touch `/var/tmp/testfile': Read-only file system

And then this:

vmsql:~# mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)


vmsql:~# ls -alF
total 0

vmsql:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 16T 16T 2.7G 100% /
tmpfs 1015M 0 1015M 0% /lib/init/rw
udev 10M 52K 10M 1% /dev
tmpfs 1015M 0 1015M 0% /dev/shm



Ok, so what would cause /dev/sda1 to mount ro?
 
Old 01-06-2011, 10:36 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,744
Blog Entries: 54

Rep: Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973
Quote:
Originally Posted by CNBarnes View Post
Ok, so what would cause /dev/sda1 to mount ro?
This, the 'tune2fs -e remount-ro' equivalent: '/dev/sda1 on / type ext3 (rw,errors=remount-ro)'. Deploying a server w/o a robust partitioning scheme and w/o monitoring is not such a fab idea.
 
Old 01-10-2011, 05:11 PM   #8
CNBarnes
Member
 
Registered: Apr 2004
Location: Texas
Distribution: Debian
Posts: 41

Original Poster
Rep: Reputation: 15
Just a follow - we finally figured out what was corrupting the sda1 disk.

Answer: VMWare

This server is a VMWare 4.0 virtual machine. The Lenny kernal we were running was *slightly* older (2.6.18). Upgrading to 2.6.26-2-688 seems to have solved the problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
sudo fails - "sudo: can't get hostname: Success" fantasygoat Linux - Server 3 10-01-2009 03:59 PM
Allow user to open raw socket without "sudo" Tomás Ó hÉilidhe Linux - General 1 12-18-2008 02:53 PM
cannot "sudo apt-get uptate" or "sudo" anything! plz help mdguy21061 Linux - Newbie 7 04-14-2008 12:59 AM
"sudo -u user ssh server" fails to connect oudoubah Linux - Security 3 06-21-2007 07:45 AM
normal user want to perform "init 6" by using " sudo acbenny Linux - General 3 08-08-2004 08:41 AM


All times are GMT -5. The time now is 09:34 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration