New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Cannot get FTP server to work [solved]

Got problems with your B2 or B3? Share and get helped!
Post Reply
d_rylndr
Posts: 48
Joined: 31 Mar 2011, 14:20

Cannot get FTP server to work [solved]

Post by d_rylndr »

I can't get B3s FTP-servert to work.
Everything looks alright.
Services>FTP is ON (anonymous is off)
b3 is set to Router+Firewall+Server
Network>Firewall>FTP is set to On
Easyfind is on and I've set a username.

I try to connect to b3-ftp through Nautilus, Filezilla and Browser. Try to connect through internal ip, public ip, easyfind adress. Nothing works...

Filezilla gives: (in swedish)
Status: Slår upp adressen för usernameXXX.myownb3.com
Status: Ansluter till 111.111.111.111:21...
Status: Försöket att ansluta till "ECONNREFUSED - Connection refused by server" misslyckades.
Fel: Kunde inte ansluta till servern

NAutilus gives:
"Fel: Fel vid anslutning: Förbindelse vägras
Välj en annan visare och försök igen." (Connection refused...)

What is wrong? Why can't I connect!?
Last edited by d_rylndr on 03 May 2011, 05:08, edited 1 time in total.
Binkem
Posts: 388
Joined: 10 Jul 2008, 02:26

Re: Cannot get FTP server to work

Post by Binkem »

IS the B3 connected directly to the internet, or do you use a router/modem? Can you connect via the network? Try connecting directly using a cable from computer to B3 lan port.
d_rylndr
Posts: 48
Joined: 31 Mar 2011, 14:20

Re: Cannot get FTP server to work

Post by d_rylndr »

Thank you.

B3 is connected directly to internet, using it as router.
Can't connect locally either. With a comp. connected directly in the b3-lan port I get "Error connecting: Connection refused." etc. (ftp://192.168.10.1)
d_rylndr
Posts: 48
Joined: 31 Mar 2011, 14:20

Re: Cannot get FTP server to work

Post by d_rylndr »

Have to add that connecting to the http-interface through easyfind does work. FTP odes not.
d_rylndr
Posts: 48
Joined: 31 Mar 2011, 14:20

Re: Cannot get FTP server to work

Post by d_rylndr »

Problem solved.
Hrmm. Cough... A reboot did the trick... Cough, cough...
Thomas_l
Posts: 7
Joined: 10 Dec 2011, 12:32

Re: Cannot get FTP server to work [solved]

Post by Thomas_l »

I seem to be in exactely the same situation as You were. You solved this by re-boot. Congratulations!
Unfortunately it doesn work for me. I still get the message "econnrefused" in filezilla.

Any one has a clue to share? I Would be very grateful
redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Cannot get FTP server to work [solved]

Post by redw0001 »

Hmm, I seem to have the same problem. To best of my knowledge I set my new B3 up like my B2 and whilst I can connect to my B2 I cant to my B3, just get ECONNREFUSED message. I'm using Filezilla. B3 is set up as server only and all services are on according to the admin screen.

Anybody resolved this? I've got round it in a convoluted way but I'm now at the stage where I want to copy dozens of directories with thousands of photos. Using my workround it will take all year and I'll have no time to take more photos (or upgrade my B2 to latest software level).

Any suggestions gratefully received, robin
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Cannot get FTP server to work [solved]

Post by Gordon »

Check the internet name that the FTP server is set to advertise and verify that the B3 can resolve this address into an actual IP address. I can't remember off hand if that address needs to be one of the B3's own addresses, but the usual suggested method is to add this name to your hosts file and assign it your LAN address.
redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Cannot get FTP server to work [solved]

Post by redw0001 »

Thanks Gordon, I'm trying to FTP from my laptop sitting next to the B2 and B3 so to try to keep as simple as possible I've used both the broadcast name the dns can see and the ip addresses. I dont profess to be an IP wh

I've tried bot B3 and 192.168.1.4, the static IP address I've assigned to the wired ethernet connection to the B3. I also tried 192.168.1.5, the static IP address I assigned to the wireless however, I've now turned that off again.

Whilst I prefer to use Filezilla as it makes everything easy I have tried the ftp command from windows and it doesn't connect ... but I get no error message. I've been convinced it is something I'm missing, or doing wrong but cant fathom out what as it works just fine on the B2.

robin
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Cannot get FTP server to work [solved]

Post by Gordon »

I probably should have asked first: do you know how to get into a SSH shell?

Presuming you do, first verify the name of your FTP server:

Code: Select all

root@b3:~$ grep "^ServerName" /etc/proftpd/proftpd.conf
ServerName                      "b3.localdomain"
Of course, there can be another name in there but this is the default.

Next verify that this name resolves to an IP address:

Code: Select all

root@b3:~$ host b3.localdomain
b3.localdomain has address 192.168.10.1
Check whether the service is active:

Code: Select all

root@b3:~$ netstat -an | grep ":21 .*LISTEN"
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN
You may see IPV6 returned here as well. If you only see IPV6 that you may try to disable that like I did. In that case, edit the file /etc/proftpd/proftpd.conf and insert the line:

Code: Select all

UseIPv6                         off
Restart Proftpd and do the netstat again.
redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Cannot get FTP server to work [solved]

Post by redw0001 »

Yes, can ssh into box. It's just the networking that is a black art to me. Clearly I have some thing wrong, here is a copy/paste from the ssh session.

robin@B3:~$ su
Password:

root@B3:/home/robin# grep "^ServerName" /etc/proftpd/proftpd.conf
ServerName "B3"

root@B3:/home/robin# host B3
Host B3 not found: 3(NXDOMAIN)

root@B3:/home/robin# netstat -an | grep ":21 .*LISTEN"
root@B3:/home/robin#
<<no output just the next prompt>>
nobody
Posts: 226
Joined: 10 Mar 2012, 14:46

Re: Cannot get FTP server to work [solved]

Post by nobody »

What is the output from shell command

Code: Select all

hostname
?
redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Cannot get FTP server to work [solved]

Post by redw0001 »

From my B3 I get.

root@B3:/home/robin# hostname
B3


From my B2 I get ....

storm:/home/robin# hostname
storm

I also tried the following from each....

ping B3
ping storm
ping 192.168.1.4 (B3s address)
ping 192.168.1.3 (storms address)

root@B3:/home/robin# ping B3
ping: unknown host B3
root@B3:/home/robin# ping storm
ping: unknown host storm
root@B3:/home/robin# ping 192.168.1.4
PING 192.168.1.4 (192.168.1.4) 56(84) bytes of data.
64 bytes from 192.168.1.4: icmp_req=1 ttl=64 time=0.144 ms
64 bytes from 192.168.1.4: icmp_req=2 ttl=64 time=0.095 ms
64 bytes from 192.168.1.4: icmp_req=3 ttl=64 time=0.103 ms
^C
--- 192.168.1.4 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.095/0.114/0.144/0.021 ms
root@B3:/home/robin# ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_req=1 ttl=64 time=0.377 ms
64 bytes from 192.168.1.3: icmp_req=2 ttl=64 time=0.272 ms
^C
--- 192.168.1.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.272/0.324/0.377/0.055 ms

storm:/home/robin# ping B3
ping: unknown host B3
storm:/home/robin# ping storm
PING storm.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from storm.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.278 ms
64 bytes from storm.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.205 ms
64 bytes from storm.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.200 ms
64 bytes from storm.localdomain (127.0.0.1): icmp_seq=4 ttl=64 time=0.200 ms
64 bytes from storm.localdomain (127.0.0.1): icmp_seq=5 ttl=64 time=0.204 ms
^C
--- storm.localdomain ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.200/0.217/0.278/0.033 ms
storm:/home/robin# ping storm
PING storm.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from storm.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.256 ms
64 bytes from storm.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.205 ms
^C
--- storm.localdomain ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.205/0.230/0.256/0.029 ms

So,
ping to B3 or storm from B3 not resolved
ping from storm to B3 not resolved, to storm resolved
all 192.168.1.x tests worked worked

I do not understand what this is telling me other than there is something wrong with B3 and name resolution?
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Cannot get FTP server to work [solved]

Post by Gordon »

Like I said the day before yesterday: Proftpd requires that the name it runs under can be resolved to a valid IP. Don't ask me why, it just does.

I can only make some assumptions about your local setup, but since you already have a B2 I think it's safe to presume that you're running the B3 in server only profile (LAN only). Since your B2 ("storm") is responding the localhost IP to its own name, you're also most likely to run this server only as well and have another device up as DHCP/DNS server (probably your ISP router).

If you ever intend to rename your B3 (Ember?) this is probably a good time to do it. So go into the web admin interface and change the hostname in "Settings" -> "Identity" to ember.localdomain :arrow: is "localdomain" the same as on your workstation(s)?

get into the SSH shell and edit /etc/resolv.conf:
search localdomain
nameserver 192.168.1.1
Change the red marked elements to reflect your network settings.

Next edit /etc/hosts and add the green marked parameters to the existing localhost entry:
127.0.0.1 localhost ember ember.localdomain
Don't forget to edit /etc/proftpd/proftpd.conf as well:

Code: Select all

ServerName                      "ember.localdomain"
redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Cannot get FTP server to work [solved]

Post by redw0001 »

Solved!

Thank you for your help.

The key thing I changed was in /etc/hosts.

storm had:
127.0.0.1 storm.localdomain storm

petra (the b3 now has a new name) didnt --- it had....
127.0.0.1 localhost.localdomain localhost
@LANIP@ @NAME@.localdomain @NAME@

Added
127.0.0.1 petra.localdomain petra

and it all works, Filezilla currently copying 20,000 files out of some small directories. Thanks for your help
robin
Post Reply