<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: NFS File locking does not work correct. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054106#M575072</link>
    <description>Hi Roland,&lt;BR /&gt;&lt;BR /&gt; Correction in my first paragraph, NFS server not NAME server.&lt;BR /&gt;&lt;BR /&gt;Hi Roland, &lt;BR /&gt;&lt;BR /&gt;99 % of the time locking fails due to name resolution issues. The NFS SERVER either can not resolve the hostname of the client, it has a bogus record for that client ( or other clients ) in its sm or sm.bak directory or there is a issue w/ shortname vs. FQDN names being resovled.</description>
    <pubDate>Wed, 27 Aug 2003 11:17:17 GMT</pubDate>
    <dc:creator>Todd Whitcher</dc:creator>
    <dc:date>2003-08-27T11:17:17Z</dc:date>
    <item>
      <title>NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054096#M575062</link>
      <description>Hi Forumers,&lt;BR /&gt;&lt;BR /&gt;I have several HP-UX 11.11 WS. All have the same configurationm (same patch revision).&lt;BR /&gt;I test the file locking with a perl script. On some systems it works on some not. Does not know why. If I lock a local file it works. If I try to do it over a nfs mount it fails.&lt;BR /&gt;On one system I have installed the newest nfs patches. It fails again.&lt;BR /&gt;If I look in the nfsstats (nfsstat -c) I see that the badcalls and badixds is increasing (Connectionless oriented = udp).&lt;BR /&gt;&lt;BR /&gt;Where could be the problem? Need help - I'm frustrated !!!&lt;BR /&gt;&lt;BR /&gt;Roland&lt;BR /&gt;PS: Have to go now will be back tomorrow</description>
      <pubDate>Thu, 21 Aug 2003 15:02:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054096#M575062</guid>
      <dc:creator>RolandH</dc:creator>
      <dc:date>2003-08-21T15:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054097#M575063</link>
      <description>Hi Roland,&lt;BR /&gt;check if on the problematic server rpc.lock is properly working and restart it if in doubt.&lt;BR /&gt;&lt;BR /&gt;I had some issue when cluster software was installed, because we needed the patest patch to have it proper working.&lt;BR /&gt;&lt;BR /&gt;  Massimo</description>
      <pubDate>Thu, 21 Aug 2003 15:29:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054097#M575063</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-21T15:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054098#M575064</link>
      <description>First, you should de a man perlfunc and examine the flock section. It specifically tells you that some versions of flock cannot lock things over the network. You can use Perl's fcntl function for more robust locking. &lt;BR /&gt;&lt;BR /&gt;Next, make sure that lockd and statd are running on the boxes in question.&lt;BR /&gt;&lt;BR /&gt;Finally, examine my 2 minute Perl script that does work under Perl 5.6.1 on (and across NFS) on HP-UX 10.20, 11.0, and 11.11 using flock().&lt;BR /&gt;Mine works without changes even across NFS mounts because I'm using an automounted home directory but you can simply change the filename if using hard NFS mounts. Note that for locking to work you must play by the rules and make sure that the file is opened for&lt;BR /&gt;writing (or update) even if you are only reading from the file. That's the reason for my opening the file with '+&amp;lt;' eventhough I am simply reading from the file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Aug 2003 17:25:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054098#M575064</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-08-21T17:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054099#M575065</link>
      <description>To Massimo:&lt;BR /&gt;&lt;BR /&gt;I'm not in doubt that rpc.lock daemon is running. As I said before: Same systems with same patch revision. One work, one not.&lt;BR /&gt;I've checked this. Can I debug the rpc.lock daemon?&lt;BR /&gt;&lt;BR /&gt;To Clay:&lt;BR /&gt;See my Perl script. I think I have made everythink fine and I use fcntl.&lt;BR /&gt;But I use this only for testing, because the main application is a binary and this binary locks a file. If the perl script works the application can start (means nfs locking is functional).&lt;BR /&gt;&lt;BR /&gt;Thanx Guys! Any other ideas!!!&lt;BR /&gt;(Slowly, I think it could be a network thing)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Roland</description>
      <pubDate>Fri, 22 Aug 2003 06:32:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054099#M575065</guid>
      <dc:creator>RolandH</dc:creator>
      <dc:date>2003-08-22T06:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054100#M575066</link>
      <description>To Massimo:&lt;BR /&gt;&lt;BR /&gt;What patch have you installed?&lt;BR /&gt;&lt;BR /&gt;Roland</description>
      <pubDate>Fri, 22 Aug 2003 06:53:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054100#M575066</guid>
      <dc:creator>RolandH</dc:creator>
      <dc:date>2003-08-22T06:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054101#M575067</link>
      <description>Hi,&lt;BR /&gt;to enalbe error logging:&lt;BR /&gt;&lt;BR /&gt; lockd recognizes the following options and command-line arguments:&lt;BR /&gt;&lt;BR /&gt;           -l log_file         Log any errors to the named log file&lt;BR /&gt;                               log_file.  Errors are not logged if the -l&lt;BR /&gt;                               option is not specified.&lt;BR /&gt;&lt;BR /&gt;                               Information logged to the file includes date&lt;BR /&gt;                               and time of the error, host name, process ID&lt;BR /&gt;                               and name of the function generating the&lt;BR /&gt;                               error, and the error message.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"quote from man rpc.lockd"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for the patch: we had to install the ONC/NFS patch, latest is &lt;BR /&gt;&lt;BR /&gt;PHNE_28567&lt;BR /&gt;&lt;BR /&gt;and requires a reboot.&lt;BR /&gt;&lt;BR /&gt;  Massimo&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Aug 2003 07:24:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054101#M575067</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-22T07:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054102#M575068</link>
      <description>Have had installed the patch. No change !! The problem is still there. &lt;BR /&gt;The log of the rpc.lockd shows no errors. ???&lt;BR /&gt;&lt;BR /&gt;Any other ideas !!&lt;BR /&gt;&lt;BR /&gt;Roland</description>
      <pubDate>Wed, 27 Aug 2003 10:50:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054102#M575068</guid>
      <dc:creator>RolandH</dc:creator>
      <dc:date>2003-08-27T10:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054103#M575069</link>
      <description>How are the nfs mount done ?&lt;BR /&gt;&lt;BR /&gt;via mount_nfs or via automounter ?&lt;BR /&gt;&lt;BR /&gt;in the latter: automountd (V2) or autofs (V3)?&lt;BR /&gt;&lt;BR /&gt;   Massimo&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 10:55:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054103#M575069</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-27T10:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054104#M575070</link>
      <description>autofs(V3) !!!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 11:07:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054104#M575070</guid>
      <dc:creator>RolandH</dc:creator>
      <dc:date>2003-08-27T11:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054105#M575071</link>
      <description>Hi Roland,&lt;BR /&gt;&lt;BR /&gt; 99 % of the time locking fails due to name resolution issues. The name server either can not resolve the hostname of the client, it has a bogus record for that client ( or other clients ) in its sm or sm.bak directory or there is a issue w/ shortname vs. FQDN names being resovled. &lt;BR /&gt;&lt;BR /&gt;Attached is a file locking program you can use to test outside of your application.&lt;BR /&gt;&lt;BR /&gt;cc -o locktest locktest.c&lt;BR /&gt;&lt;BR /&gt;Then &lt;BR /&gt;&lt;BR /&gt;./locktest /nfs_mount/file_name&lt;BR /&gt;Open OK&lt;BR /&gt;Locking...OK&lt;BR /&gt;&lt;BR /&gt;If you do not see the "OK" after The "Locking..." then you have&lt;BR /&gt; * a file locking problem. The typical symptom would be that the program&lt;BR /&gt; * will not complete, but will just hang afetr the "Locking...".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So now what:&lt;BR /&gt;&lt;BR /&gt;An easy step to test clear up bad host records is this:&lt;BR /&gt;&lt;BR /&gt;On the NFS server and the NFS client:&lt;BR /&gt;1. &lt;BR /&gt;kill rpc.statd then kill rpc.lockd on both systems.&lt;BR /&gt;&lt;BR /&gt;2. Remove the /var/statmon/sm and /var/statmon/sm.bak directories&lt;BR /&gt;&lt;BR /&gt;3. Restart rpc.statd. and rpc.lockd ( statd is always started first ) on both systems&lt;BR /&gt;&lt;BR /&gt;/usr/sbin/rpc.statd&lt;BR /&gt;/usr/sbin/rpc.lockd&lt;BR /&gt;&lt;BR /&gt;( wait 60 seconds for the rpc.lockd grace period )&lt;BR /&gt;&lt;BR /&gt;Test the locks using the locktest program.&lt;BR /&gt;&lt;BR /&gt;If the locks fail, get a network trace along with lockd / statd debug on the NFS SERVER and the NFS CLIENT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Nettl commands:&lt;BR /&gt;nettl -tn 0x32800000 -e ns_ls_ip -s 512 -tm 900000 -f lcktrc&lt;BR /&gt;&lt;BR /&gt;Then send rpc.statd and rpc.lockd the SIGUSR2 signal to toggle debug on.&lt;BR /&gt;&lt;BR /&gt;Kill -17 pid_of_rpc.statd &lt;BR /&gt;kill -17 pid_of_rpc.lockd&lt;BR /&gt;&lt;BR /&gt;( debug goes to /var/adm/rpc.statd.log rpc.lockd.log )&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You can view the nettl traces with netfmt or view them with ethereal ( &lt;A href="http://www.ethereal.com" target="_blank"&gt;www.ethereal.com&lt;/A&gt; )&lt;BR /&gt;Ethereal is more user friendly.&lt;BR /&gt;&lt;BR /&gt;For netfmt do this:&lt;BR /&gt;&lt;BR /&gt;Create a filter file with the IP of the remote system in it ( on nfs server, put the nfs client and visa versa )&lt;BR /&gt;&lt;BR /&gt;$ cat filter&lt;BR /&gt;filter ip_saddr ip_of_remote&lt;BR /&gt;filter ip_daddr ip_of_remote&lt;BR /&gt;&lt;BR /&gt;format with netfmt&lt;BR /&gt;&lt;BR /&gt;$ netfmt -Nnlf lcktrc.TRCXXX -c filter &amp;gt; lcktrc.out &lt;BR /&gt;&lt;BR /&gt;You can vi the lcktrc.out file. &lt;BR /&gt;&lt;BR /&gt;If you still have issues, I'd suggest logging a case via the Response Center. &lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;&lt;BR /&gt;Todd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 11:13:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054105#M575071</guid>
      <dc:creator>Todd Whitcher</dc:creator>
      <dc:date>2003-08-27T11:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054106#M575072</link>
      <description>Hi Roland,&lt;BR /&gt;&lt;BR /&gt; Correction in my first paragraph, NFS server not NAME server.&lt;BR /&gt;&lt;BR /&gt;Hi Roland, &lt;BR /&gt;&lt;BR /&gt;99 % of the time locking fails due to name resolution issues. The NFS SERVER either can not resolve the hostname of the client, it has a bogus record for that client ( or other clients ) in its sm or sm.bak directory or there is a issue w/ shortname vs. FQDN names being resovled.</description>
      <pubDate>Wed, 27 Aug 2003 11:17:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054106#M575072</guid>
      <dc:creator>Todd Whitcher</dc:creator>
      <dc:date>2003-08-27T11:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054107#M575073</link>
      <description>Hi Todd,&lt;BR /&gt;&lt;BR /&gt;thanx for your reply.&lt;BR /&gt;We see a light at the end of the tunnel.&lt;BR /&gt;Sadly, the server is not in our responsibilty but the server team has a maintanance time at the weekend and they will do remove the /var/statmon/sm* dirs then and reboot the system. So we will be smarter at monday.&lt;BR /&gt;&lt;BR /&gt;I will give you points, if we are sure that is solving the problem.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;  Roland</description>
      <pubDate>Wed, 27 Aug 2003 12:32:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054107#M575073</guid>
      <dc:creator>RolandH</dc:creator>
      <dc:date>2003-08-27T12:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054108#M575074</link>
      <description>Hi Roland,&lt;BR /&gt;&lt;BR /&gt; Also, verify name resolution for those clients is working as you expect. Be sure to do forward and reverse lookup checks w/ nslookup.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 12:39:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054108#M575074</guid>
      <dc:creator>Todd Whitcher</dc:creator>
      <dc:date>2003-08-27T12:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054109#M575075</link>
      <description>Hi Todd,&lt;BR /&gt;&lt;BR /&gt;maintanace was a little bit earlier as expected.&lt;BR /&gt;&lt;BR /&gt;Thanx a lot for your reply. It was a name resolution issue on the remote site. They have had wrong entries there. !!!! Damn !!!!&lt;BR /&gt;&lt;BR /&gt;But a small note to your c programm. You have forgotten the unlocking function =:-}.&lt;BR /&gt;&lt;BR /&gt;Have a nice day&lt;BR /&gt; and 10 points for ***YOUR MAGIC ANSWER***&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Roland</description>
      <pubDate>Thu, 28 Aug 2003 06:58:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054109#M575075</guid>
      <dc:creator>RolandH</dc:creator>
      <dc:date>2003-08-28T06:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: NFS File locking does not work correct.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054110#M575076</link>
      <description>Good News,&lt;BR /&gt;&lt;BR /&gt; We have a few of those locking programs around, I think that one just hangs if it can't get a lock.  &lt;BR /&gt;&lt;BR /&gt;Todd</description>
      <pubDate>Thu, 28 Aug 2003 10:43:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nfs-file-locking-does-not-work-correct/m-p/3054110#M575076</guid>
      <dc:creator>Todd Whitcher</dc:creator>
      <dc:date>2003-08-28T10:43:02Z</dc:date>
    </item>
  </channel>
</rss>

