Installed and started the CFS port (cfs-1.4.1_5). When /usr/local/etc/rc.d/cfsd tries to mount the cfsd-bootstrap directory over local NFS (in cfsd_poststart()), mount_nfs will hang, causing a log entry every second: Apr 9 17:52:26 feynman kernel: TCP: [127.0.0.1]:616 to [127.0.0.1]:3049 tcpflags 0x2<SYN>; tcp_input: Connection attempt to closed port Attempts to kill mount_nfs failed. The issue was solved by adding the "mntudp" option to the init script so that cfsd_poststart() now does: mount -o port="$cfsd_port",nfsv2,mntudp localhost:/usr/local/cfsd-bootstrap "$cfsd_mountpoint" Fix: Add the "mntudp" option to /usr/local/etc/rc.d/cfsd. However, this needs only to be done on CURRENT systems - if I had a good idea how to integrate this in the port, I'd submit a patch, but making an OSVERSION dependant hack in the Makefile seems a bit dirty. How-To-Repeat: On 8-CURRENT: Install cfsd port, and prepare system as describe in the port's pkg-message. Start cfsd, problem will occur.
Hi, do you have a patch to this?
Responsible Changed From-To: freebsd-ports-bugs->sylvio I'll take it.
State Changed From-To: open->feedback - Waiting feedback of submitter.
Hi, > Hi, do you have a patch to this? No. As suggested in my "Fix" section, this seems to be release-dependent, and I had no good idea how to build this into the ports framework. Someone with more insight in the ports' Makefile workings might come up with a good idea easily... I hope. Cheers, Thiemo -- Query a PGP key server (e.g. http://www.pgp.net/) for my public key 41068629. Strange sender address? Please see http://www.thiemo.net/misc/list-mail.shtml
Responsible Changed From-To: sylvio->freebsd-ports-bugs back to pool.
State Changed From-To: feedback->open Feedback received.
Hi there, This problem report is still relevant. Please note that the original discussion missed a few points. First of all, the suggested fix is not quite correct. The mount option needed here is spelled "udp" not "mntudp", the difference being that "mntudp" is to force _mount_ protocol to UDP transport and it does so to NFS protocol, too, only as a side effect in more recent mount_nfs revisions. Cfsd is an old NFS daemon and it has no support for TCP transport soever. Hence the error: [tcp] localhost:/usr/local/cfsd-bootstrap: nfsd: RPCPROG_NFS: RPC: Remote system error - Connection refused [tcp6] localhost:/usr/local/cfsd-bootstrap: nfsd: RPCPROG_NFS: RPC: Remote system error - Connection refused The fix indeed is FreeBSD version specific. Unfortunately, historic mount_nfs revisions had no "udp" option because it was default. The workaround can be to use %%FOO%% magic to insert the udp option in cfsd.sh.in if the OS version is 8.x or newer. The resulting mount_nfs opts need to look like this (in any order): udp,port="$cfsd_port",nfsv2 Thanks, Yar
FWIW, there is a simple workaround to this issue. Just set cfsd_port in rc.conf as follows: cfsd_port="3049,udp" This argument will be passed to cfsd as well as to mount_nfs, but cfsd doesn't seem to care about the `,udp' trailer. Cfsd expects a port number as its only argument but it doesn't seem to check if the argument is entirely numeric -- a bug very common to older code using atoi() or strtol(foo, NULL, ...). Yar
Responsible Changed From-To: freebsd-ports-bugs->crees I'll take it.
crees 2011-08-17 10:52:12 UTC FreeBSD ports repository Modified files: security/cfs Makefile security/cfs/files cfsd.sh.in Log: Fix rc script to stop nfs hangs PR: ports/133563 Submitted by: Thiemo Nordenholz <list@thiemo.net>, yar Revision Changes Path 1.27 +1 -1 ports/security/cfs/Makefile 1.3 +5 -3 ports/security/cfs/files/cfsd.sh.in _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed. Thanks!