From owner-freebsd-questions Sat Oct 28 0:22:17 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 7C3E537B479 for ; Sat, 28 Oct 2000 00:22:14 -0700 (PDT) Received: (qmail 75524 invoked from network); 28 Oct 2000 02:22:11 -0500 Received: from mdm-142-1.dialup.intersurf.com (HELO win2k) (216.115.142.1) by alex.intersurf.net with SMTP; 28 Oct 2000 02:22:11 -0500 Message-ID: <013a01c040af$badd1780$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> Subject: Re: problem starting ftpd Date: Sat, 28 Oct 2000 02:21:44 -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 > > Thanks for the reply. > > > > Using ftpd -lD produces the following message... > > > > Oct 27 06:05:20 gateway ftpd[238]: control bind: Address already in use > > Do you have ftpd(8) enabled in inetd(8)? Look in inetd.conf(5) to find > out. Disable it and send a HUP to inetd(8) if it is in there. If it is > not enabled, it looks like you already have an ftp daemon running. > > > ...and it doesn't return me to a prompt. After closer examination I can't > > help but wonder if this issue starts with something else besides ftpd and > > inetd. inetd never really hangs. During bootstrap, this is where I have to > > use Control+C (^C)... > > Do you want ftpd to run out of inetd or as its own daemon? Using the > '-D' option is for running it as an independent daemon. I'd prefer using ftpd in inetd because I am not running a busy server and don't need it acting as a daemon hanging around in memory constantly. I tried it both ways, after killing any existance of ftpd and trying ftpd -lD it seems to work (no error message), but I can't FTP from my other box. I can ping, but no telnet and ftp. Just ftpd -l stills gives the getpeername: non-socket error message. > > starting standard daemons: inetd cron sendmail^C sshd usbd. > > Is your DNS working correctly? sendmail does some DNS lookups when it > starts up. If you did not ctrl-C, it would likely timeout after a bit > and the process would continue on its own. I haven't set up anything on this machine yet. I repartitioned the HDD, created new slices and started completely anew. After the install was finished, it prompted me to reboot and that is when it happened. I didn't set up DNS, sendmail, cron... -- zip, zilch, nada. > > ...after I use Control+C, then sshd and usbd starts, and FreeBSD continues > > booting. Now, if the entry for ftpd is in inetd.conf, then wouldn't that be > > read and executed before cron was started? I don't think the daemons are > > started asynchronously because sshd and usbd would start before I hit > > Control+C if that were true. > > Don't run ftpd from inetd if you want to run a separate ftpd > deamon. What does cron have to do with this, BTW? I know that... cron, sshd, and usbd have nothing to do with this AFAIK, I was simply showing what was being loaded. Sorry if that caused any misunderstandings. I did disable sendmail and that was causing the hault during boot, like you said DNS isn't set up yet. But, ftpd and telnetd still refuse to work. > > Is there a way to find out what was trying to be run as a daemon during > > boot, so I can see what didn't start? Where does FreeBSD look to find all > > the daemons it needs to run during bootstrap? > > In the rc files. The code you are looking for is in rc.network. If you > want to search the startup codes, > > $ grep /etc/rc* > > You can add /usr/local/etc/rc.d/* to search the "custom" additions. Ok it pulls it directly from those files. Good, now I know. :o) > > This is a fresh 4.1.1 install, I'm still using the GENERIC kernel and making > > a point to not change anything until someone can help me figure out what the > > problem is. > > 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 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. FYI, I really appreciate your assistance and look forward to a response. Thanks again, Jeremy Falcon > -- > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message