1753297 Members
6616 Online
108792 Solutions
New Discussion

rm Broken Pipe

 
SOLVED
Go to solution
gstonian
Trusted Contributor

rm Broken Pipe

I'm trying to start mysql but as it didn't come down cleanly it's not restarting with the following error

 

mysqld daemon not started

rm: file.pid not removed.  Broken pipe

Fatal error: Can't remove the pid file: file.pid

Please remove it manually and start ./bin/mysqld_safe again

 

I can't manually remove it either - any ideas ? 

 

rm -rf file.pid

rm: file.pid not removed.  Broken pipe

 

Points awarded if they are still valid in this new community :) 

2 REPLIES 2
Dennis Handly
Acclaimed Contributor
Solution

Re: rm Broken Pipe

>I'm trying to start mysql but as it didn't come down cleanly it's not restarting with the following error
>rm: file.pid not removed.  Broken pipe

 

Is this a named pipe?  If so, you need to find out who has it open.  You need to kill mysql.

Anything in the pipe, it probably has the PID to kill?


>I can't manually remove it either - any ideas?

 

Plenty:

1) Use lsof to find out who has it opened and kill it.

2) Reboot.

3) mv the pipe to another name.

4) Use /sbin/unlink to wave bye-bye to the file.


>Points awarded if they are still valid in this new community.

 

They are called kudos.  See the star on each reply.

Matti_Kurkela
Honored Contributor

Re: rm Broken Pipe

What does "ls -l file.pid" say?

 

"Broken pipe" error from a regular rm command with no input or output redirection makes no sense, even if the file to be deleted is a named pipe. Any "broken pipe" error should go to the process owning the pipe, not to the rm command. Something else must be causing the non-sensical error messages.

 

At a guess, what does "ll /dev/null" say?

The correct output on HP-UX should be like:

$ ll /dev/null
crw-rw-rw-   1 bin        bin          3 0x000002 Sep  6 15:50 /dev/null

 

If /dev/null has been removed, or replaced with a regular file, it should be reconstructed like this:

mv /dev/null /dev/null.broken
mknod /dev/null c 3 0x000002
chmod 666 /dev/null
chown bin:bin /dev/null

 

MK