0

With docker 1.7.1, foxx-manager update gets error 500 when downloading master.zip from central repository. However, no error was occurred with docker 1.6.1.

Did anyone encounter this problem?

How can I specify https_proxy for arangosh? foxx-manager update fails inside corporate proxy environment.

I've tried these settings:

... and all failed.

Below is my session log:

[t.suwa@devstudy ~]$ docker run -d arangodb
e3175d53cd1fc288201bfeebaaf95084c1409c4299ce1b39369d131bf2964d0a
Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
[t.suwa@devstudy ~]$ docker ps
CONTAINER ID        IMAGE                COMMAND               CREATED             STATUS              PORTS               NAMES
e3175d53cd1f        arangodb             "/usr/sbin/arangod"   11 seconds ago      Up 9 seconds        8529/tcp            backstabbing_albattani
[t.suwa@devstudy ~]$ docker exec -it e3175d53cd1f /bin/bash
root@8155996d26ff:/# arangosh
                                       _
  __ _ _ __ __ _ _ __   __ _  ___  ___| |__
 / _` | '__/ _` | '_ \ / _` |/ _ \/ __| '_ \
| (_| | | | (_| | | | | (_| | (_) \__ \ | | |
 \__,_|_|  \__,_|_| |_|\__, |\___/|___/_| |_|
                       |___/
Welcome to arangosh 2.6.7 [linux]. Copyright (c) ArangoDB GmbH
Using Google V8 4.1.0.27 JavaScript engine, READLINE 6.3, ICU 54.1
Pretty printing values.
Connected to ArangoDB 'tcp://127.0.0.1:8529' version: 2.6.7 [standalone], database: '_system', username: 'root'
Type 'tutorial' for a tutorial or 'help' to see common examples
arangosh [_system]> fm.update()
JavaScript exception in file '/usr/share/arangodb/js/common/modules/org/arangodb/foxx/store.js' at 410,11: [ArangoError 1752: application download failed: Github download from 'https://github.com/arangodb/foxx-apps/archive/master.zip' failed with error code 500]
!    throw err;
!          ^
stacktrace: Error
    at exports.throwDownloadError (/usr/share/arangodb/js/common/modules/org/arangodb-common.js:448:9)
    at Object.update (/usr/share/arangodb/js/common/modules/org/arangodb/foxx/store.js:392:7)
    at <shell command>:1:4
  • Do you have proxy in your environment? – BMW Sep 09 '15 at 01:44
  • @BMW Yes I do. Unfortunately, setting `https_proxy` environment variable did not change the situation. However, `foxx-manager update` on docker 1.6.1 succeeds even without `https_proxy` environment variable. – Tomotaka SUWA Sep 09 '15 at 03:31
  • I found the host running Docker 1.6.1 is being SNAT with the LB which has global IP address. Now it's clear that Docker 1.6.1 can download master.zip without our corporate proxy. – Tomotaka SUWA Sep 09 '15 at 04:45
  • Foxx manager and arangodb doesn't have proxy support. Currently the only solution would be using a transparent proxy. We will track this in https://github.com/arangodb/arangodb/issues/1477 – dothebart Sep 09 '15 at 07:37
  • 1
    @dothebart Thank you so much. I'll try transparent proxy. – Tomotaka SUWA Sep 10 '15 at 02:08
  • did the transparent proxy work for you? can you mark this solved? – dothebart Nov 23 '15 at 17:31

1 Answers1

0

If your environment is behind proxy, please add these in Dockerfile.

ENV https_proxy=http://xx.xx.xx.xx:port
ENV https_proxy=xx.xx.xx.xx:port
ENV HTTPS_PROXY=http://xx.xx.xx.xx:port
ENV HTTPS_PROXY=xx.xx.xx.xx:port
ADD .gitconfig /.gitconfig

Local file .gitconfig should have proxy setting as well:

[http]
        proxy = http://xx.xx.xx.xx:port
[https]
        proxy = http://xx.xx.xx.xx:port

Suspose you install and run the applicaiton with root in container, if not, copy .gitconfig to that user's home directory.

Build the image with proxy, then you should be fine to download the package within container.

BMW
  • 42,880
  • 12
  • 99
  • 116