From owner-freebsd-questions Sat Oct 28 8:30:32 2000 Delivered-To: freebsd-questions@freebsd.org Received: from alex.intersurf.net (alex.intersurf.net [216.115.129.11]) by hub.freebsd.org (Postfix) with SMTP id 3919B37B4C5 for ; Sat, 28 Oct 2000 08:30:28 -0700 (PDT) Received: (qmail 93028 invoked from network); 28 Oct 2000 10:30:25 -0500 Received: from mdm-142-3.dialup.intersurf.com (HELO win2k) (216.115.142.3) by alex.intersurf.net with SMTP; 28 Oct 2000 10:30:25 -0500 Message-ID: <001f01c040f3$f1e2b110$0101a8c0@win2k> From: "Jeremy Falcon" To: Cc: References: <004a01c03f48$7b9c7420$0101a8c0@win2k> <20001026234827.B75251@149.211.6.64.reflexcom.com> <007301c0400d$508219f0$0101a8c0@win2k> <20001027132234.A42242@149.211.6.64.reflexcom.com> <013a01c040af$badd1780$0101a8c0@win2k> <20001028004432.G75251@149.211.6.64.reflexcom.com> Subject: Re: problem starting ftpd Date: Sat, 28 Oct 2000 10:30:03 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I can ftp and telnet to 127.0.0.1. Go figure. Jeremy Falcon ----- Original Message ----- From: "Crist J . Clark" To: "Jeremy Falcon" Sent: Saturday, October 28, 2000 2:44 AM Subject: Re: problem starting ftpd > On Sat, Oct 28, 2000 at 02:21:44AM -0500, Jeremy Falcon wrote: > > [snip] > > > > First, what are you trying to do? If you want to run an independent > > > ftpd daemon, you have to disable ftpd in inetd.conf. Only one program, > > > either an ftpd daemon or inetd, can be listening on port 21 at a time. > > > > I'm trying to get ftpd to run via inetd; no daemon. With no ftpd running > > (ps -aux | grep ftpd returns nothing) I still get... > > > > # /usr/libexec/ftpd > > Oct 28 01:21:16 gateway ftpd[276]: getpeername (/usr/libexec/ftpd): Socket > > operation on non-socket > > If you run ftpd(8) from the command line with no '-D' that is the > error you will get. ftpd by default expects to be run from > inetd(8). It expects to get the connection handed off to it by inetd > rather than listening on 21. The fact this does not occur has this odd > failure mode. > > If you want to run ftpd from inetd, it is enabled by default, with a > line like, > > ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l > > In inetd.conf(5). > > > I know from my sockets programming experience (primarily Winsock, but it's > > based on BSD Sockets) that getpeername() is used to query the remote > > socket's name on a connected socket (something you need to communicate). > > So, my question is why is their no socket connection being created? Like > > you said, maybe it has to do with the ports not being available after all? > > I wonder if the port not actually beng available will stop a socket from > > being named -- I'll have to look that one up. > > Well, I have not looked at the source recently, but here is my guess. > When run from inetd, inetd passes the connected socket as stdin to > ftpd. When you run ftpd from the command line, the stdin is not a > socket, thus the error. > > > FYI, I really appreciate your assistance and look forward to a response. > > I am not sure why telnet or ftp is not working properly from > inetd. What happens if you get on the machine and, > > $ telnet 127.0.0.0 > > Or, > > $ ftp 127.0.0.1 > > If that works the problem is not likely with inetd. > -- > Crist J. Clark cjclark@alum.mit.edu > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message