Support

Akeeba Backup for Joomla!

#8819 Not connecting to Dropbox

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Sunday, 13 March 2011 04:33 CDT

user32935
Hi,

I have some problems with the post-processing job – the upload to my DropBox.

I checked with my host and they say that any outbound traffic on port 80, 443 and 21 are block – but could be opened, if I supply the receiving ip. Can I that and is this the issue – are those ports in use?

Here is my info:
Akeeba Backup Professional 3.2.3 (2011-02-23)
Log file attached
Joomla 1.5.22
PHP Version 5.2.16
MySQL 5.0.91-community
Host: DanHost

************ Copy from file step number 8 ************
DEBUG |110310 14:28:06|Loading post-processing engine object (dropbox)
INFO |110310 14:28:06|Continuing post processing file /administrator/components/com_akeeba/backup/site-new.softball.dk-20110310-142739.jpa
WARNING |110310 14:28:06|Failed to process file /administrator/components/com_akeeba/backup/site-new.softball.dk-20110310-142739.jpa
WARNING |110310 14:28:06|Error received from the post-processing engine:
WARNING |110310 14:28:06|Cannot execute request: couldn't connect to host \n Cannot execute request: couldn't connect to host \n Cannot execute request: couldn't connect to host
************ End of copy ************

Regards,

Michael

File wouldn't be attached. Link to DropBox-file deleted again.

nicholas
Akeeba Staff
Manager
DropBox is using a multicast DNS as far as I know, meaning that the actual IP address of the server may be different depending on where your server is located. In that case, please tell your host to run a dig on www.dropbox.com and dl-web.dropbox.com. Then, they'll have to open TCP/IP traffic over ports 80 and 443 for those IPs.

From where I am, the IP addresses I get running the dig command on those host names are 208.43.202.50, 208.43.202.53 and 50.16.193.152.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user32935
Hi again,

thanks for the quick reply.

Talked to my host - the ran the dig command og found three ip's also and opened for outbound traffic on ports 80 and 443.

But it still fails :(

Any other means for testing?

- Michael

nicholas
Akeeba Staff
Manager
There are some hosts where DropBox returns a 404 on the upload form for no apparent reason. Maybe you are hosted on one of them :( You can always send me a Personal Message (I'm user "nicholas") with Super Admin log details to your site to see if this is the case or if it's something different.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

nicholas
Akeeba Staff
Manager
I am not sure that your host has gotten the correct IPs. Running the same trace from your site, I get these IPs:
208.43.202.50, 208.43.202.53 and 174.129.253.199

Please ask them to check that TCP/IP communications over ports 80 and 443 to these IPs are allowed.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user32935
Hi again,

thanks for the info.

I've tested again - without any luck.

I've checked with my host - the have opened the following ip's on port 80 and 443:
208.43.202.50
208.43.202.53
174.129.253.199
184.72.226.9

and they can use TELNET to dropbox.com - so according to them the service is available from the server and al should work.

But I still gets "couln't connect to host"-error.

- Michael

nicholas
Akeeba Staff
Manager
That beats me :( I am not aware of any other reason why you would receive that error. The error message comes from PHP's cURL extension and means that cURL was not able to access the host. Apart from DNS not working properly and firewalls I can't think of any other reason why cURL wouldn't be able to connect to a specific host.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user32935
Hi again,

Are there any communication back from DropBox - the site run as an sub-domain on new.softball.dk on a server at DanHost (webhost), the server the website are about to be moved to. I've added a a-record to point this sub-domain to the correct ip (the server at DanHost)

The www.softball.dk run on a different server at an different webhost.

Does this have any impact?

- Michael

nicholas
Akeeba Staff
Manager
There is no communication (call backs) per se. What Akeeba Backup does is to log in to DropBox' web interface, extract the form validation token and then submit the manual upload form to DropBox. It basically simulates a web browser session where a user tries to manually upload a file to his DropBox account through the web interface.

The error message you get means that Akeeba Backup can't submit the file upload form. I suspect that this happens because DropBox is using a multicast DNS to divert this traffic to a load balancer. This means that each time you try to upload a file, a different IP address may be returned by the multicast DNS. I also am not aware about the internal working of the load balancer. It may be forwarding the request to a different IP each time, making it impossible to configure your server's firewall to allow communication. Of course, all of this is just speculation. I am not 100% sure how DropBox' infrastructure works :(

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user32935
Hi,

is it possible - for testing - to limit Akeeba Backup to use only one of the ip's we have identified (e.g. by hardcoding it into the sourcecode)?

(I can of course supply a ftp-user and more to this, if needed)

If this is possible - and the test show this then works, I could take the issue elsewhere, to DropBox to hear about the multicast and if it could be worked out in other ways - e.g. a list of availible ip in the scope/list.

- Michael

nicholas
Akeeba Staff
Manager
As a matter of fact, you can. Edit the administrator/components/com_akeeba/akeeba/plugins/engines/proc/dropbox.php.

Change line 159 so instead of www.dropbox.com it uses an IP address. Then change line 164 so that instead of dl-web.dropbox.com it uses an IP address. Most likely that will work (it's an untested change)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user32935
Hi,

great - i'll test this over the weekend.

I'll write back with the result.

Thanks so far - you have been great :)

- Michael

nicholas
Akeeba Staff
Manager
You're welcome! And thank in advance for your feedback :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user32935
hi again,

hmm.... no matter which of the four ip's I insert I still get an error - BUT a new one.

I seems the script now get access to DropBox, but fails on a token.

Error:

Cannot extract token! (form action=https://208.43.202.50/upload)
Cannot extract token! (form action=https://208.43.202.50/upload)
Cannot extract token! (form action=https://208.43.202.50/upload)

- Michael

nicholas
Akeeba Staff
Manager
You changed too much! Line 161 should read exactly:
$token = $this->dropbox_extractToken($data, 'https://dl-web.dropbox.com/upload');

Do not modify that line! It is scanning the HTML returned by DropBox for that URL ;) Only modify lines 159 and 164 to read
$data = $this->dropbox_request('https://1.2.3.4/home');
and
$data = $this->dropbox_request('https://5.6.7.8/upload', true, array('plain'=>'yes', 'file'=>'@'.$filename, 'dest'=>$remoteDir, 't'=>$token));
respectively, where 1.2.3.4 is the IP address to www.dropbox.com and 5.6.7.8 is the IP address to dl-web.dropbox.com.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user32935
IT WORKS, IT WORKS :)

Damn you are good! Not only did you make a brilliant product - you also provide competent support. WAUV!

Can you provide me with the knowledge to perform checkup on the ip's used by DropBox - if they should change in the future - like you did, when you logged in to my website? Can I see it somewhere in Akeeba Backup?

- Michael

nicholas
Akeeba Staff
Manager
You're welcome! I am glad it works now :)

In order to do the checkup on the IPs, I created a small script named test.php with the following content:
<?php echo gethostbyname('www.dropbox.com'); echo "<br/>"; echo gethostbyname('dl-web.dropbox.com'); ?>
and uploaded it to your site's root. Then I just visited http://www.yourhost.com/test.php and showed me the two IPs I needed.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!