LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   NFS same filehandle in Logwatch (https://www.linuxquestions.org/questions/linux-server-73/nfs-same-filehandle-in-logwatch-4175459559/)

deathsfriend99 04-25-2013 08:48 AM

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)


unSpawn 04-25-2013 03:13 PM

Quote:

Originally Posted by deathsfriend99 (Post 4938652)
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
  }

?

deathsfriend99 05-01-2013 08:44 AM

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.


All times are GMT -5. The time now is 09:21 PM.