2

In the attempt to understand why I keep getting the following error

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' 

while using the command sudo find / -type s the terminal prompted something like this

find: ‘/proc/31348/task/31348/fd/5’: No such file or directory
find: ‘/proc/31348/task/31348/fdinfo/5’: No such file or directory
find: ‘/proc/31348/fd/5’: No such file or directory
find: ‘/proc/31348/fdinfo/5’: No such file or directory

What does this mean?

1

3 Answers 3

3

These errors happen because these files belong to a special filesystem procfs (mounted at /proc). The proc filesystem presents information about processes in a hierarchical file-like structure, so at the moment when find tries to access these special files, they were no longer present.

To ignore these errors, add -xdev for GNU find (or -x for BSD find), e.g.

sudo find / -type s -xdev

-xdev Don't descend directories on other filesystems.

See also: How to exclude the folders proc and sys from search with find command?

0

/proc is a pseudo-filesystem, files under /proc don't actually exist on your hard drive. They contain information on currently running processes. These errors occur because some processes exited while find was running. It's totally normal.

(Actually, if you run find over and over again, and use a command such as ps a | grep find to get the PID of your find command, you'll see the same PID as the ones in the error messages. It's kind of like when you do ps a | grep ps the grep command will be "grapped" too.)

1
  • Should be said more accurately that /proc is virtual filesystem, in the sense that ot does have organization, and it does exist for the duration of the machine running. May 19, 2018 at 23:46
0

find complains because she sees a zombie process with the process id 31348.

My find was complaining for process 4052 whenever I used her,

find: ‘/proc/4052/task/4052/ns/net’: No such file or directory
find: ‘/proc/4052/task/4052/ns/uts’: No such file or directory
find: ‘/proc/4052/task/4052/ns/ipc’: No such file or directory
find: ‘/proc/4052/ns/net’: No such file or directory
find: ‘/proc/4052/ns/uts’: No such file or directory
find: ‘/proc/4052/ns/ipc’: No such file or directory

[root@mylaptop /]# ps -ef | grep 4052
root      4052  4043  0 Jun19 ?        00:00:00 [sh] <defunct>

So,

In my case it was a zombie process that was created a few hours ago (during a Linux operation of mine). The "kill -9 4052" had no effect of course, it was a zombie, and zombies can't be killed. Since it was only one and poor lonely zombie out there I just let it alone, till the next reboot.

: )

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .