Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-17-2005, 04:45 PM
|
#1
|
LQ Newbie
Registered: Mar 2005
Posts: 7
Rep:
|
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.
|
|
|
10-18-2005, 12:01 PM
|
#2
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
10-18-2005, 02:16 PM
|
#3
|
LQ Newbie
Registered: Mar 2005
Posts: 7
Original Poster
Rep:
|
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.
|
|
|
01-23-2009, 03:41 PM
|
#4
|
LQ Newbie
Registered: Jan 2006
Posts: 12
Rep:
|
same problem
had exact same problems.
changed permission on the directory where pipe resides in and everything worked fine.
|
|
|
02-06-2009, 05:52 PM
|
#5
|
LQ Newbie
Registered: Jun 2006
Location: Oregon, USA
Distribution: Ubuntu / Fedora
Posts: 14
Rep:
|
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?
Last edited by jcorrea920; 02-06-2009 at 05:53 PM.
Reason: typo
|
|
|
02-10-2009, 05:31 AM
|
#6
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
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 12:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|