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 !

How do i connect externally via FTP? get connection refused

Got problems with your B2 or B3? Share and get helped!
Thomas_l
Posts: 7
Joined: 10 Dec 2011, 12:32

Re: How do i connect externally via FTP? get connection refu

Post by Thomas_l »

Some more on my problem

I manged to run the command at rooot access:
/etc/init.d/proftpd start
Starting ftp server: proftpd - warning: unable to determine IP adress of b3
- error: no valid servers configured
- Fatal: eroor processin g configuration file /etc/proftpd.conf
failed!
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: How do i connect externally via FTP? get connection refu

Post by Cheeseboy »

Hi Thomas_I,

It looks like there is an entry missing in your /etc/hosts file, so proftpd is unable to resolv the name "b3" into an IP address. I don't know of a way to fix that from the web interface.
As you have managed to acquire root access in a terminal, you should be able to fix it easily.

Try the following (as root):
1. Backup /etc/hosts:

Code: Select all

# cp /etc/hosts /etc/hosts.backup
That copies the /etc/hosts file to /etc/hosts.backup.

2. Edit /etc/hosts:

Code: Select all

# nano /etc/hosts
3. Look for a line like this:

Code: Select all

192.168.10.1    b3.localdomain  b3
If the line is missing from the file, add it.
To exit from the editor and save the changes, press <CTRL> + x and answer Yes when it prompts you to save your changes.

Try to start proftpd again as you did before.
If this did not fix your problem, you can restore your original file like this:

Code: Select all

# mv /etc/hosts.backup /etc/hosts
That will rename the backup file (hosts.backup) to the original name (hosts), and overwrite your changed file in the process.

If it fixed the problem, you can remove the backup like this:

Code: Select all

# rm /etc/hosts.backup
Good luck!
Gordon
Posts: 1465
Joined: 10 Aug 2011, 03:18

Re: How do i connect externally via FTP? get connection refu

Post by Gordon »

Actually the most common reason for this to fail (I think) is that people assign a real internet name to the FTP server. For some silly reason proftpd insists on trying to resolve that name into an IP address only to do absolutely nothing with that information (except allow the service to actually start). Proftpd will work perfectly if you add the assigned name to ANY random IP in /etc/hosts, including the localhost definition (127.0.0.1). There's just one flaw to that last approach in that dnsmasq also takes its hosts definitions from that file and will map the FTP servers internet name to localhost; i.e. the internal client that you are using to try and access that server and not the B3.
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: How do i connect externally via FTP? get connection refu

Post by Cheeseboy »

True. But it is obviously configured to use the hostname "b3", and resolving it fails:
Starting ftp server: proftpd - warning: unable to determine IP adress of b3
Thomas_l
Posts: 7
Joined: 10 Dec 2011, 12:32

Re: How do i connect externally via FTP? get connection refu

Post by Thomas_l »

Problem solved. I changed the line as you suggested. Thank you Cheeseboy! I will admit its some fun hacking :D
Gordon
Posts: 1465
Joined: 10 Aug 2011, 03:18

Re: How do i connect externally via FTP? get connection refu

Post by Gordon »

Mental note:

Read back further instead of respond to the last post only :oops:
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i connect externally via FTP? get connection refu

Post by 86ivar »

Had no ftp on my bubba 2 after the fresh update to 2.4
Problem solved by adding 192.168.10.1 b2.localdomain b2 in the hosts file, just as last time while running the older version.
I think excito should add this line in a update etc.
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: How do i connect externally via FTP? get connection refu

Post by johannes »

This is fixed now (since 2.4), but the bug may remain in systems from old software versions.
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i connect externally via FTP? get connection refu

Post by 86ivar »

johannes wrote:This is fixed now (since 2.4), but the bug may remain in systems from old software versions.
Hmm, but i did a reinstall with a usb stick (from 2.1? to 2.4)
The update cleared the as the line (192.168.10.1 bubba.localdomain bubba) i added in 2.1 was gone.
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i connect externally via FTP? get connection refu

Post by 86ivar »

Hi again.
Right after i did this "fix" i noticed that the respond time when trying to reach bubba from the outside is very delayed. Like 2-3 minutes, but when connected it is normal.
By fix i mean adding 192.168.10.1 b2.localdomain b2 to the hosts file.
I remember i had this problem after i fixed it the last time (when i was running 2.0.1) but i was not shure what caused the problem.
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: How do i connect externally via FTP? get connection refu

Post by 86ivar »

Hi!
About a week ago these settings had resetted. I had to add the line in the hosts file, aswell as changing the servername from bubba to b2 in the proftpd.conf file. Today it resetted agin, but only the hosts file (/etc/hosts) Anyone know why this happens? Only recent "change" ive done to the server is to run btsync on the device, turn off wifi and turn off samba.
Post Reply