LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   syslog not opening named pipe. (https://www.linuxquestions.org/questions/linux-software-2/syslog-not-opening-named-pipe-374055/)

fluxrad 10-17-2005 04:45 PM

syslog not opening named pipe.
 
I appear to have a problem with syslog not opening a named pipe. I have several boxes all with the exact same configuration. Most of them work, however three systems do not. In syslog, I have local1.info going to a named pipe. i.e.:

$mkfifo /usr/local/foo

/etc/syslog.conf contains:

local1.info |/usr/local/foo

I then have some code that's logging to syslog and some code that opens /usr/local/foo and reads from it. have verified that everything works as it should...except syslog.

I've check perms, the script that writes to syslog, tested other named pipes without syslog, and hupped syslogd more times than I can count all to no avail. I've also looked in /proc/<pid of syslog>/fd - /usr/local/foo never gets opened. Does anyone have any ideas what I might be missing?

Is there maybe some weird blocking issue I'm running into that I don't know about?

Thanks.

MensaWater 10-18-2005 12:01 PM

Haven't really played with syslog.conf but something you wrote looks incorrect to me:

You say you've put in:

local1.info |/usr/local/foo

Which I read as:

loca1.info pipe into named pipe /usr/local/foo

Or in other words you're doing TWO pipes.

The "|" is for command line piping from one process to another.

Since you've created a named pipe (a/k/a a fifo) called "/usr/local/foo" you should be redirecting into it not doing another pipe.

That is I would think if there's any validity in this you would want to do:

local1.info >/usr/local/foo

I can't confirm the above should work in syslog.conf but feel fairly confident that the | into foo wouldn't be correct due to the double pipe.

fluxrad 10-18-2005 02:16 PM

I had tried it several other ways, but the pipe (i.e. |/path/to/named/pipe) is actually the method that the syslog manpage specifies.

Incidentally, I have this same exact setup on two other systems and it works perfectly. Methinks this is a blocking problem but I can't get anywhere beyond that.

bugmenot 01-23-2009 03:41 PM

same problem
 
had exact same problems.
changed permission on the directory where pipe resides in and everything worked fine.

jcorrea920 02-06-2009 05:52 PM

Permissions
 
What did you change permissions to? I have a fifo file housed in /var/log directory which has a default permissions set to 755. Own by root. What settings do you suggest?

reddazz 02-10-2009 05:31 AM

This is really an old thread that shouldn't really have been resurrected, so please start a new thread.


All times are GMT -5. The time now is 07:34 PM.