LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 04-25-2013, 08:48 AM   #1
deathsfriend99
Member
 
Registered: Nov 2007
Distribution: CentOS 6
Posts: 184

Rep: Reputation: 22
NFS same filehandle in Logwatch


I get tons of these messages in my logwatch. I understand that they are just warnings and it works, but I'd like to either fix it or figure out how to weed them out of logwatch:

--------------------- Mountd Begin ------------------------
**Unmatched Entries**
/server/users and /server have same filehandle for 999.99.4.10, using first

Here is my exports:
Code:
/server         @astro1(rw,sync,root_squash,fsid=0) @astro2(rw,sync,root_squash,fsid=0) 999.99.144.35(rw,sync,root_squash) 999.99.4.10(rw,sync,root_squash,fsid=0) 999.99.149.0/25(rw,sync,root_squash,fsid=0)
/server/disk1   @astro1(rw,sync,root_squash) @astro2(rw,sync,root_squash) 999.99.144.35(rw,sync,root_squash) 999.99.4.10(rw,sync,root_squash,fsid=0) 
/server/disk2   @astro1(rw,sync,root_squash) @astro2(rw,sync,root_squash) 999.99.144.35(rw,sync,root_squash) 999.99.4.10(rw,sync,root_squash) 
/server/disk3   @astro1(rw,sync,root_squash) @astro2(rw,sync,root_squash) 999.99.144.35(rw,sync,root_squash) 999.99.4.10(rw,sync,root_squash) 
/server/disk4   @astro1(rw,sync,root_squash) @astro2(rw,sync,root_squash) 999.99.144.35(rw,sync,root_squash) 999.99.4.10(rw,sync,root_squash) 
/server/disk5   @astro1(rw,sync,root_squash) @astro2(rw,sync,root_squash) 999.99.144.35(rw,sync,root_squash) 999.99.4.10(rw,sync,root_squash) 
/usr/local      @astro1(rw,sync,root_squash) @astro2(rw,sync,root_squash) 999.99.144.35(rw,sync,root_squash) 999.99.4.10(rw,sync,root_squash) 31.96.149.0/25(rw,sync,root_squash,fsid=0)
 
Old 04-25-2013, 03:13 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,458
Blog Entries: 54

Rep: Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897
Quote:
Originally Posted by deathsfriend99 View Post
Code:
/server/users and /server have same filehandle for 999.99.4.10, using first
In (/usr/share/?) logwatch/scripts/services/mountd something like:
Code:
while (defined($ThisLine = <STDIN>)) {
   if ( ($ThisLine =~ /^Unauthorized access by NFS client .*$/ ) or
         ($ThisLine =~ /^NFS client [^ ]+ tried to access .*$/ ) or
         ($ThisLine =~ /^[^ ]* exported to both [0-9.]*\/[0-5]* and [0-9.]*\/[0-9]/) ) or 
         ($ThisLine =~ /^[^ ]* same filehandle for .*$/ )  {
      # don't care about this, as the next line reports the IP again
   }
?
 
Old 05-01-2013, 08:44 AM   #3
deathsfriend99
Member
 
Registered: Nov 2007
Distribution: CentOS 6
Posts: 184

Original Poster
Rep: Reputation: 22
Trying to get the syntax right, but not having much luck.

Tried this:
Code:
while (defined($ThisLine = <STDIN>)) {
   if ( ($ThisLine =~ /^Unauthorized access by NFS client .*$/ ) or
         ($ThisLine =~ /^NFS client [^ ]+ tried to access .*$/ ) or
         ($ThisLine =~ /^[^ ]* exported to both [0-9.]*\/[0-5]* and [0-9.]*\/[0-9]/) ) or
         ($ThisLine =~ /^[^ ]* same filehandle for .*$/ )  {
      # don't care about this, as the next line reports the IP again
   }
Logwatch gives:
Code:
--------------------- Mountd Begin ------------------------ 

 syntax error at /usr/share/logwatch/scripts/services/mountd line 27, near ") or"
 syntax error at /usr/share/logwatch/scripts/services/mountd line 36, near "}"
 Execution of /usr/share/logwatch/scripts/services/mountd aborted due to compilation errors.
 
 ---------------------- Mountd End -------------------------
I see some of the close () may have been off, so I tried this:
Code:
while (defined($ThisLine = <STDIN>)) {
   if ( ($ThisLine =~ /^Unauthorized access by NFS client .*$/ ) or
        ($ThisLine =~ /^NFS client [^ ]+ tried to access .*$/ ) or
        ($ThisLine =~ /^[^ ]* same filehandle for .*$/ ) ){
      # don't care about this, as the next line reports the IP again
   }
No errors, but didn't remove the original message from the logwatch reports.
 
  


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
Trying to get Understanding on filehandle and split function in Perl jmc1987 Programming 13 11-29-2011 09:34 PM
Having a lot of trouble getting FILEHANDLE working.. Please help. GuerillaSquad Programming 4 12-31-2009 11:47 AM
I want to disable logwatch on our RHEL servers to stop the logwatch mail svik Linux - Enterprise 10 08-27-2009 02:51 PM
Does logwatch run automatically? How can I reset logwatch? abefroman Linux - Software 4 06-17-2009 02:17 AM
Perl filehandle problems DanTaylor Programming 8 01-27-2006 04:57 PM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
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