Problem

Installing Dropbox in a Docker image? When doing so in a debian:jessie image, I repeatedly got "Error: Trouble connecting to Dropbox servers. Maybe your internet connection is down, or you need to set your http_proxy environment variable" at the dropbox start -i step:

root@e87cf6c50031:/# dropbox start -i
Starting Dropbox...
Dropbox is the easiest way to share and store your files online. Want to learn more? Head to https://www.dropbox.com/

In order to use Dropbox, you must download the proprietary daemon.
Note: python-gpgme is not installed, we will not be able to verify binary signatures. [y/n] y

Error: Trouble connecting to Dropbox servers. Maybe your internet connection is down, or you need to set your http_proxy environment variable.
Traceback (most recent call last):
  File "/usr/bin/dropbox", line 1404, in start
    download()
  File "/usr/bin/dropbox", line 558, in download
    FatalVisibleError(ERROR_CONNECTING)
  File "/usr/bin/dropbox", line 517, in FatalVisibleError
    sys.exit(-1)
SystemExit: -1

Solution

The ca-certificates package needs to be installed. This is not the case in stripped-down Docker images.

If that isn't the cause, try watching the HTTPS traffic during the dropbox start -i to see what the problem is:

apt-get -y install tcpdump
tcpdump -A 'tcp port 443' -i eth0 &
dropbox start -i

For me, it showed a connection being made to https://www.dropbox.com (specifically, 108.160.172.238:443), ending just after the server sent the SSL certificate. Problems connecting can be further debugged by installing curl and running curl -D- https://www.dropbox.com

  • No labels