Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#7108 closed bug (fixed)

ftpd & telnetd not launched

Reported by: Pete Owned by: phoudoin
Priority: normal Milestone: R1
Component: Network & Internet Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description (last modified by mmadia)

If /boot/common/settings/network/services is set up to accept ftp and telnet (by uncommenting) and you try to access these services from another machine, you get nothing but "Connection Refused". (ssh seems to connect OK.)

Connection works as expected in my stable alpha-2 partition, but the problem exists in the hrev40236 nightly. It was first noticed in a local build of hrev39972. (/boot/common/etc files are set up as in the working partition.)

Net access out of Haiku is not impaired.

Change History (12)

comment:1 by mmadia, 13 years ago

Description: modified (diff)
Version: R1/alpha2R1/Development

comment:2 by diver, 13 years ago

I've played a bit with it and found a workaround for this problems:

Index: data/settings/network/services
===================================================================
--- data/settings/network/services	(revision 40237)
+++ data/settings/network/services	(working copy)
@@ -1,9 +1,9 @@
 #service telnet {
-#	launch	telnetd
+#	launch	telnetd -debug
 #}
 
 #service ftp {
-#	launch	ftpd
+#	launch	ftpd -D
 #}
 
 service ssh {

comment:3 by bonefish, 13 years ago

Owner: changed from nobody to axeld
Status: newassigned

in reply to:  2 comment:4 by Pete, 13 years ago

Replying to diver:

I've played a bit with it and found a workaround for this problems:

I can't make this work (removing the commenting as well of course!). I'm editing the installed version in .../settings/network, but it's hard to see how editing the source (as shown) would be different.

comment:5 by diver, 13 years ago

Try to run ftpd -D and telnetd -debug in Terminal and it should just work.

Last edited 13 years ago by diver (previous) (diff)

comment:6 by Pete, 13 years ago

As a possible further data point, if I run net_server from a Terminal in the working alpha-2 partition, and then ftp and telnet from another machine, I see:

New service telnet
Starting service 'telnet'
New service ftp
Starting service 'ftp'
New service ssh
Launch service: /boot/common/bin/sshd
Launch service: ftpd
Launch service: telnetd

Doing the same from the failing installation, I see the same, except for the last two 'Launch' lines, which never happen.

in reply to:  5 comment:7 by Pete, 13 years ago

Replying to diver:

Try to run ftpd -D and telnetd -debug in Terminal and it should just work.

Yep -- that does it.

So my installed workaround is to create an executable script /boot/home/config/boot/RunDaemons:

#!/bin/sh
(while true; do telnetd -debug; done)&
ftpd -D

(a while-loop is needed for telnetd because it only accepts the first connection. ftpd OTOH stays running with the -D switch.)

Then I add '/boot/home/config/boot/RunDaemons&' to UserBootScript and I get access as before. A separate script is needed so the loop can keep running without holding UserBootScript open.

comment:8 by diver, 13 years ago

Seems like I (falsely) assumed that if it works this way in Terminal it should work in services too, apparently that doesn't work like that. Oh well.

comment:9 by phoudoin, 13 years ago

Owner: changed from axeld to phoudoin
Status: assignedin-progress

comment:10 by phoudoin, 13 years ago

Fixed in hrev40241.

comment:11 by phoudoin, 13 years ago

Resolution: fixed
Status: in-progressclosed

in reply to:  10 comment:12 by Pete, 13 years ago

Replying to phoudoin:

Fixed in hrev40241.

Installed and verified... Thanks.

Note: See TracTickets for help on using tickets.