[XBMC for Linux] Having a problem connect to FTP server
#1
Hello,

I'm having an issue whereby I cannot connect to a FTP server within the XBMC gui. When I click 'Add Source' and then choose a FTP server/port/username, the screen just hangs and eventually says that it cannot connect. If I try to connect via a terminal, the connection is made right away.

Here's some information on my setup:

1. AspireRevo (Atom CPU 230 @ 1.6GHZ, 2 GB RAM)
2. i686 Architecture
3. XBMC pre-9.10 r21936 (Compiled Aug 3, 2009)
4. Installed initially as XBMC Live, updated manually per the guide
5. Ubuntu 9.04

Here's some output from the debug log:

01:30:48 T:3045861264 M:1728675840 DEBUG: FileCurl::Open(0xbfdf733c) ftp://[username_edited]:[password_edited][email protected]:21/
01:30:48 T:3045861264 M:1728675840 INFO: easy_aquire - Created session to ftp://192.168.1.121
01:30:58 T:3045861264 M:1728598016 DEBUG: FillBuffer: curl failed with code 28
01:30:58 T:3045861264 M:1728598016 DEBUG: FillBuffer: Reconnect, (re)try 1
01:31:08 T:3045861264 M:1728598016 DEBUG: FillBuffer: curl failed with code 28
01:31:08 T:3045861264 M:1728598016 DEBUG: FillBuffer: Reconnect, (re)try 2
01:31:18 T:3045861264 M:1728614400 DEBUG: FillBuffer: curl failed with code 28
01:31:18 T:3045861264 M:1728614400 DEBUG: FillBuffer: Reconnect, (re)try 3

As I said, when I connect via the terminal, there are absolutely no problems.

[EDIT]: I should also note that I'm using FileZilla server on my Windows Home Server machine.

Thoughts?
Reply
#2
Quote:7. FULL Debug Log (Please use your favorite paste site! See below.) << NOT OPTIONAL!
.
Reply
#3
Dude, c'mon. Can't you at least hazard a guess with the information I provided? And I'm not even sure what a "full debug log" means -- should I collect information for a minute, for an hour, for a day? I've posted the relevant information related to the problem, and all I'm really asking for is whether someone has some idea as to what the problem might be caused by.

I've seen numerous posts on this site asking for help without even 10% of the information that I've provided.

If you don't want to help, that's fine - just say you don't know the answer or you don't have the time - or don't respond at all. But please don't quote the "rules" in such a way that it discourages other people to respond because the moderator has laid down the law.

Thanks for understanding my perspective.
Reply
#4
It means all of that thing you posted a snip of. Use pastebin.com or similar.
Reply
#5
Umm.. I would have helped, but the full log (from start of server up until the issue) is missing and thus some important details that may help aren't in the snippet provided.

So, please just pastebin the full debug log if you want proper help. The lines you pasted are worthless by itself. Error code 28 means a timeout. But a timeout could be due to other issues.

So, I really suggest you listen to us when we say we need the full log. There's quite a bit of other information in there that would help.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
Ok, so it turns out the problem was due to the fact that XBMC attempts to initiate a PASV ftp session with the server, and I had not limited a port range through which the server-to-client connection should be established. By not doing this, the firewall on my server was blocking the data request.

Long story short - if you run into this issue, know:

1. XBMC will always attempt to initiate a PASV FTP connection
2. PASV FTP connections require a separate port or port range to be opened in your firewall
3. You should, if possible, limit that port range to something that you can manage from within your firewall exceptions (e.g. 4500-4600).
4. This is, by the way, something that can be limited within FileZilla server in the configuration page.

-Ansyhrrian
Reply
#7
By the way, guys, I have to apologize for being something of a dick in my initial response. I think what you gentlemen are doing is really quite fantastic, and the XBMC application is top-notch. I appreciate your hard work and dedication to the community, and now that I truly understand what you need to help resolve a problem, I will endeavor to provide that information for any other assistance request I make in the future.

Again, great work and thank you so much for XBMC!!
Reply
#8
For what it's worth, you can tell it to use active instead of passive.

I think you can add a query param to the ftp url. Have something like ?active=

No need for a value.

Never tried it, but from looking at our source, that should work.

Here is what you can set for the value as per curl docs:

"Pass a pointer to a zero terminated string as parameter. It will be used to get the IP address to use for the ftp PORT instruction. The PORT instruction tells the remote server to connect to our specified IP address. The string may be a plain IP address, a host name, an network interface name (under Unix) or just a '-' letter to let the library use your systems default IP address. Default FTP operations are passive, and thus won't use PORT.

You disable PORT again and go back to using the passive version by setting this option to NULL. "
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
[XBMC for Linux] Having a problem connect to FTP server0